Repository navigation
Conversation
c1eb73e to
c65fee4
Compare
Signed-off-by: jsvk <[email protected]>
-f is used
Signed-off-by: jsvk <[email protected]>
mattfarina
left a comment
There was a problem hiding this comment.
The testing does not show a change in behavior to make sure it's preserved. The same golden output as a different situation is used. How can we tell when this is working and when not?
| name: "install with schema file, extra values from yaml, with errors", | ||
| cmd: "install schema testdata/testcharts/chart-with-schema -f testdata/testcharts/chart-with-schema/extra-values.yaml", | ||
| wantError: true, | ||
| golden: "output/schema-negative.txt", |
There was a problem hiding this comment.
This golden file is only used here. If it's not going to be used anymore, the schema-negative.txt file should be removed.
Why is the golden file being removed?
There was a problem hiding this comment.
apologies that looks like a temporary change i made during testing/development. I've closed this PR for now but if it's needed in the future, I will fix the above before reopening.
| // Same as above, but ensures this still works when '-f' is used: https://github.com/helm/helm/issues/12488 | ||
| name: "ensure nil/null values pass to subcharts delete values when '-f' is used", | ||
| cmd: fmt.Sprintf("template '%s' -f %s/values.yaml", deletevalchart, deletevalchart), | ||
| golden: "output/issue-9027.txt", |
There was a problem hiding this comment.
Why is this golden file the same as the test before it but the input is different? Should this have a different output and a different golden file?
There was a problem hiding this comment.
for this one it's intentional - the idea is to assert the -f doesn't change the behavior of how values.yaml is applied between these two scenarios. The other implication is that the new issue-9027.txt file is the new desired output for both scenarios.
admittedly it's confusing because for the test above this one, the values.yaml is implicit, and for this test it's using the same values.yaml file but just with an -f, which is what triggers the different behavior i wanted to address in this PR.
i could have
- maybe copied the
issue-9027.txtgolden file and named it more appropriately (issue-12488.txt) - updated both files to reflect the new (desired) behavior
- clarified that the only difference from the previous test is the use of
-fto pass the (same) values.yaml, and that the output should be the same
given that an alternate PR (#12879) has been merged to try and address this, I've closed this PR. if we end up needing this PR in the future, I will make those adjustments before reopening
|
closing since #12879 was merged, thanks all! |
What this PR does / why we need it:
closes #12488 (bug was also noted here: #12162 (comment))
related: #12879
This is another attempt at fixing issue #12488.
Upgrading Argo CD from v2.8.21 → v2.9.22 upgrades helm from v3.12.1 → v3.13.2, which is a version in which this bug was introduced.
This caused applications to break because of the difference in rendering behavior for the charts, and so the upgrade was rolled back.
The test reproduces one of the major issues that caused us to roll back, and the change makes the test pass.
Special notes for your reviewer:
While this does fix what is (at least from what I can tell) a bug, this also changes the behavior of the original
ToRenderValuesWithSchemaValidationto render withMergeValuesinstead ofCoalesceValueswhich does change the rendered output, at least back to what it was in v3.12.1. This seems like the original behavior before my PR may have been unintentionally introduced in #12162 but ideally @mattfarina if you could let me know if i'm missing something that would be fantasticIf applicable:
docs neededlabel should be applied if so)