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

TEP-0118: Add validation for matrix include pipeline parameter variables #6235

Merged

Conversation

EmmaMunley
Copy link
Contributor

@EmmaMunley EmmaMunley commented Feb 27, 2023

[TEP-0090: Matrix] introduced Matrix to the PipelineTask specification such that the PipelineTask executes a list of TaskRuns or Runs in parallel with the specified list of inputs for a Parameter or with different combinations of the inputs for a set of Parameters.

To build on this TEP-0018 introduced Matrix.Include, which allows passing in a specific combinations of Parameters into the Matrix.

This PR validates that matrix pipeline parameter variables including include params that may contain the reference(s) to other params are used appropriately.

Note: This is still in preview mode. Other forms of validation and implementation logic will be added in subsequent commits.

/kind feature

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Has Docs included if any changes are user facing
  • Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/feature Categorizes issue or PR as related to a new feature. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 27, 2023
@EmmaMunley EmmaMunley force-pushed the validate-matrix-pipeline-params branch from 0c8a02b to 1ccb9a3 Compare February 27, 2023 17:09
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 27, 2023
@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/v1/param_types.go 98.3% 95.1% -3.2
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 95.0% -3.2

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/param_types.go 98.3% 95.1% -3.2
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 95.0% -3.2

@EmmaMunley
Copy link
Contributor Author

/retest

@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/v1/param_types.go 98.3% 95.3% -3.0
pkg/apis/pipeline/v1beta1/param_types.go 98.3% 95.3% -3.1

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/param_types.go 98.3% 95.3% -3.0
pkg/apis/pipeline/v1beta1/param_types.go 98.3% 95.3% -3.1

@jerop jerop added this to the Pipelines v0.46 milestone Feb 28, 2023
Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

please add tests for validating pipeline parameter variables in matrix.include

pkg/apis/pipeline/v1/param_types.go Outdated Show resolved Hide resolved
@tekton-robot tekton-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 28, 2023
@EmmaMunley EmmaMunley force-pushed the validate-matrix-pipeline-params branch from 595eae1 to db65e9f Compare March 1, 2023 15:25
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 1, 2023
@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/param_types.go 98.3% 95.3% -3.0
pkg/apis/pipeline/v1beta1/param_types.go 98.3% 95.3% -3.1

@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/v1/param_types.go 98.3% 95.3% -3.0
pkg/apis/pipeline/v1beta1/param_types.go 98.3% 95.3% -3.1

@EmmaMunley EmmaMunley force-pushed the validate-matrix-pipeline-params branch from db65e9f to 54de46d Compare March 1, 2023 17:56
@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/v1/param_types.go 98.3% 98.4% 0.1
pkg/apis/pipeline/v1beta1/param_types.go 98.3% 98.4% 0.1

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/param_types.go 98.3% 98.4% 0.1
pkg/apis/pipeline/v1beta1/param_types.go 98.3% 98.4% 0.1

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 1, 2023
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerop, pritidesai

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

@EmmaMunley EmmaMunley force-pushed the validate-matrix-pipeline-params branch from e897520 to b16f9fa Compare March 6, 2023 20:55
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 6, 2023
@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/v1/param_types.go 99.1% 99.1% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 99.1% 99.1% 0.0

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/param_types.go 99.1% 99.1% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 99.1% 99.1% 0.0

@Yongxuanzhang
Copy link
Member

Maybe update the pr description to remove the note if you've finished the work

@EmmaMunley EmmaMunley force-pushed the validate-matrix-pipeline-params branch from b16f9fa to f275010 Compare March 6, 2023 22:06
@EmmaMunley
Copy link
Contributor Author

Maybe update the pr description to remove the note if you've finished the work

@Yongxuanzhang The Matrix Include feature is still in preview mode. This is one of the last 2 PRs for adding validation. :)

@EmmaMunley EmmaMunley requested review from pritidesai and removed request for bobcatfish March 6, 2023 22:09
@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/v1/param_types.go 99.1% 99.0% -0.1
pkg/apis/pipeline/v1beta1/param_types.go 99.1% 99.0% -0.1

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/param_types.go 99.1% 99.0% -0.1
pkg/apis/pipeline/v1beta1/param_types.go 99.1% 99.0% -0.1

@Yongxuanzhang
Copy link
Member

Maybe update the pr description to remove the note if you've finished the work

@Yongxuanzhang The Matrix Include feature is still in preview mode. This is one of the last 2 PRs for adding validation. :)

Oh I thought "This" means this PR, 😂

…ude Matrix.Include.Params

[TEP-0090: Matrix] introduced `Matrix` to the `PipelineTask` specification such that the `PipelineTask` executes a list of `TaskRuns` or `Runs` in parallel with the specified list of inputs for a `Parameter` or with different combinations of the inputs for a set of `Parameters`.

To build on this, Tep-0018 introduced Matrix.Include, which allows passing in a specific combinations of `Parameters` into the `Matrix`.

This commit validates that matrix pipeline parameter variables  including include params that may contain the reference(s) to other params are used appropriately.

Note: This is still in preview mode. Other forms of validation and implementation logic will be added in subsequent commits.
@EmmaMunley EmmaMunley force-pushed the validate-matrix-pipeline-params branch from f275010 to e7cdfec Compare March 6, 2023 23:27
Copy link
Member

@QuanZhang-William QuanZhang-William left a comment

Choose a reason for hiding this comment

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

Thanks @EmmaMunley !

/lgtm

@tekton-robot
Copy link
Collaborator

@QuanZhang-William: changing LGTM is restricted to collaborators

In response to this:

Thanks @EmmaMunley !

/lgtm

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.

@QuanZhang-William
Copy link
Member

/assign

@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/v1/param_types.go 99.1% 99.0% -0.1
pkg/apis/pipeline/v1beta1/param_types.go 99.1% 99.0% -0.1

@tekton-robot
Copy link
Collaborator

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

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1/param_types.go 99.1% 99.0% -0.1
pkg/apis/pipeline/v1beta1/param_types.go 99.1% 99.0% -0.1

@EmmaMunley
Copy link
Contributor Author

/retest

Copy link
Member

@lbernick lbernick left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 7, 2023
@tekton-robot tekton-robot merged commit 66dff32 into tektoncd:main Mar 7, 2023
@EmmaMunley EmmaMunley deleted the validate-matrix-pipeline-params branch April 19, 2023 15:31
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/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. 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.

7 participants