Repository navigation
fix(build): derive the version from release tags only - #4791
Merged
Merged
Conversation
build.rs ran `git describe --tags`, so any nearer non-version tag became the reported version. The lightweight `release-recovery-nov14` tag on 9ececf3 made every build of main report `release-recovery-nov14-N-g<sha>`, which the `[VERSION]` snapshot filter does not recognize, failing three `config_show` snapshot tests on the affected workflow's macOS and Windows coverage jobs. Restrict describe to `v[0-9]*` tags. Refs #4790
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
build.rsasks vergen forgit describe --tags, so the nearest tag of any name becomes the reported version. The lightweightrelease-recovery-nov14tag, pushed on 9ececf3 for the v0.82.0 recovery dispatch, is now the nearest tag tomain. As a result, every build ofmainreportsrelease-recovery-nov14-N-g<sha>inwt --versionandwt config show. The[VERSION]snapshot filter intests/common/mod.rsonly recognizesv-semver or bare hashes, so threeconfig_showsnapshot tests fail. They failed on the macOS and Windows jobs of the affected run.ciandcoveragestayed green because their shallow checkouts fetch no tags, so describe falls back to the bare hash.affectedchecks out withfetch-depth: 0.This PR restricts describe to
v[0-9]*tags. Builds frommainnow reportv0.82.0-N-g<sha>again, and a checkout without release tags still falls back to the bare hash through--always. On Windows, vergen runs the command throughcmd /cwithout quotes, which passesv[0-9]*through literally.Verification: with the recovery tag fetched,
test_config_show_bash_matched_exe_emits_alias_hintfailed locally with the samerelease-recovery-nov14-1-g4ad95fa64diff as CI. After the change, all 238config_showintegration tests pass andwt --versionprintsv0.82.0-2-g4ad95fa64.Refs #4790 — automated triage