pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

Added Validation: Matrix parameters cannot be empty arrays

Open EmmaMunley opened this issue 2 years ago • 25 comments

Changes

Added a check in Pipeline validation to verify that matrix parameters are not just arrays, but that they are not empty arrays. This won't change existing functionality/capabilities, but will get rid of the panic in the reconciler. This addresses issues: #6071

/kind bug

Submitter Checklist

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

  • [x] Has Docs included if any changes are user facing
  • [x] Has Tests included if any functionality added or changed
  • [x] Follows the commit message standard
  • [x] Meets the Tekton contributor standards (including functionality, content, code)
  • [x] 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
  • N/A Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • N/A Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

EmmaMunley avatar Feb 09 '23 18:02 EmmaMunley

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/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 18:02 tekton-robot

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/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 18:02 tekton-robot

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/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 18:02 tekton-robot

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/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 18:02 tekton-robot

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/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 18:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 19:02 tekton-robot

cc @abayer

jerop avatar Feb 09 '23 19:02 jerop

thanks @EmmaMunley for the PR, I have updated the PR description with the right issue number.

@abayer and @jerop, please review the comment at https://github.com/tektoncd/pipeline/issues/6071#issuecomment-1424705562

pritidesai avatar Feb 09 '23 19:02 pritidesai

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 19:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 19:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 19:02 tekton-robot

thanks @EmmaMunley for the PR, I have updated the PR description with the right issue number.

@abayer and @jerop, please review the comment at #6071 (comment)

Thank you @pritidesai. I've updated the matrix documentation.

EmmaMunley avatar Feb 09 '23 19:02 EmmaMunley

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 19:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 19:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 19:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 19:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 20:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 20:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.3% 0.0

tekton-robot avatar Feb 09 '23 20:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.4% 0.1

tekton-robot avatar Feb 10 '23 21:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.4% 0.1

tekton-robot avatar Feb 10 '23 21:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.4% 0.1

tekton-robot avatar Feb 10 '23 21:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.4% 0.1

tekton-robot avatar Feb 10 '23 21:02 tekton-robot

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.3% 0.0
pkg/apis/pipeline/v1beta1/param_types.go 98.2% 98.4% 0.1

tekton-robot avatar Feb 10 '23 21:02 tekton-robot

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/reconciler/pipelinerun/resources/pipelinerunresolution.go 96.0% 94.9% -1.1

tekton-robot avatar Mar 09 '23 16:03 tekton-robot

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/reconciler/pipelinerun/resources/pipelinerunresolution.go 96.0% 94.9% -1.1

tekton-robot avatar Mar 09 '23 17:03 tekton-robot

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/reconciler/pipelinerun/resources/pipelinerunresolution.go 96.0% 94.9% -1.1

tekton-robot avatar Mar 09 '23 17:03 tekton-robot

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/reconciler/pipelinerun/resources/pipelinerunresolution.go 96.0% 96.3% 0.4

tekton-robot avatar Mar 09 '23 18:03 tekton-robot

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/reconciler/pipelinerun/resources/pipelinerunresolution.go 96.0% 96.3% 0.4

tekton-robot avatar Mar 09 '23 18:03 tekton-robot

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/reconciler/pipelinerun/resources/pipelinerunresolution.go 96.0% 96.3% 0.4

tekton-robot avatar Mar 09 '23 18:03 tekton-robot