-
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
Inline the ResourceDeclaration
struct in TaskResource
#1366
Conversation
Before the commit 92d5bcc, attributes of `ResourceDeclaration` belong to `TaskResource`. This avoids generated JSON structures to contain the useless `ResourceDeclaration` attribute.
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 @nlewo. 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 |
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
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
/hold
/cc @bobcatfish
I don't think it has any backward incompatible effect but… I want a 2nd set of eyes on this 👼
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nlewo, 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 |
@nlewo sounds like this is a good change but I'm not super familiar with what "inline" does - im also a bit confused b/c I thought if it changed the way the json fields are treated, that some of our generated code would change but it looks like it doesn't.
Could you explain a bit more about what the generated structures look like before and after this change? Also interested in more detail about how you ran into this (i.e. if it causes problems for users) |
@bobcatfish I ran into this issue because I tried to generate
while with the
This is also explained in the
The Go json marshaller, by default, inlines embedded structs (i didn't try before you asked for).I tried to find some documentation about this tag, but I wasn't able to:/ That's really strange! |
So, this |
Thanks for the thorough explanation @nlewo ! |
Before the commit 92d5bcc, attributes
of
ResourceDeclaration
belong toTaskResource
.This avoids generated JSON structures to contain the useless
ResourceDeclaration
attribute.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.
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