-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Fix CRD Generation Errors #8726
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
Fix CRD Generation Errors #8726
Conversation
|
|
|
/kind cleanup |
|
/assign @pritidesai |
|
@burigolucas and @vdemeester any inputs from your side? |
|
@tricktron thanks for the PR. Seems like it doesn't compile. |
d2d75c5 to
5cd0625
Compare
|
@vdemeester I fixed the compile error. |
5cd0625 to
db09918
Compare
|
@vdemeester I fixed the error in the |
afrittoli
left a comment
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
|
Thanks @tricktron - since type definitions are slightly different, you need to re-run the code generation script |
|
@afrittoli, Thanks for the headsup. I added the new files with are generated with |
|
Thanks for this PR @tricktron Now that these changes solve the warnings, do we still get response code non zero from controller-gen? The warnings were braking the execution of pipeline/hack/update-schemas.sh Line 58 in c23b9a9
|
@burigolucas Good point. Can´t we just replace this whole script with the following command: go run sigs.k8s.io/controller-tools/cmd/[email protected] crd:generateEmbeddedObjectMeta=false output:dir=./config/300-crds paths=./pkg/apis/... |
It won't work because the path depends on the API group. The script handles that. What I hope we can do is to get rid off the while loop, assuming there are no warnings returning status code 1 anymore. Please, see the FIXME comment on line 53 about it. The script will be much more clean without the while loop with the retries. |
|
/ok-to-test |
|
@burigolucas I refactored and simplfied the |
|
@burigolucas I tried to simplify the It seems that your while loop somehow protects against this. I have no idea why. Do you? |
0f029ac to
06a7114
Compare
|
@burigolucas Alright, I figured it out. Tekton diverges from the recommended one Go package per group/version kind and uses multiple Go packages per group/version which breaks Now all checks in the CI should pass. Could someone retrigger the CI to check? |
06a7114 to
1f0f909
Compare
|
@tricktron can you squash the commits into one and update the commit with a proper commit message, that would be done, after that I can approve it ✅ |
1f0f909 to
f205608
Compare
|
@waveywaves Sure, I squashed everything into one commit and reworded the commit message. |
f205608 to
b1e6b37
Compare
Changes the following Kubernetes controller annotations so that the `controller-gen:schemapatch` command works without any errors: - Removes the duplicated list type annotation from struct fields where the annotation is already set on the type. - Create a type alias and set the list type annotation there (mainly with `[]corev1.Volume`). - Set the `storageversion` annotation to the most stable version. As a result, we can then simplify the update-schema.sh script.
b1e6b37 to
2c9a667
Compare
|
cc @vdemeester |
|
@vdemeester @waveywaves kind ping. |
|
/retest |
|
@vdemeester @waveywaves Kind reminder to have another look at this😃. |
vdemeester
left a comment
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.
👼🏼
waveywaves
left a comment
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: afrittoli, vdemeester, waveywaves 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 |
Changes
Follows up on #8490 and fixes all the controller-gen warnings. Now all crds can be generated with the following command without any errors:
The main changes are:
// +listType=atomicannotation from struct fields where the annotation is already set on the type.[]corev1.Volume.Submitter Checklist
As the author of this PR, please check off the items in this checklist:
/kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tepRelease Notes