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

refactor pipelineTask validation #3848

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

pritidesai
Copy link
Member

@pritidesai pritidesai commented Mar 23, 2021

Changes

Introducing pipelineTask and pipelineTaskList validation receiver functions to simplify the way tasks are validated for taskRef and taskSpec.

This is a pure refactoring, no functional changes expected.

/kind cleanup

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Includes tests (if functionality changed/added)
  • Includes docs (if user facing)
  • Commit messages follow commit message best practices
  • Release notes block has been filled in or deleted (only if no user facing changes)

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

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.

Release Notes

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Mar 23, 2021
@tekton-robot tekton-robot requested review from dibyom and imjasonh March 23, 2021 22:05
@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 23, 2021
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_types.go 91.1% 95.7% 4.5
pkg/apis/pipeline/v1beta1/pipeline_validation.go 99.6% 100.0% 0.4

@pritidesai pritidesai force-pushed the validation-refactor-02 branch from 28c118f to 23eedcd Compare March 23, 2021 22:18
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_types.go 91.1% 95.6% 4.5
pkg/apis/pipeline/v1beta1/pipeline_validation.go 99.6% 100.0% 0.4

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

I like this refactoring 👍🏼 one question though 🙃

pkg/apis/pipeline/v1beta1/pipeline_types.go Outdated Show resolved Hide resolved
@pritidesai pritidesai force-pushed the validation-refactor-02 branch from 23eedcd to 916d2a9 Compare March 25, 2021 02:54
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_types.go 91.1% 95.7% 4.6
pkg/apis/pipeline/v1beta1/pipeline_validation.go 99.6% 100.0% 0.4

@pritidesai pritidesai force-pushed the validation-refactor-02 branch from 916d2a9 to c5dd6c8 Compare March 25, 2021 02:58
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_types.go 91.1% 95.7% 4.6
pkg/apis/pipeline/v1beta1/pipeline_validation.go 99.6% 100.0% 0.4

@pritidesai
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

Looks good, few "naming" remarks/questions 😉

pkg/apis/pipeline/v1beta1/pipeline_types.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1beta1/pipeline_types.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1beta1/pipeline_types.go Outdated Show resolved Hide resolved
pkg/apis/pipeline/v1beta1/pipeline_types.go Outdated Show resolved Hide resolved
@pritidesai pritidesai force-pushed the validation-refactor-02 branch 2 times, most recently from 3fc8a79 to c5b80f3 Compare March 25, 2021 20:44
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_types.go 91.1% 95.6% 4.5
pkg/apis/pipeline/v1beta1/pipeline_validation.go 99.6% 100.0% 0.4

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_types.go 91.1% 95.6% 4.5
pkg/apis/pipeline/v1beta1/pipeline_validation.go 99.6% 100.0% 0.4

@pritidesai
Copy link
Member Author

thanks @vdemeester for the feedback, the new changes are much easier to read now 🙏

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 29, 2021
@pritidesai pritidesai force-pushed the validation-refactor-02 branch from c5b80f3 to d186bd1 Compare March 29, 2021 15:54
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_types.go 91.1% 95.6% 4.5
pkg/apis/pipeline/v1beta1/pipeline_validation.go 99.6% 100.0% 0.4

Introducing validate pipelineTask and pipelineTaskList reciever functions
to simplify the way tasks are validated for taskRef and taskSpec
@pritidesai pritidesai force-pushed the validation-refactor-02 branch from d186bd1 to 2862cd1 Compare March 29, 2021 16:11
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_types.go 91.1% 95.6% 4.5
pkg/apis/pipeline/v1beta1/pipeline_validation.go 99.6% 100.0% 0.4

@pritidesai
Copy link
Member Author

/retest

@ghost
Copy link

ghost commented Mar 29, 2021

/lgtm

@tekton-robot tekton-robot assigned ghost Mar 29, 2021
@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 29, 2021
@pritidesai
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

@pritidesai
Copy link
Member Author

one more attempt to retest 🤞

/test pull-tekton-pipeline-integration-tests

@tekton-robot tekton-robot merged commit 46372f3 into tektoncd:main Mar 29, 2021
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants