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-0047] add display name to pipeline spec and task spec #6294

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

nanjingfm
Copy link
Contributor

@nanjingfm nanjingfm commented Mar 5, 2023

Changes

Before this commit, a task in a Pipeline is currently represented in the UI using a field (name) that is meant to be machine readable, not human readable. So new fields are added to Pipeline, Task, and PipelineTask for display names, as well as a new field on PipelineTask for description.

closes: #3466
/kind tep

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

add displayName field to Pipeline, Task and PipelineTask, and description field for PipelineTask.

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/tep Categorizes issue or PR as related to a TEP (or needs a TEP). labels Mar 5, 2023
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 5, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: nanjingfm / name: nanjingfm (925b286)

@tekton-robot
Copy link
Collaborator

Hi @nanjingfm. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 5, 2023
@nanjingfm nanjingfm force-pushed the feat/add-display-name branch 3 times, most recently from 1589bdc to 925b286 Compare March 5, 2023 07:55
@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/v1beta1/pipeline_conversion.go 94.8% 95.0% 0.2
pkg/apis/pipeline/v1beta1/task_conversion.go 94.4% 94.6% 0.1

@dibyom
Copy link
Member

dibyom commented Mar 6, 2023

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels 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/v1beta1/pipeline_conversion.go 94.8% 95.0% 0.2
pkg/apis/pipeline/v1beta1/task_conversion.go 94.4% 94.6% 0.1

@JeromeJu
Copy link
Member

JeromeJu commented Mar 6, 2023

Looks like we need to run ./hack/updated-codegen :)

@JeromeJu
Copy link
Member

JeromeJu commented Mar 6, 2023

Thanks for the thorough change on both apiversions including the conversions 😎 🙏

For the release note, suggest that shall we use "add displayName to pipeline.spec, pipeline.spec.tasks.description and pipeline.spec.tasks.displayName" and same for the Tasks.

Also NIT for the commit message, shall we use explicitly description and displayName instead of calling out adding a new field?

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.

@itewk this is an implementation of TEP-0047 - please take a look 🙏🏾

@itewk
Copy link

itewk commented Mar 6, 2023

@jerop first, THANK YOU! this is awesome you are taking this on.

i presume the rendering of tasks / pipelines in UI is done by a different system which would need to actaully take advantage of these new fields? or am i missing something in the commit where it actaully changes the rendering to use these fields if set and/or do you have a picture of how this renders now?

@jerop
Copy link
Member

jerop commented Mar 6, 2023

@itewk - to clarify, it is @nanjingfm who's implementing the feature, I was just looping you in

yes, the rendering is handled by tektoncd/dashboard so they will need to support this feature once it's available in a release - cc @AlanGreene @tektoncd/dashboard-maintainers

@itewk
Copy link

itewk commented Mar 6, 2023

@nanjingfm all my thanks to you!!

@jerop thanksnfor clarification. From a CRD perspective then this looks great to me.

@AlanGreene
Copy link
Member

Thanks for the heads up @jerop, @tektoncd/cli-maintainers may also be interested.

I've created tektoncd/dashboard#2792 to track the Dashboard implementation.

Any input on how / where users might expect to see these new values would be welcome and can be shared on the Dashboard issue.

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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 tekton-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. 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 8, 2023
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.

Thank you so much for working on this! I wonder if we could add a simple example in docs, and also an example to use all the new fields in https://github.com/tektoncd/pipeline/tree/main/examples?

docs/pipelines.md Outdated Show resolved Hide resolved
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 @nanjingfm! Could you please add the new fields to the conversion unit tests?

@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/v1beta1/pipeline_conversion.go 96.4% 96.5% 0.1
pkg/apis/pipeline/v1beta1/task_conversion.go 97.4% 97.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/v1beta1/pipeline_conversion.go 96.4% 96.5% 0.1
pkg/apis/pipeline/v1beta1/task_conversion.go 97.4% 97.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 to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_conversion.go 96.4% 96.5% 0.1
pkg/apis/pipeline/v1beta1/task_conversion.go 97.4% 97.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/v1beta1/pipeline_conversion.go 96.4% 96.5% 0.1
pkg/apis/pipeline/v1beta1/task_conversion.go 97.4% 97.4% 0.1

@nanjingfm nanjingfm requested review from QuanZhang-William and removed request for JeromeJu March 28, 2023 14:45
@nanjingfm
Copy link
Contributor Author

@QuanZhang-William Unit tests and sample code have been added,I would appreciate it if you could review it again.

@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/v1beta1/pipeline_conversion.go 96.4% 96.5% 0.1
pkg/apis/pipeline/v1beta1/task_conversion.go 97.4% 97.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 to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_conversion.go 96.4% 96.5% 0.1
pkg/apis/pipeline/v1beta1/task_conversion.go 97.4% 97.4% 0.1

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 squash the 4 commits into 1: "Use one commit per PR" - standards

here are some guidelines for the commit message: https://github.com/tektoncd/community/blob/main/standards.md#commit-messages

examples/v1/pipelineruns/pipeline-with-displayname.yaml Outdated Show resolved Hide resolved
New fields are added to Pipeline, Task, and PipelineTask for display names, as well as a new field on PipelineTask for description. These "human readable" fields can be used to populate a UI in the future.
@tekton-robot tekton-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 29, 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/v1beta1/pipeline_conversion.go 96.4% 96.5% 0.1
pkg/apis/pipeline/v1beta1/task_conversion.go 97.4% 97.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 to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/v1beta1/pipeline_conversion.go 96.4% 96.5% 0.1
pkg/apis/pipeline/v1beta1/task_conversion.go 97.4% 97.4% 0.1

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.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 29, 2023
@jerop
Copy link
Member

jerop commented Mar 29, 2023

Thanks for the contribution @nanjingfm, and welcome to the Tekton community!

/meow

@tekton-robot
Copy link
Collaborator

@jerop: cat image

In response to this:

Thanks for the contribution @nanjingfm, and welcome to the Tekton community!

/meow

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 tekton-robot merged commit 3d86fa5 into tektoncd:main Mar 29, 2023
@itewk
Copy link

itewk commented Mar 29, 2023

@nanjingfm WAHOOO!! thank you!

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/tep Categorizes issue or PR as related to a TEP (or needs a TEP). lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add ability to set "displayName" for Pipeline tasks