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: Update and move to implementable #593

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

abayer
Copy link
Contributor

@abayer abayer commented Jan 4, 2022

This is rather straightforward as written - we just need to add DisplayName fields to PipelineSpec, TaskSpec, and PipelineTask, and add a Description field to PipelineTask.

Signed-off-by: Andrew Bayer [email protected]

@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 4, 2022
@jerop
Copy link
Member

jerop commented Jan 5, 2022

/assign

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.

Thank you for picking this up @abayer!

I'm hesitant about marking this TEP implementable when there are details that have not been fleshed out yet. At minimum, I suggest that we include some alternatives to the proposed solution and why we won't implement those alternatives. One alternative is using annotations as proposed by @sbwsg in #319 (comment).

None.

## Alternatives

To be determined.
TBD
Copy link
Member

Choose a reason for hiding this comment

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

There were some alternatives discussed in the original proposal, such as using annotations, could they please be added here?

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

For Pipeline and Task, I think the only value I see in those field is to be able to use them in variable interpolation — as today, we can't use annotations — but I am not sure what the use case would be here. If we don't have this need, an annotation just does the job, doesn't it ?

For PipelineTask (aka Task referenced in a Pipeline), the question is different 👼🏼

@abayer
Copy link
Contributor Author

abayer commented Jan 6, 2022

Ok, I need to think on this.

There's already a Description field on both Pipeline and Task, so unless we want to remove that and cause compatibility issues (which, frankly, I think would be more pain for users than any value that would come from moving to a standard tekton.dev/description annotation), those aren't going to change. So for Pipeline and Task, the question is whether to have both the Description field and a DisplayName field, or the Description field and a standardized tekton.dev/displayName annotation.

Then for PipelineTask, we either would add the Description and DisplayName fields, as proposed here, or add the existing PipelineTaskMetadata struct (used as a field in EmbeddedTask and EmbeddedRunSpec currently) as an optional Metadata field in PipelineTask.

I honestly don't know what's best here. I don't see any solution that isn't at least a bit confusing or problematic (i.e., removing Description from Pipeline and Task feels like a bad idea to me), and adding (pipeline task).metadata.annotations.etc... feels overly verbose to me. I'd lean towards just adding the fields as proposed here, so that there's a consistent way to specify DisplayName and Description for all of Pipeline, Task, and PipelineTask, but will wait to update the alternatives in the TEP until there seems to be a consensus here.

@jerop
Copy link
Member

jerop commented Jan 10, 2022

/kind tep

@tekton-robot tekton-robot added the kind/tep Categorizes issue or PR as related to a TEP (or needs a TEP). label Jan 10, 2022
@jerop
Copy link
Member

jerop commented Jan 10, 2022

/assign @vdemeester

@vdemeester
Copy link
Member

Ok, I need to think on this.

There's already a Description field on both Pipeline and Task, so unless we want to remove that and cause compatibility issues (which, frankly, I think would be more pain for users than any value that would come from moving to a standard tekton.dev/description annotation), those aren't going to change. So for Pipeline and Task, the question is whether to have both the Description field and a DisplayName field, or the Description field and a standardized tekton.dev/displayName annotation.

Then for PipelineTask, we either would add the Description and DisplayName fields, as proposed here, or add the existing PipelineTaskMetadata struct (used as a field in EmbeddedTask and EmbeddedRunSpec currently) as an optional Metadata field in PipelineTask.

I honestly don't know what's best here. I don't see any solution that isn't at least a bit confusing or problematic (i.e., removing Description from Pipeline and Task feels like a bad idea to me), and adding (pipeline task).metadata.annotations.etc... feels overly verbose to me. I'd lean towards just adding the fields as proposed here, so that there's a consistent way to specify DisplayName and Description for all of Pipeline, Task, and PipelineTask, but will wait to update the alternatives in the TEP until there seems to be a consensus here.

My initial thought on this is, "why do we need DisplayName ?" and "why are we the only one in need of this ?", aka why the Service type doesn't have that need for example ?
What DisplayName adds that cannot be "guessed" by an UI (replace - by a space, …) ?
On PipelineTask, it's a bit different, depending on if we use embedded Task or using a very generic Task.

All in all, I don't think having those in would be such a big deal either, it could be interesting if they could be used in variable interpolation ("be aware of injection", cc #596) but otherwise they seem harmless so… I can live with having those fields in 👼🏼

/approve
/cc @bobcatfish @sbwsg @pritidesai @abayer @jerop

@tekton-robot tekton-robot requested review from pritidesai, jerop, bobcatfish and a user February 3, 2022 15:23
@tekton-robot
Copy link
Contributor

@vdemeester: GitHub didn't allow me to request PR reviews from the following users: abayer.

Note that only tektoncd members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

Ok, I need to think on this.

There's already a Description field on both Pipeline and Task, so unless we want to remove that and cause compatibility issues (which, frankly, I think would be more pain for users than any value that would come from moving to a standard tekton.dev/description annotation), those aren't going to change. So for Pipeline and Task, the question is whether to have both the Description field and a DisplayName field, or the Description field and a standardized tekton.dev/displayName annotation.

Then for PipelineTask, we either would add the Description and DisplayName fields, as proposed here, or add the existing PipelineTaskMetadata struct (used as a field in EmbeddedTask and EmbeddedRunSpec currently) as an optional Metadata field in PipelineTask.

I honestly don't know what's best here. I don't see any solution that isn't at least a bit confusing or problematic (i.e., removing Description from Pipeline and Task feels like a bad idea to me), and adding (pipeline task).metadata.annotations.etc... feels overly verbose to me. I'd lean towards just adding the fields as proposed here, so that there's a consistent way to specify DisplayName and Description for all of Pipeline, Task, and PipelineTask, but will wait to update the alternatives in the TEP until there seems to be a consensus here.

My initial thought on this is, "why do we need DisplayName ?" and "why are we the only one in need of this ?", aka why the Service type doesn't have that need for example ?
What DisplayName adds that cannot be "guessed" by an UI (replace - by a space, …) ?
On PipelineTask, it's a bit different, depending on if we use embedded Task or using a very generic Task.

All in all, I don't think having those in would be such a big deal either, it could be interesting if they could be used in variable interpolation ("be aware of injection", cc #596) but otherwise they seem harmless so… I can live with having those fields in 👼🏼

/approve
/cc @bobcatfish @sbwsg @pritidesai @abayer @jerop

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2022
@tekton-robot tekton-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 9, 2022
@jerop
Copy link
Member

jerop commented Mar 15, 2022

@abayer we discussed this at the API working group on 03/14 and agreed to support the display name in the spec, alongside the descriptions.

Please add these alternatives in the TEP:

  • Using annotations for display names and description: we don't want to do this because as described in the Kubernetes API conventions, "Annotations are primarily generated and consumed by tooling and system extensions, or are used by end-users to engage non-standard behavior of components".
  • Using labels for display names and description: this is a more viable option because as described in the Kubernetes API conventions, "Labels are the domain of users. They are intended to facilitate organization and management of API resources using attributes that are meaningful to users, as opposed to meaningful to the system. Users will use labels to select resources to operate on, display label values in CLI etc.". However, we'd have to deprecate the existing description fields in the spec.

With the above updates, the TEP should be good to go 🙏🏾

cc @itewk @AlanGreene @sbwsg @pritidesai @dibyom

@itewk
Copy link
Contributor

itewk commented Mar 15, 2022

woot woot. let me know if you need me to do anything.

@tekton-robot
Copy link
Contributor

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 13, 2022
@itewk
Copy link
Contributor

itewk commented Jun 13, 2022

this still alive?

@lbernick
Copy link
Member

@abayer please rebase

API WG 6/13: good to go (anyone can add lgtm after PR is rebased)

@tekton-robot
Copy link
Contributor

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 13, 2022
@itewk
Copy link
Contributor

itewk commented Jul 13, 2022

ping

This is rather straightforward as written - we just need to add `DisplayName` fields to `PipelineSpec`, `TaskSpec`, and `PipelineTask`, and add a `Description` field to `PipelineTask`.

Signed-off-by: Andrew Bayer <[email protected]>
@abayer abayer force-pushed the tep-0047-to-implementable branch from 7d9fd13 to 8d9ca95 Compare July 18, 2022 16:21
@tekton-robot tekton-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 18, 2022
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jerop, 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

@vdemeester
Copy link
Member

/remove-lifecycle rotten

@tekton-robot tekton-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Jul 26, 2022
@afrittoli
Copy link
Member

Agreed during WG
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 1, 2022
@tekton-robot tekton-robot merged commit ccf53cf into tektoncd:main Aug 1, 2022
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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Status: UnAssigned
Development

Successfully merging this pull request may close these issues.

7 participants