fix(ci): handle new tags in server release workflow (#1660)#1661
Merged
miguelg719 merged 1 commit intomainfrom Feb 4, 2026
Merged
fix(ci): handle new tags in server release workflow (#1660)#1661miguelg719 merged 1 commit intomainfrom
miguelg719 merged 1 commit intomainfrom
Conversation
# why The git fetch command was failing with exit code 128 when trying to fetch a tag that doesn't exist on the remote yet (which is the case for new releases). This caused the entire release workflow to fail. # what changed Added `|| true` to allow the fetch to fail gracefully for new tags. The subsequent git rev-parse correctly handles both cases: - Existing tag: script exits with "Tag already exists" message - New tag: script proceeds to create and push the new tag Fixes: https://github.com/browserbase/stagehand/actions/runs/21644437387 # test plan <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes the server release workflow failing on new tags by allowing git fetch to fail gracefully when the tag doesn’t exist yet. Prevents release runs from stopping with exit code 128. - **Bug Fixes** - Added || true to git fetch for refs/tags/${TAG} to ignore missing remote tag errors. - Existing tag: logs “Tag already exists” and exits; new tag: proceeds to create and push. <sup>Written for commit 5e25d90. Summary will update on new commits. <a href="https://cubic.dev/pr/browserbase/stagehand/pull/1660">Review in cubic</a></sup> <!-- End of auto-generated description by cubic. --> --------- Co-authored-by: Chromie Bot <chromie@browserbase.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Miguel <36487034+miguelg719@users.noreply.github.com>
|
Contributor
Greptile OverviewGreptile SummaryFixed git fetch failure for new tags in the server release workflow by adding graceful error handling.
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant GHA as GitHub Actions
participant Git as Git Commands
participant Remote as Remote Repository
participant Local as Local Repository
GHA->>Git: Configure git user
Git->>Local: Set user.name and user.email
GHA->>Git: Fetch tag from remote
Git->>Remote: git fetch --force origin "refs/tags/${TAG}:refs/tags/${TAG}"
alt Tag exists on remote
Remote-->>Git: Tag found
Git-->>Local: Update local tag reference
Git-->>GHA: Success (exit 0)
else Tag doesn't exist on remote (new release)
Remote-->>Git: Error 128 (tag not found)
Note over Git: 2>/dev/null suppresses error message
Note over Git: || true converts exit code to 0
Git-->>GHA: Success (exit 0)
end
GHA->>Git: Check if tag exists locally
Git->>Local: git rev-parse -q --verify "refs/tags/${TAG}"
alt Tag exists locally
Local-->>Git: Tag found
Git-->>GHA: Tag exists
GHA->>GHA: Exit (no action needed)
else Tag doesn't exist locally
Local-->>Git: Tag not found
Git-->>GHA: Tag doesn't exist
GHA->>Git: Create new tag
Git->>Local: git tag -a "${TAG}" "${TARGET_SHA}"
GHA->>Git: Push tag to remote
Git->>Remote: git push origin "${TAG}"
Remote-->>Git: Tag pushed successfully
Git-->>GHA: Success
end
|
pirate
approved these changes
Feb 4, 2026
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.
why
The git fetch command was failing with exit code 128 when trying to fetch a tag that doesn't exist on the remote yet (which is the case for new releases). This caused the entire release workflow to fail.
what changed
Added
|| trueto allow the fetch to fail gracefully for new tags. The subsequent git rev-parse correctly handles both cases:test plan
Summary by cubic
Prevented the server release workflow from failing on new releases by letting git fetch ignore missing remote tags. Existing tags exit with a clear message; new tags proceed to be created and pushed.
Written for commit d71339d. Summary will update on new commits. Review in cubic