🌱Change sort to slices package#1299
Conversation
|
Hi @dongjiang1989. Thanks for your PR. I'm waiting for a github.com 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. DetailsInstructions 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. |
|
/ok-to-test |
f9cf128 to
d49da30
Compare
|
Are there any linters available that we can use to prevent the old sorting being re-introduced? |
Signed-off-by: dongjiang <dongjiang1989@126.com>
a9111a3 to
0349bb2
Compare
Great. Add golangci-lint check done. |
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: 702ba8ee8187ea2c932eb2538fba41e42eae0930 |
|
Thx! /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dongjiang1989, sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hm, needs rebase now |
|
/test pull-controller-tools-test-main |
Thanks @sbueringer |
|
@sbueringer Please recheck it |
|
@sbueringer rebase done |
|
/lgtm |
|
LGTM label has been added. DetailsGit tree hash: c772cd2a50017c8cea0f61c72d021d0b2d57e8e2 |
Update controller-tools to jaypoulz/controller-tools fork which includes a fix for deterministic XValidation rule ordering. This ensures CRD generation produces consistent output. Changes included: - tools/go.mod: Point replace directive to jaypoulz/controller-tools - tools/Makefile: Fix openapi-gen path (moved from code-generator to kube-openapi upstream) - tools/codegen/pkg/crdify/generator.go: Ignore 'type' validation for allOf→enum schema simplification - tools/codegen/pkg/schemacheck/generator.go: Disable NoDataTypeChange comparator for the same schema simplification The new controller-tools generates simpler enum schemas without allOf wrappers when both type and field have enum markers. This is functionally equivalent but structurally different, requiring the crdify and schemacheck adjustments to avoid false positive violations. Upstream fix: kubernetes-sigs/controller-tools#1299 OpenShift carry: openshift/kubernetes-sigs-controller-tools#35 The OpenShift carry is a temporary backport until we can bump to Go 1.25, which is required by the upstream controller-tools version with this fix. Created with support from Claude Opus 4 (Anthropic)
Update controller-tools to jaypoulz/controller-tools fork which includes a fix for deterministic XValidation rule ordering. This ensures CRD generation produces consistent output. Changes included: - tools/go.mod: Point replace directive to jaypoulz/controller-tools - tools/Makefile: Fix openapi-gen path (moved from code-generator to kube-openapi upstream) - tools/codegen/pkg/crdify/generator.go: Ignore 'type' validation for allOf→enum schema simplification - tools/codegen/pkg/schemacheck/generator.go: Disable NoDataTypeChange comparator for the same schema simplification The new controller-tools generates simpler enum schemas without allOf wrappers when both type and field have enum markers. This is functionally equivalent but structurally different, requiring the crdify and schemacheck adjustments to avoid false positive violations. Upstream fix: kubernetes-sigs/controller-tools#1299 OpenShift carry: openshift/kubernetes-sigs-controller-tools#35 The OpenShift carry is a temporary backport until we can bump to Go 1.25, which is required by the upstream controller-tools version with this fix. Created with support from Claude Opus 4 (Anthropic)
Update controller-tools to jaypoulz/controller-tools fork which includes a fix for deterministic XValidation rule ordering. This ensures CRD generation produces consistent output. Changes included: - tools/go.mod: Point replace directive to jaypoulz/controller-tools - tools/Makefile: Fix openapi-gen path (moved from code-generator to kube-openapi upstream) - tools/codegen/pkg/crdify/generator.go: Ignore 'type' validation for allOf→enum schema simplification - tools/codegen/pkg/schemacheck/generator.go: Disable NoDataTypeChange comparator for the same schema simplification The new controller-tools generates simpler enum schemas without allOf wrappers when both type and field have enum markers. This is functionally equivalent but structurally different, requiring the crdify and schemacheck adjustments to avoid false positive violations. Upstream fix: kubernetes-sigs/controller-tools#1299 OpenShift carry: openshift/kubernetes-sigs-controller-tools#35 The OpenShift carry is a temporary backport until we can bump to Go 1.25, which is required by the upstream controller-tools version with this fix. Created with support from Claude Opus 4 (Anthropic)
Update controller-tools to openshift/kubernetes-sigs-controller-tools which includes a fix for deterministic XValidation rule ordering. This ensures CRD generation produces consistent output. Changes included: - tools/go.mod: Point replace directive to openshift fork with stable sort fix - tools/Makefile: Fix openapi-gen path (moved from code-generator to kube-openapi upstream) - tools/codegen/pkg/schemacheck/generator.go: Disable NoDataTypeChange comparator for allOf→enum schema simplification The new controller-tools generates simpler enum schemas without allOf wrappers when both type and field have enum markers. This is functionally equivalent but structurally different, requiring the schemacheck adjustment to avoid false positive violations. Upstream fix: kubernetes-sigs/controller-tools#1299 OpenShift carry: openshift/kubernetes-sigs-controller-tools#35 Created with support from Claude Opus 4 (Anthropic)
Update controller-tools to openshift/kubernetes-sigs-controller-tools which includes a fix for deterministic XValidation rule ordering. This ensures CRD generation produces consistent output. Changes included: - tools/go.mod: Point replace directive to openshift fork with stable sort fix - tools/Makefile: Fix openapi-gen path (moved from code-generator to kube-openapi upstream) - tools/codegen/pkg/schemacheck/generator.go: Disable NoDataTypeChange comparator for allOf→enum schema simplification The new controller-tools generates simpler enum schemas without allOf wrappers when both type and field have enum markers. This is functionally equivalent but structurally different, requiring the schemacheck adjustment to avoid false positive violations. Upstream fix: kubernetes-sigs/controller-tools#1299 OpenShift carry: openshift/kubernetes-sigs-controller-tools#35 Created with support from Claude Opus 4 (Anthropic)
Update controller-tools to openshift/kubernetes-sigs-controller-tools which includes a fix for deterministic XValidation rule ordering. This ensures CRD generation produces consistent output. Changes included: - tools/go.mod: Point replace directive to openshift fork with stable sort fix - tools/Makefile: Fix openapi-gen path (moved from code-generator to kube-openapi upstream) - tools/codegen/pkg/schemacheck/generator.go: Disable NoDataTypeChange comparator for allOf→enum schema simplification The new controller-tools generates simpler enum schemas without allOf wrappers when both type and field have enum markers. This is functionally equivalent but structurally different, requiring the schemacheck adjustment to avoid false positive violations. Upstream fix: kubernetes-sigs/controller-tools#1299 OpenShift carry: openshift/kubernetes-sigs-controller-tools#35 Created with support from Claude Opus 4 (Anthropic)
Update controller-tools to openshift/kubernetes-sigs-controller-tools which includes a fix for deterministic XValidation rule ordering. This ensures CRD generation produces consistent output. Changes included: - tools/go.mod: Point replace directive to openshift fork with stable sort fix - tools/Makefile: Fix openapi-gen path (moved from code-generator to kube-openapi upstream) - tools/codegen/pkg/schemacheck/generator.go: Disable NoDataTypeChange comparator for allOf→enum schema simplification The new controller-tools generates simpler enum schemas without allOf wrappers when both type and field have enum markers. This is functionally equivalent but structurally different, requiring the schemacheck adjustment to avoid false positive violations. Upstream fix: kubernetes-sigs/controller-tools#1299 OpenShift carry: openshift/kubernetes-sigs-controller-tools#35 Created with support from Claude Opus 4 (Anthropic)
ref: kubernetes-sigs/controller-runtime#3370
Replace the sort package with the slices package to simplify the code.