fix(ci): force-push bump branch to handle pre-existing remote#562
Merged
Conversation
Contributor
CI Test ResultsRun: #26639187778 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 32 | Passed: 32 | Failed: 0 Updated: 2026-05-29 13:26:45 UTC |
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.
What does this PR do?:
Changes the bump-branch push in
release.shfrom a plain push to--force-with-lease, so it succeeds when the remote branch already exists from a previous partial release run.Motivation:
After the fix in #561 (skip tag/branch creation when the tag already exists), the
create-releasejob now advances to the version-bump step correctly. However, the bump branch (e.g.automated/bump-1-44-0) may already exist on the remote from the previous run, causing a non-fast-forward rejection:--force-with-leaseis safe here: the branch is always machine-generated with no human commits, and the lease ensures we don't clobber unexpected pushes from a third party.Additional Notes:
This is a follow-up to #561, completing the recovery path for a release where the previous run left a stale bump branch.
How to test the change?:
Trigger the
Validated Releaseworkflow (release_type=minor,dry_run=false) when both the version tag and the bump branch already exist on the remote — the job should complete without error.For Datadog employees:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance.