fix(orchestrate): retry state-write push on a non-fast-forward trunk - #451
Merged
Merged
Conversation
joshua-temple
force-pushed
the
fix/orchestrator-state-retry-land
branch
from
July 5, 2026 01:31
5d6c0aa to
371b5fe
Compare
commitAndPush wrote orchestrator state to trunk with a plain git push and no retry, so a concurrent state writer or an automated skip-CI commit that advanced trunk between checkout and push failed the run outright with a non-fast-forward rejection. The promote and hotfix finalizers already rebase-and-retry the same state write (git.CommitAndPushWithRetry). Route the orchestrator state push through the same optimistic retry: on a rejected push, rebase onto the advanced upstream and retry, up to three attempts. The retry backoff is injectable so the regression test stays fast. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
joshua-temple
force-pushed
the
fix/orchestrator-state-retry-land
branch
from
July 5, 2026 02:41
371b5fe to
ae10b79
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.
Problem
Orchestrator.commitAndPushwrote pipeline state to trunk with a plaingit add,git commit, andgit push, without the optimistic-lock or rebase-retry that the promote finalizer path already uses. If a concurrent state writer or a[skip ci]commit advanced trunk between checkout and push, the push was non-fast-forward and the orchestrate run failed outright with no retry.Fix
Route the orchestrator state write through the existing push-with-retry path so a non-fast-forward trunk is retried behind a rebase instead of failing the run, making the two state-write paths consistent.
Verification
go build ./...,go test ./... -race -count=1, andgolangci-lint run ./...all clean locally, including a new test that exercises the non-fast-forward retry path.