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-0144] Validate TaskRun for Param Enum #7326

Merged

Conversation

QuanZhang-William
Copy link
Member

Changes

Part of #7270. In TEP-0144 we proposed a new enum field to support built-in param input validation.

This commit adds validation logic for TaskRun against Param Enum

/kind feature

Submitter Checklist

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

  • Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • 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). See some examples of good release notes.
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

[WIP] Implement Param Enum validation for TaskRuns

@tekton-robot
Copy link
Collaborator

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@tekton-robot tekton-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Nov 2, 2023
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 2, 2023
@QuanZhang-William
Copy link
Member Author

/test all

@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.5% 98.5% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.8% 98.8% 0.0
pkg/reconciler/taskrun/taskrun.go 85.4% 85.5% 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.5% 98.5% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.8% 98.8% 0.0
pkg/reconciler/taskrun/taskrun.go 85.4% 85.5% 0.1

@QuanZhang-William
Copy link
Member 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.5% 98.5% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.8% 98.8% 0.0
pkg/reconciler/taskrun/taskrun.go 85.4% 85.5% 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.5% 98.5% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.8% 98.8% 0.0
pkg/reconciler/taskrun/taskrun.go 85.4% 85.5% 0.1

@QuanZhang-William QuanZhang-William marked this pull request as ready for review November 3, 2023 12:33
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 3, 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.5% 98.5% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.8% 98.8% 0.0
pkg/reconciler/taskrun/taskrun.go 85.4% 85.5% 0.1

Copy link
Member

@Yongxuanzhang Yongxuanzhang left a comment

Choose a reason for hiding this comment

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

lgtm!

pkg/reconciler/taskrun/validate_taskrun_test.go Outdated Show resolved Hide resolved
docs/taskruns.md Show resolved Hide resolved
@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 3, 2023
@QuanZhang-William
Copy link
Member Author

/assign @JeromeJu

pkg/reconciler/taskrun/validate_taskrun.go Outdated Show resolved Hide resolved
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JeromeJu, Yongxuanzhang

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

Part of [tektoncd#7270][tektoncd#7270]. In [TEP-0144][tep-0144] we proposed a new `enum` field to support built-in param input validation.

This commit adds validation logic for TaskRun against Param Enum

/kind feature

[tektoncd#7270]: tektoncd#7270
[tep-0144]: https://github.com/tektoncd/community/blob/main/teps/0144-param-enum.md
@QuanZhang-William
Copy link
Member Author

@tektoncd/core-collaborators @tektoncd/core-maintainers Please take a look this PR if you are interested 😁

@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.5% 98.5% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.8% 98.8% 0.0
pkg/reconciler/taskrun/taskrun.go 85.4% 85.6% 0.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.5% 98.5% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.8% 98.8% 0.0
pkg/reconciler/taskrun/taskrun.go 85.4% 85.6% 0.2

@QuanZhang-William
Copy link
Member Author

/test pull-tekton-pipeline-integration-tests

@JeromeJu
Copy link
Member

JeromeJu commented Nov 6, 2023

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 6, 2023
@tekton-robot tekton-robot merged commit 515c4a3 into tektoncd:main Nov 6, 2023
12 checks passed
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 Denotes a PR that will be considered when it comes time to generate release notes. 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.

4 participants