Skip to content

Retry the push of the binaries when another job pushed first, in one line for PowerShell and bash - #1345

Merged
uNetworkingAB merged 1 commit into
uNetworking:masterfrom
nigrosimone:push-retry
Oct 1, 2026
Merged

uNetworkingAB merged 1 commit into
uNetworking:masterfrom
nigrosimone:push-retry

Conversation

@nigrosimone

Copy link
Copy Markdown
Contributor

Same goal as #1334, without its two problems: the runs stay parallel, and nothing new runs on Windows.

Build and Build ASAN sometimes fail at the push after the build and the tests passed, because another job pushed to binaries in between, and that platform keeps the old binaries until the next merge.

Now a rejected push takes the other commit and tries again, up to three times. It is one line of git with && and ||, which PowerShell 7 and bash read the same way, left to right. -X theirs keeps this job's version of a file both changed, like source_commit.

Tested on my fork with the four runners of build.yml pushing to one branch in the same second, each in its default shell (run): one went in at the first try, two at the second, macOS at the third, and the branch had all four files.

@nigrosimone
nigrosimone marked this pull request as ready for review October 1, 2026 17:39
@uNetworkingAB
uNetworkingAB merged commit a6b022b into uNetworking:master Oct 1, 2026
1 of 2 checks passed
@uNetworkingAB

Copy link
Copy Markdown
Contributor

I like this. Minimal complexity, cross platform, no new deps or assumptions

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.

2 participants