-
Notifications
You must be signed in to change notification settings - Fork 295
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
make verify-crds intermittently produces different output #1928
Comments
I can confirm that this is still the case on main. |
And also happens at updated controller-gen / controller-tools. |
We had a similar bug like this in a previous controller-tools release (but that one was fixed). Basically the problem was some non-determinism. Unfortunately I can't find the old issue/PR anymore. But overall probably requires some deep-dive controller-gen debugging |
Probably was this one: kubernetes-sigs/controller-tools#680 |
Can you try controller-tools < v0.9.0 if it happens there? |
With v0.8.0, I only hit the categories added/not added case. The atomic case is gone. |
Note: I will debug into controller-gen to get down on this. |
I did take a further look. I can see three cases:
Some more observations for the Case A:
One more observation for all the cases:
TODO: inspect more into the other cases, a workaround does not look as simple as for case A (by debugging controller-gen). |
Simplified reproduction script:
Note: we have deterministic output when dropping v1alpha3 & v1alpha4 from |
I did a git bisect on controller-gen/controller-tools. Looks like this was introduced in kubernetes-sigs/controller-tools#663 There was already a fix after that PR (kubernetes-sigs/controller-tools#687) but this did not fix the issue here. |
Oh wow, that's actually great news 👍 just verified again that the PR would fix the issue 🎉 So yep, definitely seems to be a duplicate of #1757 |
/kind bug
What steps did you take and what happened:
[A clear and concise description of what the bug is.]
If you run
make verify-crds
repeatedly, about 20% of the time, the generated CRDs are actually different, usually adding "cluster-api" as a category or setting an atomic map type.What did you expect to happen:
Consistent CRD generation
Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
Environment:
kubectl version
):/etc/os-release
):The text was updated successfully, but these errors were encountered: