Repository navigation
Treat an identical compatibility update after pull as a no-op - #446
Merged
Merged
Conversation
When two PRs merge close together, their "Build and upload packages" runs both commit the same compatibility-data update. The second run's `git pull` brings in the first run's identical commit, leaves nothing staged, and `git commit` fails with "nothing to commit", which fails the job and cancels the other platforms before they upload. Re-check the staged diff after pulling and return successfully when it is empty, while still failing on an unexpected diff-index error. Adds integration tests against a local bare remote, run in pre-commit. The fix and tests are from @Str-Gen's earlier PR, which was closed before landing.
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.
When two PRs merge close together, their "Build and upload packages" runs both commit the same compatibility-data update. The second run's
git pullbrings in the first run's identical commit, nothing is left staged, andgit commitfails withnothing to commit, working tree clean. That fails the job and cancels the other platform jobs before they upload, so packages silently go unpublished (this happened to the mojo-snappy rebuild and pyroquet in October, and to req 0.2.0 this week).This PR re-checks the staged diff after pulling and returns successfully when it is empty, while still failing on an unexpected
git diff-indexerror.The fix comes from @Str-Gen's earlier PR, which was closed before landing.
Testing
nothing to commit, and the fixed code exits 0 without committing. A new update is still committed and pushed, and unchanged data is still a no-op.