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

Actually call PipelineSpec.Validate(). #1074

Merged
merged 2 commits into from
Jul 12, 2019

Conversation

EliZucker
Copy link
Member

@EliZucker EliZucker commented Jul 12, 2019

Changes

Call PipelineSpec.Validate() within Pipeline.Validate(), and add tests for Pipeline.Validate().

I was adding logic for array-specific template-string testing, and was confused why my validation wasn't working in my test cluster's pipelines. I eventually realized that PipelineSpec isn't actually being validated, despite all the existing code intended to do so 😆

You can check this yourself by deploying a pipeline with duplicate tasks. There is code and tests specifically written to catch this immediately via the webhook, but it will deploy fine if you actually try it.

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:

Release Notes

PipelineSpec verification fixed.

Call PipelineSpec.Validate() within Pipeline.Validate(), and add tests
for Pipeline.Validate().

Previously, none of the PipelineSpec validation logic was actually being called, but
the unit tests passed because they manually called PipelineSpec.Validate().
@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Jul 12, 2019
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 12, 2019
@EliZucker
Copy link
Member Author

/assign @imjasonh

@bobcatfish
Copy link
Collaborator

ooooooh boy.. thanks for catching this @EliZucker 😅😅😅🙏

/lgtm
/approve
/meow space

@tekton-robot
Copy link
Collaborator

@bobcatfish: cat image

In response to this:

ooooooh boy.. thanks for catching this @EliZucker 😅😅😅🙏

/lgtm
/approve
/meow space

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.

@tekton-robot tekton-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 12, 2019
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 12, 2019
Refactor tests so that success/failure testing is done within the same
function (specified with a bool). Also formatted brackets differently
following feeback from @imjasonh.
@imjasonh
Copy link
Member

/lgtm
/approve
/woof

Thanks for catching this! 👍

@tekton-robot
Copy link
Collaborator

@imjasonh: dog image

In response to this:

/lgtm
/approve
/woof

Thanks for catching 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.

@tekton-robot tekton-robot added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Jul 12, 2019
@EliZucker
Copy link
Member Author

@imjasonh I'm not sure how to get rid of the "change requested" message blocking merging. Is that resolved from my end or do you have to approve your requested changes?

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bobcatfish, EliZucker, ImJasonH

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:
  • OWNERS [ImJasonH,bobcatfish]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@imjasonh
Copy link
Member

@imjasonh I'm not sure how to get rid of the "change requested" message blocking merging. Is that resolved from my end or do you have to approve your requested changes?

That was me, sorry about that.

@EliZucker
Copy link
Member Author

EliZucker commented Jul 12, 2019

@imjasonh I'm not sure how to get rid of the "change requested" message blocking merging. Is that resolved from my end or do you have to approve your requested changes?

That was me, sorry about that.

No problem, I wasn't super familiar with that GitHub feature so wasn't sure what to do. Also, I did a super minor rewording on the commit message, so another lgtm is needed. Thanks!

@imjasonh
Copy link
Member

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 12, 2019
@tekton-robot tekton-robot merged commit ca6eadd into tektoncd:master Jul 12, 2019
@EliZucker EliZucker deleted the pipelinespecfix branch July 13, 2019 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants