-
Notifications
You must be signed in to change notification settings - Fork 5
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
Use standard Condition
definitions and add a Default
derive
#30
Conversation
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.
This rocks, and the work you did over in Kopium rocks as well. Thank you for taking care of this 🙇
The only change I was thinking is that we could add something to our integration test in lib.rs
. You'll see here:
Line 71 in d6f8023
assert!(gw.metadata.uid.is_some()); |
That we have some asserts on the default contents (metadata, e.t.c.) I was thinking we could just add some asserts that double check the status now too? LMKWYT 🤔
e5148f9
to
d893934
Compare
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.
/approve
/lgtm
Hey @aryan9600 something seems to be up with CI |
Pull request was converted to draft
d893934
to
43cd0b2
Compare
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.
Very awesome, thank you for adding this!
I'm sorry it took so long for me to get to a review, it was a busy week.
This is my first pass, check out these comments and let me know your thoughts, and I'll do another pass ASAP.
/cc @astoycos |
Regenrate the definitions with kopium v0.17.2 to get rid of the custom Condition definitions generated for each API and use a standard definition from the k8s-openapi crate instead. Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Add a codegen tool `enum_default_generator` that reads enum names along with their default variants from the enviornment and then generates implementations of the Default trait for them. Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Modify `update.sh` to generate APIs which derive the `Default` trait: * Update the kopium command in `update.sh` so that all APIs auto-derive the Default trait. * Use the enum default generator tool to generate `Default` trait impls for all Gateway API enums. Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
43cd0b2
to
c97c721
Compare
@aryan9600 you should be able to use |
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.
Talked about this in Slack: while there are some advantages to using git mv
(keeping history, keeping attribution, providing a diff of the new generated changes) it also takes quite a bit of time so I'm fine with us not worrying about that for now.
Regenerate the definitions with
kopium
v0.17.0 to get rid of the customCondition
definitions generated for each API and use a standard definition from the k8s-openapi crate instead. Also, update thekopium
command inupdate.sh
so that all APIs auto-derive the Default trait.Ref: kube-rs/kopium#203
Fixes #28