Skip to content
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): Fix podSpecPatch #5360

Merged
merged 3 commits into from
Mar 12, 2021
Merged

fix(controller): Fix podSpecPatch #5360

merged 3 commits into from
Mar 12, 2021

Conversation

alexec
Copy link
Contributor

@alexec alexec commented Mar 11, 2021

No description provided.

@alexec alexec changed the title fix(controller): Support YAML for podSpecPatch fix(controller): Support YAML for podSpecPatch Mar 11, 2021
if !util.ValidateJsonStr(tmpl.PodSpecPatch, spec) {
return nil, errors.New("", "Invalid PodSpecPatch String")
if err := json.Unmarshal([]byte(tmpl.PodSpecPatch), &apiv1.PodSpec{}); err != nil {
return nil, fmt.Errorf("invalid podSpecPatch %q: %w", tmpl.PodSpecPatch, err)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better diagnostic output

@@ -1004,39 +1004,16 @@ func ConvertYAMLToJSON(str string) (string, error) {

// PodSpecPatchMerge will do strategic merge the workflow level PodSpecPatch and template level PodSpecPatch
func PodSpecPatchMerge(wf *wfv1.Workflow, tmpl *wfv1.Template) (string, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplify merge to reduce bug

@alexec alexec changed the title fix(controller): Support YAML for podSpecPatch fix(controller): Fix podSpecPatch Mar 11, 2021
@alexec alexec marked this pull request as ready for review March 11, 2021 02:20
Copy link
Member

@terrytangyuan terrytangyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Looks much cleaner!

@alexec alexec added this to the v3.0 milestone Mar 11, 2021
@alexec alexec merged commit d828717 into argoproj:master Mar 12, 2021
@alexec alexec deleted the psp branch March 12, 2021 01:35
@simster7 simster7 mentioned this pull request Mar 15, 2021
27 tasks
simster7 pushed a commit that referenced this pull request Mar 16, 2021
@simster7 simster7 mentioned this pull request Mar 29, 2021
77 tasks
@simster7 simster7 mentioned this pull request Apr 19, 2021
50 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants