Skip to content

fix(git-merge-pr): treat merge errors as transient when wait=true - #6447

Closed
AruneshDwivedi wants to merge 1 commit into
akuity:mainfrom
AruneshDwivedi:fix/git-merge-pr-405-retry
Closed

AruneshDwivedi wants to merge 1 commit into
akuity:mainfrom
AruneshDwivedi:fix/git-merge-pr-405-retry

Conversation

@AruneshDwivedi

@AruneshDwivedi AruneshDwivedi commented Jun 14, 2026 •

Copy link
Copy Markdown

When git-merge-pr is configured with wait: true and the GitHub merge API returns a 405 (e.g. "Required status check is expected"), the step now returns Running status instead of Failed. The 405 means the merge is blocked by a status check that hasn't completed yet -- it's transient, not a permanent failure.

Previously, a single 405 would terminate the entire wait loop. Now it keeps polling until the merge succeeds or a non-transient error occurs.

Fixes #5761

When git-merge-pr is configured with wait:true and the merge API returns
an error (e.g. 405 "Required status check is expected"), the step returns
Running status instead of Failed+TerminalError so it retries on the next
reconciliation.

Previously, any error from MergePullRequest was treated as terminal, even
when wait was enabled. This caused promotions to fail permanently on the
first attempt when CI status checks were still pending.

Fixes akuity#6397

Signed-off-by: Arunesh Dwivedi <[email protected]>
@AruneshDwivedi
AruneshDwivedi requested a review from a team as a code owner June 14, 2026 03:54
@netlify

netlify Bot commented Jun 14, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for docs-kargo-io ready!

Name Link
🔨 Latest commit 655034a
🔍 Latest deploy log https://app.netlify.com/projects/docs-kargo-io/deploys/6a2e25ef0055b20008e7dc9a
😎 Deploy Preview https://deploy-preview-6447.docs.kargo.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kargo-governance-bot kargo-governance-bot Bot added kind/bug Something isn't working as intended; If unsure that something IS a bug, start a discussion instead needs/area Issue or PR needs to be labeled to indicate what parts of the code base are affected needs/priority Priority has not yet been determined; a good signal that maintainers aren't fully committed labels Jun 14, 2026
@EronWright

Copy link
Copy Markdown
Contributor

@AruneshDwivedi thanks again for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working as intended; If unsure that something IS a bug, start a discussion instead needs/area Issue or PR needs to be labeled to indicate what parts of the code base are affected needs/priority Priority has not yet been determined; a good signal that maintainers aren't fully committed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

git-merge-pr: 'Base branch was modified' 405 should be retryable when wait=true

2 participants