Fix helm deployer with imageStrategy helm and fix test runner#2887
Fix helm deployer with imageStrategy helm and fix test runner#2887tejal29 merged 4 commits intoGoogleContainerTools:masterfrom michaelbeaumont:mb/helm_fixes
Conversation
Codecov Report
|
|
Thank you for our change @michaelbeaumont. |
|
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 BeforeAfter |
|
@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.yamlwhen 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
helmcommandbecause of the exact same change where
extractTagwas 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
skaffoldis working for us again.