fix(release): compare version components as bounded integers - #182
Merged
Merged
Conversation
The resolve job failed on the first double-digit patch bump: sort -n parses an unbounded field like "9.10" as the float 9.1, so 0.9.10 ordered below 0.9.9 and the monotonicity check correctly refused the identity. Bound every sort key to its own field (-kN,N) and replace the sort-based greater-than test with a numeric per-component awk compare.
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.
Summary
The auto-release resolve job failed on the first double-digit patch bump (run
35473190210):sort -t. -k1n -k2n -k3nreads an unbounded field like9.10as the float 9.1, so0.9.10ordered below0.9.9and the monotonicity check refused the identity — correctly, given what it was told.-k1.6,1nr -k2,2nr -k3,3nr) sogds-v0.9.10sorts abovegds-v0.9.9— the same bug would have struck the newest-first tag walk as soon as0.9.10existed.awkcompare — no external sort semantics at all.Verified locally:
gds-v1.0.0 > gds-v0.10.0 > gds-v0.9.10 > gds-v0.9.9 > gds-v0.9.7, and0.9.10 > 0.9.9/0.9.9not greater than0.9.10.Merging this PR re-triggers the release pipeline; the resolve job should then mint
gds-v0.9.10/ sequence 66 from the last published envelope.Test plan
gds-v0.9.10on the merge pushGenerated with Devin