-
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
Add description field to Spec #2089
Conversation
@piyush-garg: GitHub didn't allow me to request PR reviews from the following users: siamaksade. Note that only tektoncd members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this: 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. |
So initially I thought we could use annotation (and a standard |
I think we have a |
To give more on my thought of re-use apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: print-date
annotations:
description: |
A simple task that prints the date
# […]
---
# OR
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: golang-build
annotations:
tekton.dev/description: |
A description here
spec:
inputs:
params:
- name: package
description: base package to build in
steps:
- name: build
image: golang:$(inputs.params.version)
workingdir: /workspace/src/$(inputs.params.package)
# […] Few benefits:
|
Considering that validation can be done in a better strong way when using a spec field, and also to keep consistency with params and resource declaration, I will prefer to have |
@bobcatfish @dibyom @vdemeester Any final thoughts on this so that I can work further on this. Thanks |
I don't have strong feelings about this, I would tend towards annotations since even if description is missing / not validated it does not have impact on functionality. One thing I do care about is the ability for tasks to self-document themselves, and to render a folder of tasks into a browsable documentation. But I believe neither of the options prevent this from happening. |
Don't have strong feelings about this either....let's go with the annotation approach for now? |
Thanks, @vdemeester @dibyom @afrittoli for the suggestion, I will add docs regarding the annotation and no struct changes are required. I will mention the annotation key Should I also add a default empty annotation in the case where the key is not there in yaml? |
The following is the coverage report on pkg/.
|
/test pull-tekton-pipeline-integration-tests |
The following is the coverage report on pkg/.
|
apologies for my late feedback but i added some comments to #993 (comment) - i not 100% sold on using an annotation vs using the spec, maybe there's something im missing tho! 🙏 /hold |
The following is the coverage report on pkg/.
|
@vdemeester @bobcatfish @dibyom I have updated the PR to add spec field after christie's comment. Please have a look at PR and let me know if something I have missed. |
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.
/meow
In response to this:
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. |
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
This will add description field to spec of pipeline, task, clustertask, resource and condition This can be used to provide description and can further used in CLI and UI. Add docs and tests Fix tektoncd#993
The following is the coverage report on pkg/.
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbwsg, 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 |
/hold cancel |
This will add description field to spec
of pipeline, task, clustertask, resource and condition
This can be used to provide description and
can further used in CLI and UI.
Add docs and tests
Fix #993
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
Release Notes