Skip to content

Treat an identical compatibility update after pull as a no-op - #446

Merged
alisterburt merged 2 commits into
mainfrom
aburt/commit-after-pull-noop
Nov 4, 2026
Merged

alisterburt merged 2 commits into
mainfrom
aburt/commit-after-pull-noop

Conversation

@alisterburt

@alisterburt alisterburt commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

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, nothing is left staged, and git commit fails with nothing 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-index error.

The fix comes from @Str-Gen's earlier PR, which was closed before landing.

Testing

  • Reproduced against a local bare git remote: with an identical update already pushed by another runner, the current code fails with 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.

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.
@alisterburt
alisterburt marked this pull request as ready for review November 4, 2026 00:46
@alisterburt
alisterburt merged commit 5999d40 into main Nov 4, 2026
5 checks passed
@alisterburt
alisterburt deleted the aburt/commit-after-pull-noop branch November 4, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant