temporary remove branch validation#571
Conversation
Signed-off-by: yashodgayashan <yashodgayashan@gmail.com>
📝 WalkthroughWalkthroughThis PR disables multiple release gating mechanisms in the release orchestration workflow. Branch existence validation now hardcodes true instead of checking remote refs, remote tag duplication checks are commented out, and the release branch creation job is unconditionally prevented from executing. ChangesRelease Workflow Guard Disabling
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release-orchestrator.yml:
- Around line 110-122: The temporary bypass in the "check-branch" step currently
forces branch-exists=true globally; narrow this to only the specific release
line you're unblocking by emitting BRANCH_EXISTS and the branch-exists output
only when the computed release name matches that exact value (e.g., compare
env.MAJOR/env.MINOR or the computed release branch string), otherwise run the
normal branch check. Update the "check-branch" step (id: check-branch) to
conditionally set echo "branch-exists=true" >> $GITHUB_OUTPUT and echo
"BRANCH_EXISTS=true" >> $GITHUB_ENV only for the targeted release branch,
leaving the original fail/guard logic for other MAJOR.MINOR combinations intact
so downstream steps like "Validate VERSION file" and "Determine commit to tag"
still see accurate branch existence.
- Around line 227-228: The if-condition currently short-circuits release branch
creation by prefixing the job-level conditional with "false &&", making
"action=branch" and parts of "action=full" unreachable; remove the "false &&"
short-circuit from the if expression and replace it with a targeted guard that
only disables branch creation for the specific exceptional case (e.g., check for
the existing release name like release-v1.1 or a dedicated input flag) so the
original condition (needs.validate.outputs.branch-exists == 'false' &&
(github.event.inputs.action == 'full' || github.event.inputs.action == 'branch')
&& github.event.inputs.pre_release_id == '') can run normally for new releases
while still blocking only the known existing-release case.
- Around line 142-150: Restore the commented "Check for existing tag" workflow
step so the job fails fast when releasing an already-published tag: re-enable
the step named "Check for existing tag" (the blocked run using TAG="${{
env.RELEASE_TAG }}" and git ls-remote origin "refs/tags/${TAG}"), keep its
condition if: ${{ github.event.inputs.action == 'full' ||
github.event.inputs.action == 'tag' }}, and ensure it prints a clear error
including ${TAG} and exits with non-zero status so downstream jobs like
build-and-test are skipped on duplicate tags.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 1eb55e13-1a6a-4c7f-801c-58c09b6f2c72
📒 Files selected for processing (1)
.github/workflows/release-orchestrator.yml
| # TEMP: branch check disabled — release-v1.1 already exists, hardcoding branch-exists=true. | ||
| - name: Check if release branch exists | ||
| id: check-branch | ||
| run: | | ||
| if git ls-remote origin "refs/heads/release-v${{ env.MAJOR }}.${{ env.MINOR }}" | head -1 | grep -q .; then | ||
| echo "branch-exists=true" >> $GITHUB_OUTPUT | ||
| echo "BRANCH_EXISTS=true" >> $GITHUB_ENV | ||
| else | ||
| echo "branch-exists=false" >> $GITHUB_OUTPUT | ||
| echo "BRANCH_EXISTS=false" >> $GITHUB_ENV | ||
| fi | ||
| echo "branch-exists=true" >> $GITHUB_OUTPUT | ||
| echo "BRANCH_EXISTS=true" >> $GITHUB_ENV | ||
|
|
||
| - name: Fail if tag mode without release branch | ||
| if: ${{ github.event.inputs.action == 'tag' && github.event.inputs.commit_sha == '' && steps.check-branch.outputs.branch-exists == 'false' }} | ||
| run: | | ||
| echo "ERROR: action=tag requires an existing release branch (release-v${{ env.MAJOR }}.${{ env.MINOR }}), but it does not exist." | ||
| exit 1 | ||
| # TEMP: tag-mode branch-existence guard disabled. | ||
| # - name: Fail if tag mode without release branch | ||
| # if: ${{ github.event.inputs.action == 'tag' && github.event.inputs.commit_sha == '' && steps.check-branch.outputs.branch-exists == 'false' }} | ||
| # run: | | ||
| # echo "ERROR: action=tag requires an existing release branch (release-v${{ env.MAJOR }}.${{ env.MINOR }}), but it does not exist." | ||
| # exit 1 |
There was a problem hiding this comment.
Scope this branch-exists bypass to the specific release line.
Hardcoding branch-exists=true here changes the workflow semantics for every major.minor, not just the temporary release-v1.1 case. For any future release line without an existing release-vX.Y, Validate VERSION file and Determine commit to tag will still try to read/fetch that remote branch and fail later with raw git errors, and the early action=tag guard is gone as well. Please gate the bypass to the exact version you’re unblocking instead of overriding the output globally.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/release-orchestrator.yml around lines 110 - 122, The
temporary bypass in the "check-branch" step currently forces branch-exists=true
globally; narrow this to only the specific release line you're unblocking by
emitting BRANCH_EXISTS and the branch-exists output only when the computed
release name matches that exact value (e.g., compare env.MAJOR/env.MINOR or the
computed release branch string), otherwise run the normal branch check. Update
the "check-branch" step (id: check-branch) to conditionally set echo
"branch-exists=true" >> $GITHUB_OUTPUT and echo "BRANCH_EXISTS=true" >>
$GITHUB_ENV only for the targeted release branch, leaving the original
fail/guard logic for other MAJOR.MINOR combinations intact so downstream steps
like "Validate VERSION file" and "Determine commit to tag" still see accurate
branch existence.
| # TEMP: existing-tag check disabled. | ||
| # - name: Check for existing tag | ||
| # if: ${{ github.event.inputs.action == 'full' || github.event.inputs.action == 'tag' }} | ||
| # run: | | ||
| # TAG="${{ env.RELEASE_TAG }}" | ||
| # if git ls-remote origin "refs/tags/${TAG}" | head -1 | grep -q .; then | ||
| # echo "ERROR: Tag ${TAG} already exists on remote. Remove it first if you want to retag." | ||
| # exit 1 | ||
| # fi |
There was a problem hiding this comment.
Keep the explicit existing-tag precheck.
With this disabled, rerunning a release for an already-published tag no longer fails fast. The workflow can now wait on build-and-test and only die much later during git tag/git push, with a less clear operator message. Restoring the remote tag check preserves the intended fail-fast behavior.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/release-orchestrator.yml around lines 142 - 150, Restore
the commented "Check for existing tag" workflow step so the job fails fast when
releasing an already-published tag: re-enable the step named "Check for existing
tag" (the blocked run using TAG="${{ env.RELEASE_TAG }}" and git ls-remote
origin "refs/tags/${TAG}"), keep its condition if: ${{
github.event.inputs.action == 'full' || github.event.inputs.action == 'tag' }},
and ensure it prints a clear error including ${TAG} and exits with non-zero
status so downstream jobs like build-and-test are skipped on duplicate tags.
| # TEMP: release branch creation disabled (release-v1.1 already exists). | ||
| if: ${{ false && needs.validate.outputs.branch-exists == 'false' && (github.event.inputs.action == 'full' || github.event.inputs.action == 'branch') && github.event.inputs.pre_release_id == '' }} |
There was a problem hiding this comment.
false && makes branch and half of full permanently unreachable.
Line 228 disables release-branch creation for all inputs, so action=branch can never work and action=full silently degrades into “tag only if the branch already exists.” That breaks future stable releases for new major.minor values. If this is only meant to unblock release-v1.1, gate it on that version instead of globally short-circuiting the job.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/release-orchestrator.yml around lines 227 - 228, The
if-condition currently short-circuits release branch creation by prefixing the
job-level conditional with "false &&", making "action=branch" and parts of
"action=full" unreachable; remove the "false &&" short-circuit from the if
expression and replace it with a targeted guard that only disables branch
creation for the specific exceptional case (e.g., check for the existing release
name like release-v1.1 or a dedicated input flag) so the original condition
(needs.validate.outputs.branch-exists == 'false' && (github.event.inputs.action
== 'full' || github.event.inputs.action == 'branch') &&
github.event.inputs.pre_release_id == '') can run normally for new releases
while still blocking only the known existing-release case.
|
Closing this as invalid |
Purpose
temporary remove branch validation
Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning
Summary by CodeRabbit