Repository navigation
Conversation
Member
|
@ljluestc please fix DCO issue. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
4 tasks done
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.
Helmfile fails with an assertion error when using
transformers,jsonPatches, orstrategicMergePatcheson a Helm chart that renders no resources. The error occurs because thechartifylibrary expects output files to exist, but whenhelm templateproduces no output (e.g., when a chart is conditionally disabled), the chartify process fails with:Root Cause
The issue happens in the
processChartificationfunction inpkg/state/state.go. When a chart renders no resources but has chartification operations configured, chartify attempts to process an empty output directory, triggering an assertion failure.Solution
Added error handling to detect the specific chartify assertion error and treat it as a no-op operation. When this error occurs:
Changes Made
1. Fixed
pkg/state/state.goc.Chartify()call2. Added Comprehensive Tests in
pkg/state/issue_1757_test.goTestIssue1757: Tests withtransformersconfigurationTestIssue1757_JSONPatches: Tests withjsonPatchesconfigurationPrepareChartscompletes successfully without errorsTest Coverage
The tests cover scenarios where:
enabled: falsein values, producing empty template outputtransformersorjsonPatches) are configuredBackward Compatibility
This change is fully backward compatible:
Verification
Run the following to verify the fix:
go test -v ./pkg/state -run TestIssue1757Both test cases should pass, confirming that the issue is resolved for both transformers and JSONPatches scenarios.
Related Issues