-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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(controller): prepend script path to the script template args. Resolves #4481 #4492
Conversation
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.
@alexec The function extractMainCtrFromScriptTemplate
that I wrote could also be used by the test TestScriptTemplateWithoutVolumeOptionalArtifact
, which was previously written inside workflowpod_test.go
. Let me know if you want me to update the PR with those changes.
@@ -69,6 +69,87 @@ func TestScriptTemplateWithVolume(t *testing.T) { | |||
assert.NoError(t, err) | |||
} | |||
|
|||
var scriptTemplateWithArgsAndWithSource = ` |
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.
I thought I'd never say this, but there is a first time for everything.
I think you've written TOO many tests.
I think you only need to test `extractMainCtrFromScriptTemplate.
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.
Haha yeah probably, no problem I'll delete those that don't test extractMainCtrFromScriptTemplate
explicitly.
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.
cool - I'll mark this as "Draft" while you do that
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.
Here you go, I left only 2 tests which cover extractMainCtrFromScriptTemplate
. One for when script source is specified, and the other one when the source is empty.
So I deleted those unnecessary tests that you pointed out, and now some existing tests that were passing before are failing. And everything is passing locally. |
Signed-off-by: ivancili <[email protected]>
Signed-off-by: ivancili <[email protected]>
Signed-off-by: ivancili <[email protected]>
Signed-off-by: ivancili <[email protected]>
Signed-off-by: ivancili <[email protected]>
Signed-off-by: ivancili <[email protected]>
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
…olves argoproj#4481 (argoproj#4492) Signed-off-by: ivancili <[email protected]> Signed-off-by: Alex Capras <[email protected]>
Signed-off-by: ivancili [email protected]
Checklist:
Resolves #4481