-
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
Make PipelineSpec/PipelineRef in PipelineRun consistent with TaskRun #1495
Make PipelineSpec/PipelineRef in PipelineRun consistent with TaskRun #1495
Conversation
c6c149e
to
ee162e2
Compare
/test pull-tekton-pipeline-integration-tests |
// Check that one of PipelineRef and PipelineSpec is present | ||
if ps.PipelineRef.Name == "" && ps.PipelineSpec == nil { | ||
return apis.ErrMissingField("spec.pipelineRef.name", "spec.pipelineSpec") | ||
// Check that one of PipelineRef and TaskSpec is present |
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.
Shouldn't this be PipelineSpec?
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.
Oups =)
} | ||
|
||
// Validate PipelineSpec if it's present | ||
// Validate TaskSpec if it's present |
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.
PipelineSpec?
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.
Oups =)
ee162e2
to
b0cd520
Compare
/test pull-tekton-pipeline-integration-tests |
1 similar comment
/test pull-tekton-pipeline-integration-tests |
I think this might solve #1498 ? |
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.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bobcatfish, dibyom 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 |
/test pull-tekton-pipeline-integration-tests |
/test pull-tekton-pipeline-integration-test |
/test pull-tekton-pipeline-integration-test |
/hold |
/test pull-tekton-pipeline-integration-tests |
/hold cancel |
Looks like YAML tests are timing out? |
@dibyom yeah, the |
/test pull-tekton-pipeline-integration-tests |
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.
Heh, I guess this is because TaskRef can be replaced by a TaskSpec.
Thanks for the cleanup!
third_party/VENDOR-LICENSE
Outdated
@@ -5402,6 +5402,33 @@ Import: github.com/tektoncd/pipeline/vendor/github.com/modern-go/reflect2 | |||
|
|||
|
|||
|
|||
=========================================================== |
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.
uh? why this change?
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.
@afrittoli not sure, ran ./hack/update-codegen.sh
and it added that 😓
This will close #1498 |
/test pull-tekton-pipeline-integration-tests |
7 similar comments
/test pull-tekton-pipeline-integration-tests |
/test pull-tekton-pipeline-integration-tests |
/test pull-tekton-pipeline-integration-tests |
/test pull-tekton-pipeline-integration-tests |
/test pull-tekton-pipeline-integration-tests |
/test pull-tekton-pipeline-integration-tests |
/test pull-tekton-pipeline-integration-tests |
thanks for these changes |
/test pull-tekton-pipeline-integration-tests |
b0cd520
to
013c8ab
Compare
In TaskRun, TaskRef can be nil, which was not the case for PipelineRun (and PipelineRef). This fixes that by making the two consistent. Signed-off-by: Vincent Demeester <[email protected]>
013c8ab
to
19070c7
Compare
ctx, err := tag.New( | ||
context.Background(), | ||
tag.Insert(r.pipeline, pr.Spec.PipelineRef.Name), |
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.
The failure was legit 😅 this was putting the controller in a crashloop 😝
The following is the coverage report on pkg/.
|
/lgtm |
Changes
In TaskRun, TaskRef can be nil, which was not the case for
PipelineRun (and PipelineRef). This fixes that by making the two consistent.
Note that we could do the opposite (aka change how it works in
TaskRun
).Signed-off-by: Vincent Demeester [email protected]
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.