-
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
TEP-0090: Refactor Validation of Parameters
in TaskRun
Reconciler
#4841
Conversation
In this change, we refactor the function that validates `Parameters` in the `TaskRun` reconciler in preparation for changes related to `Matrix`. The refactor mainly involves splitting up the lengthy function to make it easier to understand, maintain and reuse parts of the logic. There are no functional changes.
/test pull-tekton-pipeline-alpha-integration-tests |
/retest |
/test pull-tekton-pipeline-go-coverage |
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 descriptive paramNames make it very readable. Thanks @jerop !
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom, lbernick 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 |
… Reconciler The `TaskRun` reconciler validates that the needed `Parameters` are provided, no extra `Parameters` are provide and the types of `Parameters` are matching. Prior to this change, the reonciler did the above validation considering the `params` field in the `PipelineTask` only. In this change, we include `matrix` field into the validation routine described above. Related refactors were done in tektoncd#4841.
… Reconciler The `TaskRun` reconciler validates that the needed `Parameters` are provided, no extra `Parameters` are provide and the types of `Parameters` are matching. Prior to this change, the reconciler did the above validation considering the `params` field in the `PipelineTask` only. In this change, we include `matrix` field into the validation routine described above. Related refactors were done in tektoncd#4841.
… Reconciler The `TaskRun` reconciler validates that the needed `Parameters` are provided, no extra `Parameters` are provide and the types of `Parameters` are matching. Prior to this change, the reconciler did the above validation considering the `params` field in the `PipelineTask` only. In this change, we include `matrix` field into the validation routine described above. Related refactors were done in tektoncd#4841.
… Reconciler The `TaskRun` reconciler validates that the needed `Parameters` are provided, no extra `Parameters` are provide and the types of `Parameters` are matching. Prior to this change, the reconciler did the above validation considering the `params` field in the `PipelineTask` only. In this change, we include `matrix` field into the validation routine described above. This includes validating that `Parameters` in the `Matrix` field are `Arrays` only, and that they are subsituting `Parameters` of type `String` in the underlying `Task`. Related refactors were done in tektoncd#4841.
… Reconciler The `TaskRun` reconciler validates that the needed `Parameters` are provided, no extra `Parameters` are provide and the types of `Parameters` are matching. Prior to this change, the reconciler did the above validation considering the `params` field in the `PipelineTask` only. In this change, we include `matrix` field into the validation routine described above. This includes validating that `Parameters` in the `Matrix` field are `Arrays` only, and that they are substituting `Parameters` of type `String` in the underlying `Task`. Related refactors were done in tektoncd#4841.
… Reconciler The `TaskRun` reconciler validates that the needed `Parameters` are provided, no extra `Parameters` are provide and the types of `Parameters` are matching. Prior to this change, the reconciler did the above validation considering the `params` field in the `PipelineTask` only. In this change, we include `matrix` field into the validation routine described above. This includes validating that `Parameters` in the `Matrix` field are `Arrays` only, and that they are substituting `Parameters` of type `String` in the underlying `Task`. Related refactors were done in tektoncd#4841.
… Reconciler The `TaskRun` reconciler validates that the needed `Parameters` are provided, no extra `Parameters` are provide and the types of `Parameters` are matching. Prior to this change, the reconciler did the above validation considering the `params` field in the `PipelineTask` only. In this change, we include `matrix` field into the validation routine described above. This includes validating that `Parameters` in the `Matrix` are substituting `Parameters` of type `String` in the underlying `Task`. Related: - tektoncd#4704 - tektoncd#4841
… Reconciler The `TaskRun` reconciler validates that the needed `Parameters` are provided, no extra `Parameters` are provide and the types of `Parameters` are matching. Prior to this change, the reconciler did the above validation considering the `params` field in the `PipelineTask` only. In this change, we include `matrix` field into the validation routine described above. This includes validating that `Parameters` in the `Matrix` are substituting `Parameters` of type `String` in the underlying `Task`. Related: - tektoncd#4704 - tektoncd#4841
… Reconciler The `TaskRun` reconciler validates that the needed `Parameters` are provided, no extra `Parameters` are provide and the types of `Parameters` are matching. Prior to this change, the reconciler did the above validation considering the `params` field in the `PipelineTask` only. In this change, we include `matrix` field into the validation routine described above. This includes validating that `Parameters` in the `Matrix` are substituting `Parameters` of type `String` in the underlying `Task`. Related: - #4704 - #4841
Changes
In this change, we refactor the function that validates
Parameters
in the
TaskRun
reconciler in preparation for changes related toMatrix
. The refactor mainly involves splitting up the lengthyfunction to make it easier to understand, maintain and reuse parts
of the logic.
There are no functional changes.
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
(if there are no user facing changes, use release note "NONE")
Release Notes