-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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): keep special characters in json string when use withItems #4814
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.
LGTM
Can you please sign-off your commits for the DCO check? |
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.
Commits need to be signed-off.
…Items Signed-off-by: cocotyty <cocotyty@sina.com>
Done. |
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
Phew! |
…Items (#4814) Signed-off-by: cocotyty <cocotyty@sina.com>
Fix for this is out now in https://github.com/argoproj/argo/releases/tag/v2.12.4 |
…use withItems (argoproj#4814)" This reverts commit adfa988. Signed-off-by: Alex Collins <alex_collins@intuit.com>
Checklist:
https://github.com/argoproj/argo/blob/4eaae251d9147b53604481237732bff36a16a91e/workflow/controller/operator.go#L2729
When
WithItems
setting a array of object json, and one json field value contains a&
or other char which will becomes \uxxxx in json, the value in template execute will be wrong!For example, my command is
curl http://xx/x?a=b&c=d
. it will becomescurl http://xx/x?a=b\u0026c=d
.When generate replaceMap , the value is
https://github.com/argoproj/argo/blob/4eaae251d9147b53604481237732bff36a16a91e/pkg/apis/workflow/v1alpha1/item.go#L67
This must not only remove quote , it must be
unmarshal
.