-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 helm deployer with imageStrategy helm and fix test runner #2887
Fix helm deployer with imageStrategy helm and fix test runner #2887
Conversation
Codecov Report
|
Thank you for our change @michaelbeaumont. |
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.
Please highlight the output line changes in the PR like
#2811
I've edited the PR description to better describe the two bugs. Again, note that in my PR I've reactivated two tests so that they completely run. which fail on Before
After
|
@michaelbeaumont would you be up for writing unit test for this? Thanks |
@tejal29 as mentioned, unit tests already exist that do catch this bug and would have caught it: skaffold/pkg/skaffold/deploy/helm_test.go Lines 363 to 373 in 95d28f4
skaffold/pkg/skaffold/deploy/helm_test.go Lines 381 to 386 in 95d28f4
but they were turned off because of a bug in the test runner itself causing these assertions not to be checked. skaffold/pkg/skaffold/deploy/helm_test.go Lines 544 to 545 in 95d28f4
so I'm not sure there's any unit tests to write here... |
@michaelbeaumont, Thanks for the clarification. I actually want to write a test to give different
And then add tests for this small function with all possible |
@michaelbeaumont Our next skaffold release is this Thursday. We really want to get this fix in. Would you be able to merge this in by Wednesday? Thanks |
@tejal29 I gave it a shot! |
Thanks a ton! I have to head out right now. i will take a look tomorrow. |
@michaelbeaumont Looks beautiful! The tests are so much easy to follow. Thank you for doing this! |
@tejal29 @michaelbeaumont SETUP:
But in this scenario I have to write a _helper.tpl entry that checks if the field If on the other hand I deploy using
Is this the intended way or should the hash somehow be appended to the tag? (as it currently is without the |
@GregorPirolt check out #2956 |
This PR fixes #2902 and another bug revealed after fixing the first.
The first is deploying with helm with the following config
skaffold.yaml
when we deploy with helm we get
because of a bug introduced changing the format string from 4899ae5#diff-5c13a6850c742c6b4fa07cf1f6aeb088L210 into 4899ae5#diff-5c13a6850c742c6b4fa07cf1f6aeb088R291
After fixing this bug, we get the following incorrect
helm
commandbecause of the exact same change where
extractTag
was removed.These were both missed because of 4899ae5#diff-a1535a4f321ed1903fdc7f27ac166432L534
where some tests were no longer executed.
ORIGINAL:
To be honest, I'm not totally sure whether the behavior is correct in all possible cases here, given #2697 and #1379 and given the PR #2624 but the tests are all passing (and running) now and
skaffold
is working for us again.