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

⚠️ Remove apiutil.NewDiscoveryRESTMapper, use DynamicRESTMapper by default for cache #2611

Merged

Conversation

alvaroaleman
Copy link
Member

@alvaroaleman alvaroaleman commented Dec 6, 2023

The discovery restmapper was unused except for two places that we missed (when creating a cache directly as opposed through the manager and in a test). The discovery restmapper only ever loads mappings once during startup and is unable to reload them if they change. It also isn't lazy and we don't want anyone using it.

Instead, the DynamicRESTMapper should be used.

The discovery restmapper was unused except for two places that we missed
(when creating a cache directly as opposed through the manager and in a
test). The discovery restmapper only ever loads mappings once during
startup and is unable to reload them if they change. It also isn't lazy
and we don't want anyone using it.
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 6, 2023
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 6, 2023
@alvaroaleman
Copy link
Member Author

/retest

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Dec 6, 2023

@alvaroaleman: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-controller-runtime-apidiff cadc020 link false /test pull-controller-runtime-apidiff

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alvaroaleman, vincepri

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:
  • OWNERS [alvaroaleman,vincepri]

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

@vincepri
Copy link
Member

vincepri commented Dec 6, 2023

/retitle ⚠️ Remove apiutil.NewDiscoveryRESTMapper, use DynamicRESTMapper by default for cache

@k8s-ci-robot k8s-ci-robot changed the title ⚠️ Drop DiscoveryRESTMapper ⚠️ Remove apiutil.NewDiscoveryRESTMapper, use DynamicRESTMapper by default for cache Dec 6, 2023
@k8s-ci-robot k8s-ci-robot merged commit f0ccc08 into kubernetes-sigs:main Dec 6, 2023
14 of 15 checks passed
@sbueringer
Copy link
Member

/lgtm

tpantelis added a commit to submariner-io/submariner-operator that referenced this pull request Jan 24, 2024
The latter isn't remommended and was removed by
kubernetes-sigs/controller-runtime#2611
in controller-runtime v0.17.0.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
tpantelis added a commit to tpantelis/submariner-operator that referenced this pull request Jan 24, 2024
The latter isn't remommended and was removed by
kubernetes-sigs/controller-runtime#2611
in controller-runtime v0.17.0.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
tpantelis added a commit to tpantelis/submariner-operator that referenced this pull request Jan 24, 2024
The latter isn't recommended and was removed by
kubernetes-sigs/controller-runtime#2611
in controller-runtime v0.17.0.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
tpantelis added a commit to submariner-io/submariner-operator that referenced this pull request Jan 24, 2024
The latter isn't remommended and was removed by
kubernetes-sigs/controller-runtime#2611
in controller-runtime v0.17.0.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
tpantelis added a commit to submariner-io/submariner-operator that referenced this pull request Jan 25, 2024
The latter isn't recommended and was removed by
kubernetes-sigs/controller-runtime#2611
in controller-runtime v0.17.0.

Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Neo2308 added a commit to Neo2308/ansible-operator-plugins that referenced this pull request May 3, 2024
Use NewDynamicRESTMapper instead of NewDiscoveryRESTMapper (Ref: kubernetes-sigs/controller-runtime#2611)
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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants