🌱 crd gen: handle type any
Handle Go1.18's any type in CRD generator.
Fixes https://github.com/kubernetes-sigs/controller-tools/issues/1251.
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: brekelj1 / name: Jasper (2ebad8e74f467742a435366738eee4daa08b799c, f82cc1f522b434aec57e069349317343d3bb8d26, 7049f31ce2fa59837e473913d1ca3270777464a5)
Welcome @brekelj1!
It looks like this is your first PR to kubernetes-sigs/controller-tools 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes-sigs/controller-tools has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
Hi @brekelj1. Thanks for your PR.
I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
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-sigs/prow repository.
It appears at the moment that we are generating a schema with the any type, I was somewhat expecting to return an error from the generator to say you can't use any or something more helpful than that tbh
I'm not sure if returning an empty schema is correct here, I don't know how the API server reacts to that
/hold we need to explore what the correct behaviour is here
I updated the approach to always error on interface types (instead of also allowing empty interfaces): https://github.com/kubernetes-sigs/controller-tools/pull/1252#discussion_r2255587767
Also made updates for the other comments.
@JoelSpeed please rereview
/lgtm
@sbueringer @alvaroaleman I think this is a step in the right direction for avoiding panics when we come across any types. I know there are other open threads about potentially support any without an error, but until we come to a conclusion on the appropriate course there, I think this helps
Any concerns?
LGTM label has been added.
/ok-to-test /hold cancel
/assign
I'll take a look
Thank you very much!!
/lgtm
/assign @JoelSpeed
For a final look
LGTM label has been added.
Need a final review / approval please @JoelSpeed
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: brekelj1, JoelSpeed
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [JoelSpeed]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
PR needs rebase.
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-sigs/prow repository.
@brekelj1: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:
| Test name | Commit | Details | Required | Rerun command |
|---|---|---|---|---|
| pull-controller-tools-test-main | f82cc1f522b434aec57e069349317343d3bb8d26 | link | unknown | /test pull-controller-tools-test-main |
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.
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-sigs/prow repository. I understand the commands that are listed here.
@brekelj1 please rebase the PR, thx!
@brekelj1 reminder :)