pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

implementing TEP-0150 - `displayName` in `childReferences`

Open pritidesai opened this issue 1 year ago • 5 comments

Changes

Implementing proposal TEP-0150.

Adding a functionality where the existing displayName can be used to configure unique names for each instance using the params from each combination such that the matrix instances in the Tekton Dashboard are rendered to distinguishable names.

Also, repurposing an existing name field as part of the matrix.include[].name. If specified, a fully resolved name field is available in the childReferences.

/kind feature

Submitter Checklist

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

  • [x] Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
  • [x] Has Tests included if any functionality added or changed
  • [x] pre-commit Passed
  • [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
  • [x] 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

A fully resolved displayName is now available in childReferences along with the pipelineTaskName. This is mainly beneficial to parameterize and easily distinguish matrix instances of the task. 

pritidesai avatar Feb 16 '24 23:02 pritidesai

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/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Feb 17 '24 00: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/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Feb 17 '24 00: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/reconciler/pipelinerun/resources/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Feb 17 '24 00: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/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Feb 17 '24 00: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/reconciler/pipelinerun/resources/apply.go 98.7% 98.4% -0.3
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Feb 22 '24 17: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/apply.go 98.7% 98.4% -0.3
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Feb 22 '24 17: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/reconciler/pipelinerun/resources/apply.go 98.7% 98.7% 0.0
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Feb 22 '24 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/reconciler/pipelinerun/resources/apply.go 98.7% 98.7% 0.0
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Feb 22 '24 18:02 tekton-robot

/test pull-tekton-pipeline-integration-tests

afrittoli avatar Feb 23 '24 10:02 afrittoli

The display name here (and in the next ones) seems to be related to how a specific matrix combination was extended through the matrix.include section. Some are only extended with common-package so they all that name. the the common-package include did not exists, would they have an empty displayName?

Thanks @afrittoli! That is correct. The displayName in childReferences will have the matrix.include[].name only for the combinations which were added as part of that include otherwise the displayName is not initialized. For the names from multiple include sections, we are concatenating them with a space. Any specific comment/feedback on that?

pritidesai avatar Feb 26 '24 17:02 pritidesai

The display name here (and in the next ones) seems to be related to how a specific matrix combination was extended through the matrix.include section. Some are only extended with common-package so they all that name. the the common-package include did not exists, would they have an empty displayName?

Thanks @afrittoli! That is correct. The displayName in childReferences will have the matrix.include[].name only for the combinations which were added as part of that include otherwise the displayName is not initialized. For the names from multiple include sections, we are concatenating them with a space. Any specific comment/feedback on that?

Thanks @pritidesai. I think concatenation makes sense. As I mentioned, I find the current matrix API a bit hard to parse, but that's not something for this to address. Given the current matrix API, the proposed display name makes sense. Perhaps we should have one case in the test list where display name remains empty to check that case too?

afrittoli avatar Feb 28 '24 14:02 afrittoli

Thanks @pritidesai. I think concatenation makes sense. As I mentioned, I find the current matrix API a bit hard to parse, but that's not something for this to address. Given the current matrix API, the proposed display name makes sense. Perhaps we should have one case in the test list where display name remains empty to check that case too?

We have a variety of tests written under pipelinerunstate_test.go which include the case where the displayName remains empty when include params does not make it as part of the combinations:

https://github.com/tektoncd/pipeline/pull/7683/files#diff-22f0dfe65e555d6833c559a7a03613fa9cfec74ddf0962109a8b7ed810ccc850R4014-R4021

Let me know if we want to add more tests. Thanks!

pritidesai avatar Feb 28 '24 17:02 pritidesai

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/apply.go 98.5% 98.5% 0.0
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Feb 28 '24 17: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/apply.go 98.5% 98.5% 0.0
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Feb 28 '24 17:02 tekton-robot

/retest

Hey @AlanGreene @AverageMarcus, this is ready for review, PTAL! Thanks!

pritidesai avatar Feb 28 '24 18:02 pritidesai

/retest

pritidesai avatar Feb 29 '24 17:02 pritidesai

/retest

pritidesai avatar Mar 05 '24 16:03 pritidesai

Pipeline WG: @AlanGreene @AverageMarcus PTAL again since we are hoping to get this merged this month.

chitrangpatel avatar Mar 05 '24 17:03 chitrangpatel

@AverageMarcus: changing LGTM is restricted to collaborators

In response to this:

/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.

tekton-robot avatar Mar 05 '24 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/apply.go 98.5% 98.5% 0.0
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Mar 05 '24 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/apply.go 98.5% 98.5% 0.0
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Mar 05 '24 18:03 tekton-robot

@tektoncd/core-maintainers please help review this PR. Thanks in advance!

pritidesai avatar Mar 08 '24 01:03 pritidesai

This is a very simple change in adding human readable name in the childReferences. As an end user, we are waiting for this feature. Will appreciate if we can get the community to review on this PR. Thanks in advance!

pritidesai avatar Mar 11 '24 16:03 pritidesai

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/pipelinerun_conversion.go 95.7% 95.7% 0.0
pkg/reconciler/pipelinerun/resources/apply.go 98.5% 98.5% 0.0
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Mar 11 '24 18:03 tekton-robot

/approve

chitrangpatel avatar Mar 11 '24 18:03 chitrangpatel

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chitrangpatel

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 avatar Mar 11 '24 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/apis/pipeline/v1beta1/pipelinerun_conversion.go 95.7% 95.7% 0.0
pkg/reconciler/pipelinerun/resources/apply.go 98.5% 98.5% 0.0
pkg/reconciler/pipelinerun/resources/pipelinerunstate.go 99.5% 99.6% 0.1

tekton-robot avatar Mar 11 '24 18:03 tekton-robot