-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(pipeline): correct warning path for duplicate param name in pipeline tasks #7651
fix(pipeline): correct warning path for duplicate param name in pipeline tasks #7651
Conversation
Hi @l-qing. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -382,7 +382,7 @@ func validatePipelineTaskParameterUsage(tasks []PipelineTask, params ParamSpecs) | |||
} | |||
errs = errs.Also(validatePipelineParametersVariables(tasks, "params", allParamNames, arrayParamNames, objectParameterNameKeys)) | |||
for i, task := range tasks { | |||
errs = errs.Also(task.Params.validateDuplicateParameters().ViaFieldIndex("params", i)) | |||
errs = errs.Also(task.Params.validateDuplicateParameters().ViaField("params").ViaIndex(i)) |
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.
reference:
pipeline/pkg/apis/pipeline/v1/pipeline_validation.go
Lines 414 to 421 in e1c7828
func ValidatePipelineParameterVariables(ctx context.Context, tasks []PipelineTask, params ParamSpecs) (errs *apis.FieldError) { | |
// validates all the types within a slice of ParamSpecs | |
errs = errs.Also(ValidateParameterTypes(ctx, params).ViaField("params")) | |
errs = errs.Also(params.ValidateNoDuplicateNames()) | |
errs = errs.Also(params.validateParamEnums(ctx).ViaField("params")) | |
for i, task := range tasks { | |
errs = errs.Also(task.Params.validateDuplicateParameters().ViaField("params").ViaIndex(i)) | |
} |
/cc @lbernick |
/kind bug |
/ok-to-test |
/retest-required |
/approve |
@vdemeester: once the present PR merges, I will cherry-pick it on top of release-v0.56.x in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
Thanks for this fix @l-qing !
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JeromeJu, vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
@vdemeester: new pull request created: #7660 In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
fix #7650
This error message has been present since v0.48. fd09e49
Changes
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>
. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep/kind bug
Release Notes