Skip to content

Comments

🌱Change sort to slices package#1299

Merged
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
dongjiang1989:slices-pkg
Nov 23, 2025
Merged

🌱Change sort to slices package#1299
k8s-ci-robot merged 2 commits intokubernetes-sigs:mainfrom
dongjiang1989:slices-pkg

Conversation

@dongjiang1989
Copy link
Member

ref: kubernetes-sigs/controller-runtime#3370

Replace the sort package with the slices package to simplify the code.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 30, 2025
@k8s-ci-robot
Copy link
Contributor

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 /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.

Details

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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 30, 2025
@JoelSpeed
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 30, 2025
@JoelSpeed
Copy link
Contributor

Are there any linters available that we can use to prevent the old sorting being re-introduced?

Signed-off-by: dongjiang <dongjiang1989@126.com>
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 31, 2025
@dongjiang1989
Copy link
Member Author

Are there any linters available that we can use to prevent the old sorting being re-introduced?

Great.

Add golangci-lint check done.

@JoelSpeed
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 31, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: 702ba8ee8187ea2c932eb2538fba41e42eae0930

@sbueringer
Copy link
Member

Thx!

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Nov 1, 2025
@sbueringer
Copy link
Member

Hm, needs rebase now

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 2, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 2, 2025
@dongjiang1989
Copy link
Member Author

/test pull-controller-tools-test-main

@dongjiang1989
Copy link
Member Author

dongjiang1989 commented Nov 2, 2025

Hm, needs rebase now

Thanks @sbueringer
Done

@dongjiang1989
Copy link
Member Author

@sbueringer Please recheck it

@dongjiang1989
Copy link
Member Author

@sbueringer rebase done

@JoelSpeed
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 23, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

DetailsGit tree hash: c772cd2a50017c8cea0f61c72d021d0b2d57e8e2

@k8s-ci-robot k8s-ci-robot merged commit 15cb6cf into kubernetes-sigs:main Nov 23, 2025
7 checks passed
@dongjiang1989 dongjiang1989 deleted the slices-pkg branch November 23, 2025 15:03
jaypoulz added a commit to jaypoulz/api that referenced this pull request Jan 19, 2026
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)
jaypoulz added a commit to jaypoulz/api that referenced this pull request Jan 20, 2026
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)
jaypoulz added a commit to jaypoulz/api that referenced this pull request Jan 20, 2026
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)
jaypoulz added a commit to jaypoulz/api that referenced this pull request Jan 20, 2026
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)
jaypoulz added a commit to jaypoulz/api that referenced this pull request Jan 20, 2026
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)
jaypoulz added a commit to jaypoulz/api that referenced this pull request Jan 20, 2026
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)
fonta-rh pushed a commit to fonta-rh/api that referenced this pull request Feb 9, 2026
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants