-
Notifications
You must be signed in to change notification settings - Fork 7k
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
fix(template): helm template "--show-only" flag producing duplicates when flag used more than once #7204
fix(template): helm template "--show-only" flag producing duplicates when flag used more than once #7204
Conversation
32cb1aa
to
df1a6d3
Compare
Signed-off-by: Lee Bontecou <lbontecou@thezebra.com>
df1a6d3
to
459a63c
Compare
Thanks! Would you mind writing some unit tests to cover this? Have a look at template_test.go for some examples. Let me know if you have any questions. |
testdata output can be generated by running
Run this once the unit test is created, and the testdata output will be generated for you. |
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.
@hoboken515 Fix looks good, thanks for this. As suggested by @bacongobbler in #7204 (comment), I think unit test on this would be useful.
I want to create the tests for this, may take me awhile to find the time / get up to speed on how to do so in the code base. Thanks for the inputs on how to do that @bacongobbler |
@bacongobbler @hickeyma unittests added |
Signed-off-by: Lee Bontecou <lbontecou@thezebra.com>
197513c
to
226a9a5
Compare
Signed-off-by: Lee Bontecou <lbontecou@thezebra.com>
Signed-off-by: Lee Bontecou <lbontecou@thezebra.com>
Signed-off-by: Lee Bontecou <lbontecou@thezebra.com>
@hoboken515 Can you rebase to fix the conflicts? |
Signed-off-by: Lee Bontecou <lbontecou@thezebra.com>
Signed-off-by: Lee Bontecou <lbontecou@thezebra.com>
a478e1d
to
eb96f3f
Compare
rebased |
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.
LGTM, thanks for catching and fixing this @hoboken515
…when flag used more than once (helm#7204) * bugfix template show-only duplicates Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * 7203 - add unittests Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * attempt formatting fix Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * gofmt-ed with -s Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * goimports-ed with -local helm.sh/helm/v3 and gofmt-ed with -s -w Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * Update template_test.go Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * Update template_test.go Signed-off-by: Lee Bontecou <lbontecou@thezebra.com>
…when flag used more than once (helm#7204) * bugfix template show-only duplicates Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * 7203 - add unittests Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * attempt formatting fix Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * gofmt-ed with -s Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * goimports-ed with -local helm.sh/helm/v3 and gofmt-ed with -s -w Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * Update template_test.go Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * Update template_test.go Signed-off-by: Lee Bontecou <lbontecou@thezebra.com>
…when flag used more than once (helm#7204) * bugfix template show-only duplicates Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * 7203 - add unittests Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * attempt formatting fix Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * gofmt-ed with -s Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * goimports-ed with -local helm.sh/helm/v3 and gofmt-ed with -s -w Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * Update template_test.go Signed-off-by: Lee Bontecou <lbontecou@thezebra.com> * Update template_test.go Signed-off-by: Lee Bontecou <lbontecou@thezebra.com>
Issue
#7203
Summary
--execute
parameters to the new--show-only
parameter that was listed as being equivalent.helm template <name> <chart> --show-only template1.yaml --show-only template2.yaml --values values.yaml | kubectl replace --force -f -
commands failing due to "Resource already exists" errors.Solution
make
and./bin/helm