BAC-470 - Fail if Helm release exists in both v2 and v3#65
Open
BAC-470 - Fail if Helm release exists in both v2 and v3#65
Conversation
Check both Helm versions before proceeding. If the same release exists in both Helm v2 and Helm v3, fail with an error message indicating the invalid state that needs to be cleaned up. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
WalkthroughRefactored the Helm detection script to independently detect Helm v3 and v2 in parallel, capture per-version outcomes and manifests, add explicit cross-version conflict and non-not-found error handling, and expose per-version globals for chart names and backup manifest paths. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/scripts/detect_helm_version.sh`:
- Around line 128-134: The detect_helmv3 and detect_helmv2 functions currently
toggle set -e which can cause the caller to exit before capturing their return
codes; modify each function to save the caller's errexit state at entry (e.g.
local _errexit_set=$(set -o | grep errexit) or inspect $- for 'e'), then safely
enable/disable errexit as needed inside the function, and finally restore the
original errexit state before returning so callers can reliably read the
function's exit code; alternatively remove internal toggling and let callers
control errexit—update detect_helmv3 and detect_helmv2 accordingly.
- Use separate backup manifest files for v2 and v3 - Use global variables CHART_NAME_V2 and CHART_NAME_V3 - Remove write_result from detect functions - Centralize write_result call in detect_helm_version Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
Summary
Jira Ticket
https://tiendanube.atlassian.net/browse/BAC-470
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Refactor
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.