-
Notifications
You must be signed in to change notification settings - Fork 753
Implement guardrail to check for existing branches #16132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added a guardrail step to prevent overwriting existing branches in the Apple workflow to accidental avoid binaries overwrite on S3.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/16132
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 Unrelated FailureAs of commit 3b7a11a with merge base 488d761 ( NEW FAILURES - The following jobs have failed:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a guardrail check to the Apple workflow that prevents overwriting existing branches and associated S3 binaries. The check runs early in the set-version job before expensive build operations begin, verifying that the generated swiftpm-{VERSION} branch doesn't already exist on the remote repository.
Key Changes:
- Added guardrail step in
set-versionjob to check for existing remote branches - Prevents workflow execution when a version-specific branch already exists
- Provides clear error message instructing users to delete the branch before re-running
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: | | ||
| VERSION="1.1.0.$(TZ='PST8PDT' date +%Y%m%d)" | ||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
| - name: Guardrail |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The step name "Guardrail" is vague. Consider a more descriptive name like "Check for existing branch" or "Prevent branch overwrite" to better indicate the step's purpose.
| - name: Guardrail | |
| - name: Check for existing branch |
GregoryComer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Copilot nit about the name seems reasonable but it's your call.
Added a guardrail step to prevent overwriting existing branches in the Apple workflow to avoid accidental binaries overwrite on S3.