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
[release-0.9] 🐛 Allow setting PreserveUnknownFields at both type and field level #700
Conversation
`install.goreleaser.com` is now deprecated and stopped working so the tests in new PRs are failing.
🐛 ci: fix golangci-lint installation
* crdgen: compare metav1 pkg by ID & fsp loader This patch updates the way the CRD generator compares an imported metav1 package. Previously the comparison occurred using a Golang equality operator, !=, against two, in-memory data structures. However, this fails when multiple root paths are loaded. Their metav1 packages are identical, just not identical objects in memory. This patch updates the comparison to compare the package IDs, not the instance of the object. This patch also introduces a filesystem-path specific loader for each unique filesystem path provided as a root. This ensures the AST is loaded correctly and the kubebuilder markers are parsed as intended. * Reproduce the issue This patch adds tests to reproduce the issue of the markers not being discovered when multiple paths are used. The issue is not markers missing from a type, but markers missing from a *referenced* type. For example, the new Job type imports the unserved.CronJobSpec as the field Job.Spec.CronJob. The markers are not generated for Job.Spec.CronJob as it is referenced from another package.
This patch simplifies the LoadRootsWithConfig logic to be closer to the logic that existed prior to the patch that addressed support for multiple, distinct root paths. The fix that was merged was overly complex, and not necessarily so. This update simplifies that patch to the necessary bits.
Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
…x-for-680 🏃 Simplify the LoadRootsWithConfig logic
* 🐛 crd/gen: Sort findGroupKinds * remove binary
✨ Upgrade the yaml from v3.0.0-20210107192922-496545a6307b to 3.0.0
🐛 Allow setting PreserveUnknownFields at both type and field level
…#683) * Add XPreserveUnknownFields to runtime.RawExtension Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> * fix: tests Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com> * fix: generate crd manifests Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
…kers-to-type 🐛 Make topology markers also valid for type definitions
Bug was introduced in kubernetes-sigs#693.
…Flatten 🐛 Fix crd flattening for structType marker to not create duplicate entries for XMapType
🐛 Allow setting PreserveUnknownFields at both type and field level Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
Hi @eddycharly. 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 Once the patch is verified, the new status will be reflected by the 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/test-infra repository. |
/assign @FillZpp |
Emm.. Are you going to merge your release-0.9 branch into upstream master? |
I'm fighting with git, sorry. |
|
…roller-tools into release-0.9 Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: eddycharly The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Cherry pick #689 .