-
Notifications
You must be signed in to change notification settings - Fork 420
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 omitempty tag to Status field #507
Conversation
Add omitempty tags to status field of event-listeners,templates,bindings and cluster bindings. Adding omitempty tags would allow to omit the status field if they have empty value.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Hi @chetan-rns. 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 Once the patch is verified, the new status will be reflected by the 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. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
/ok-to-test |
/retest |
@@ -43,7 +43,7 @@ type ClusterTriggerBinding struct { | |||
Spec TriggerBindingSpec `json:"spec,omitempty"` | |||
|
|||
// +optional | |||
Status TriggerBindingStatus `json:"status"` | |||
Status TriggerBindingStatus `json:"status,omitempty"` |
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.
Hmm, do we even need Status for TriggerBinding and TriggerTemplate? I don't think we are using it at all.
So, we can just remove Status like some of the Pipeline types: https://github.com/tektoncd/pipeline/blob/master/pkg/apis/pipeline/v1beta1/task_types.go#L25
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.
Yeah, I don't think we're using status... nor do I think it makes sense for the TriggerBindings or TriggerTemplates to have a status 👍
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.
beware of removing it now though 👼 it might break users (see https://github.com/tektoncd/pipeline/blob/master/pkg/apis/pipeline/v1alpha1/pipeline_types.go#L72-L76 – we had to keep it for… not breaking user 😝 )
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.
Ahh good catch...though the 0.4 release is already a breaking change due to the API groups changing...so this might be the time to do it if we ever do this!
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.
@dibyom So are we keeping the status field for bindings and templates? If not I can push the patch to remove status in the same PR
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.
Actually let's keep them with the omitempty
for now. I think omitempty
should fix @bigkevmcd 's issues with ArgoCD as well (if it doesn't please bring it up and we'll look at removing the status in 0.5 then!)
This would be really nice to have, it causes issues for ArgoCD when it's synchronising resources. |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom 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 |
Add
omitempty
tags tostatus
field of event-listeners, templates, bindings and cluster bindings.Adding
omitempty
tags would allow omitting the status field if they have an empty value.Changes
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.
Release Notes