k6
k6 copied to clipboard
ci: VERSION_DETAILS does not contain the latest tag
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
Potentially relevant issues: https://github.com/actions/checkout/issues/882, https://github.com/actions/checkout/issues/701
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 :tada: 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: v0.40.0-build.log
The question is, why was this not a problem in previous builds and became a problem for v0.40.0? :thinking: I assume I broke something with the (now notorious) https://github.com/grafana/k6/pull/2591, but I am not sure exactly what... :confused:
Was this same command executed in the previous releases? Or did something change in the github-action, maybe outside the changes in our workflow?
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.
https://github.com/grafana/k6/blob/3e88e18166d90ddf5ca395a6e07b47cb221255c0/build-release.sh#L10 vs. https://github.com/grafana/k6/blob/3e88e18166d90ddf5ca395a6e07b47cb221255c0/build-release.sh#L13
:man_facepalming: Yeah, that is probably it...
@olegbespalov tried it in a private repo and the lack of --tags
turned out to be the problem indeed.