Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.5.0-beta.9: "zenohd --version" reports wrong version #153

Closed
JEnoch opened this issue Dec 3, 2021 · 3 comments
Closed

0.5.0-beta.9: "zenohd --version" reports wrong version #153

JEnoch opened this issue Dec 3, 2021 · 3 comments
Assignees

Comments

@JEnoch
Copy link
Member

JEnoch commented Dec 3, 2021

Downloading zenoh 0.5.0-beta.9 or using Docker image eclipse/zenoh:0.5.0-beta.9 the --version option doesn't report 0.5.0-beta.9 as expected but: v0.5.0-beta.8-326-g70d7b22-modified

@JEnoch JEnoch self-assigned this Dec 3, 2021
@JEnoch
Copy link
Member Author

JEnoch commented Dec 3, 2021

The version v0.5.0-beta.8-326-g70d7b22-modified means: "326 commits after tag 0.5.0-beta.8, commit id 70d7b22"
Actually this commit id well corresponds to the 0.5.0-beta.9 tag.

The problem was caused by a combination of several factors:

  • zenoh uses the git-version crate to compute the version at compile time
  • this crate relies on git describe command
  • by default git describe only shows annotated tags
  • the 0.5.0-beta.9 tag was created with command git tag 0.5.0-beta.9 -m "v0.5.0-beta.9", which implies that it was annotated (as detailed in git tag doc: "If -m <msg> ... is given and -a, -s, and -u <keyid> are absent, -a is implied.")
  • however, it seems that Github was not considering the tag as annotated and the git describe command during the Github action for release returned a version based on tag 0.5.0-beta.8 which is annotated

@JEnoch
Copy link
Member Author

JEnoch commented Dec 3, 2021

The root of the problem came from action/checkout@v2 step:
when "fetching the repository" it did the following command (log line 478):

git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules origin +70d7b22f539a6f88dc54d4949114cef6ffdd1df9:refs/tags/0.5.0-beta.9

The result of this command is that the annotated tag 0.5.0-beta.9 becomes a lightweight (un-annotated) tag.

Related open issues: actions/checkout#272, actions/checkout#290, actions/checkout#448
Possible PR not merged yet: actions/checkout#579

@JEnoch JEnoch closed this as completed in 7657d53 Dec 7, 2021
@JEnoch
Copy link
Member Author

JEnoch commented Dec 7, 2021

Hopefully this will be fixed for the next release, via a workaround pushed in 7657d53 (forcing the fetch of git tags after action/checkout@v2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant