-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Update contract package to match documentation #7138
Conversation
Skipping CI for Draft Pull Request. |
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.
Looks like a good start - could you add some unit tests to show these fields working?
/ok-to-test I would take a look once the tests are green / linter is happy |
@sbueringer @killianmuldoon I held off on tests since I had a couple design considerations I wanted to ask about.
|
f3822bd
to
4f43349
Compare
4f43349
to
0392286
Compare
|
7c696a9
to
86f639a
Compare
Gotcha that makes sense to me. I also spoke with @jackfrancis and we were also wondering if there's a way to generate code for this as opposed to manually implementing the paths and structs. |
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.
@sbueringer I've worked on implementing the optional types but had some trouble dealing with types that were a list or a map of additional structs. Would definitely appreciate any suggestions on how to proceed!
I'll take a look early next week |
Somehow forgot to answer. I think it might be possible but I wonder if maintaining the generation code (+ unit tests, ..) is worth it. It's probably also complex code that won't be easy to understand. |
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.
Made a first pass, this is a great work of research.
I'm looking forward to get this merged and start cleaning up usage of unstructured all around the codebase
769452d
to
c57b928
Compare
72cc68c
to
8178db9
Compare
@fabriziopandini @sbueringer I squashed and fixed the linting issues, PTAL when you get the chance! |
@fabriziopandini @sbueringer I think this should be ready for a final pass! |
Thx! I'll take a look as soon as I can, but I can't promise it will happen before KubeCon. Just too much things going on right now. |
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.
I'm +1 to merge this code, so we can start using it as a replacement for current unstructured handling across the code base.
/lgtm
@fabriziopandini @sbueringer Are we good to merge this or do we need a final pass of reviews? |
Looks good to me! /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer 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 |
What this PR does / why we need it: As described in #5309, we're going through
internal/contract
package and updating it to match the specifications in the docs.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #7119 #7120