Skip to content
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

🌱 Deprecate DefaultIndex usage and remove where not needed #8855

Merged

Conversation

killianmuldoon
Copy link
Contributor

Deprecate the remote.DefaultIndex due to confusing naming and replace its current valid usages with []Index{NodeProviderIDIndex} instead.

Remove the use of the index entirely from places where it is not currently used:

  • CAPD
  • CAPBK
  • KCP

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 14, 2023
//
// Deprecated: This variable is deprecated and will be removed in a future release of Cluster API.
// Instead please use `[]Index{NodeProviderIDIndex}`.
var DefaultIndexes = []Index{NodeProviderIDIndex}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decided to deprecate this as I think that the naming is possibly one reason it showed up so many places - possibly confused with index.AddDefaultIndexes. As there's only one index here I think it's fine to just explicitly define the array.

@killianmuldoon
Copy link
Contributor Author

/area clustercachetracker

@k8s-ci-robot k8s-ci-robot added the area/clustercachetracker Issues or PRs related to the clustercachetracker label Jun 14, 2023
Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice cleanup!
one small nit from my side

controlplane/kubeadm/internal/cluster_test.go Outdated Show resolved Hide resolved
@sbueringer sbueringer mentioned this pull request Jun 14, 2023
27 tasks
Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one nit

Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
@sbueringer
Copy link
Member

Thank you. Nice fix! :)

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 9d1b343df809de62b838c4fc19c6805e7bebdaf6

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 14, 2023
@k8s-ci-robot k8s-ci-robot merged commit 7b64459 into kubernetes-sigs:main Jun 14, 2023
11 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.5 milestone Jun 14, 2023
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. area/clustercachetracker Issues or PRs related to the clustercachetracker 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants