-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix: allow HTTP timeoutSeconds to accept templated strings. Fixes #15024 #15060
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
base: main
Are you sure you want to change the base?
fix: allow HTTP timeoutSeconds to accept templated strings. Fixes #15024 #15060
Conversation
a6205e5 to
423658c
Compare
Signed-off-by: Scott Melhop <[email protected]> Signed-off-by: Alan Clucas <[email protected]> Co-authored-by: Alan Clucas <[email protected]> Signed-off-by: Antonio Ceppellini <[email protected]>
…oproj#15024 Signed-off-by: Antonio Ceppellini <[email protected]>
450432e to
ecbf7df
Compare
Joibel
left a comment
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 am pretty sure that with the full CRDs installed this won't work, you'll still be restricted to an int in that field. You'd be able to see this in the test environment in codespaces/devcontainer or by writing an e2e test in test/e2e. You do have to change it to intOrString and run make codegen to change the CRDs.
Signed-off-by: Antonio Ceppellini <[email protected]>
I changed it following your suggestion and then i tried run i'm quite blocked, i think that i should touch something at codegen level but i'm not sure about it. generated file still treat timeoutSeconds as an int (i think that's normal if the codegen fails) |
Try removing the words Line 463 in b3f6269
rm -rf vendor if you get stuck running this step.
|
Thank you very much! :D Right now i'm facing a new problem when i followed your instructions, removed |
Fixes #15024
Motivation
The field
http.timeoutSecondsonly accepts int values.When a templated parameter is used (ex.
{{= asInt(...) }}), unmarshalling fails with a type error.This prevents users from templating
timeoutSecondsin WorkflowTemplates and Workflows.Modifications
UnmarshalJSONimplementation forHTTPinhttp_types.go.UnmarshalJSONaccepts numeric and string JSON values (30and"30")Verification
Tested:
go test ./pkg/apis/workflow/v1alpha1 -vDocumentation
.features/fix-http-timeoutseconds-templating.yaml