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

[DONT_REVIEW] 🌱 POC: find all uncached unstructured calls #10691

Conversation

sbueringer
Copy link
Member

Signed-off-by: Stefan Büringer buringerst@vmware.com

What this PR does / why we need it:
This PR will be used to see if we have any uncached unstructurec calls. In a separate PR we'll cache all unstructured get/list calls.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label labels May 28, 2024
@k8s-ci-robot
Copy link
Contributor

This PR is currently missing an area label, which is used to identify the modified component when generating release notes.

Area labels can be added by org members by writing /area ${COMPONENT} in a comment

Please see the labels list for possible areas.

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 May 28, 2024
@sbueringer sbueringer changed the title [DONT_REVIEW] POC: find all uncached unstructured calls [DONT_REVIEW] 🌱 POC: find all uncached unstructured calls May 28, 2024
@k8s-ci-robot k8s-ci-robot requested review from chrischdi and elmiko May 28, 2024 13:05
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from sbueringer. For more information see the Kubernetes Code Review Process.

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

@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main

@@ -4,6 +4,8 @@ go 1.22.0

replace sigs.k8s.io/cluster-api => ../

replace sigs.k8s.io/controller-runtime => github.com/sbueringer/controller-runtime v0.2.0-beta.1.0.20240528125616-c6053f022f6b
Copy link
Member Author

@sbueringer sbueringer May 28, 2024

Choose a reason for hiding this comment

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

This version of CR prints a stacktrace whenever an unstructured uncached get/list is run

(xref: https://github.com/kubernetes-sigs/controller-runtime/compare/release-0.18...sbueringer:controller-runtime:pr-panic-unstructured?expand=1)

Signed-off-by: Stefan Büringer buringerst@vmware.com
@sbueringer sbueringer force-pushed the pr-poc-uncached_unstructured branch from 62eaad3 to aa134d4 Compare May 28, 2024 15:45
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main

@k8s-ci-robot
Copy link
Contributor

@sbueringer: 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-cluster-api-test-main aa134d4 link true /test pull-cluster-api-test-main

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

@sbueringer
Copy link
Member Author

Okay found only one additional usage. To summarize. The only places where we used uncached get/list calls for Unstructured on main are:

  • MachinePool controller
  • Machine controller isDeleteNodeAllowed
  • Cluster webhook validateTopologyControlPlaneVersion

I think in all 3 cases it's okay to also use cached calls. So I think it's fine to just always cache unstructured (#10692)

/close

@k8s-ci-robot
Copy link
Contributor

@sbueringer: Closed this PR.

In response to this:

Okay found only one additional usage. To summarize. The only places where we used uncached get/list calls for Unstructured on main are:

  • MachinePool controller
  • Machine controller isDeleteNodeAllowed
  • Cluster webhook validateTopologyControlPlaneVersion

I think in all 3 cases it's okay to also use cached calls. So I think it's fine to just always cache unstructured (#10692)

/close

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-area PR is missing an area label 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.

2 participants