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

ci: VERSION_DETAILS does not contain the latest tag #2676

Closed
codebien opened this issue Sep 8, 2022 · 7 comments · Fixed by #2691
Closed

ci: VERSION_DETAILS does not contain the latest tag #2676

codebien opened this issue Sep 8, 2022 · 7 comments · Fixed by #2691
Assignees
Labels
ci evaluation needed proposal needs to be validated or tested before fully implementing it in k6
Milestone

Comments

@codebien
Copy link
Collaborator

codebien commented Sep 8, 2022

During the build the new tag hasn't been picked from the git describe command, in this way the k6 version prints an older tag. It isn't a critical bug because all the important information like the date or the commit hash are correct.

The issue could be related to the GitHub checkout action that doesn't fetch for a strange reason the latest created tag.

k6 version
k6 v0.40.0 (2022-09-08T09:06:02+0000/v0.39.0-92-gdcbe2f9c, go1.18.6, linux/amd64)

Current

v0.39.0-92-gdcbe2f9c

Expected

v0.40.0-0-gdcbe2f9c

@codebien codebien added ci evaluation needed proposal needs to be validated or tested before fully implementing it in k6 labels Sep 8, 2022
@codebien codebien added this to the v0.41.0 milestone Sep 8, 2022
@codebien codebien changed the title ci: checkout ci: VERSION_DETAILS does not contain the latest tag Sep 8, 2022
@na--
Copy link
Member

na-- commented Sep 8, 2022

Potentially relevant issues: actions/checkout#882, actions/checkout#701

@na--
Copy link
Member

na-- commented Sep 9, 2022

Decided to dig this a little deeper and we can actually see all of the git actions that were executed by the v0.40.0 build 🎉 And this seems like the reason for the problem to me: https://github.com/grafana/k6/runs/8245641202?check_suite_focus=true#step:2:620

In case that log disappears, I'll post the raw logs and a screenshot here as well:
logs
v0.40.0-build.log

@na--
Copy link
Member

na-- commented Sep 9, 2022

The question is, why was this not a problem in previous builds and became a problem for v0.40.0? 🤔 I assume I broke something with the (now notorious) #2591, but I am not sure exactly what... 😕

@mstoykov
Copy link
Collaborator

mstoykov commented Sep 9, 2022

Was this same command executed in the previous releases? Or did something change in the github-action, maybe outside the changes in our workflow?

@olegbespalov
Copy link
Collaborator

olegbespalov commented Sep 16, 2022

I can guess that it's broken since, for the version details, we don't pass the --tags (https://git-scm.com/docs/git-describe#Documentation/git-describe.txt---tags) like we do for the Version.

export VERSION=${2:-$(git describe --tags --always --dirty)}

vs.
export VERSION_DETAILS=${3-"$(date -u +"%FT%T%z")/$(git describe --always --long --dirty)"}

@na--
Copy link
Member

na-- commented Sep 16, 2022

🤦‍♂️ Yeah, that is probably it...

@na--
Copy link
Member

na-- commented Sep 16, 2022

@olegbespalov tried it in a private repo and the lack of --tags turned out to be the problem indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci evaluation needed proposal needs to be validated or tested before fully implementing it in k6
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants