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 unnecessary requeues #8743

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

sbueringer
Copy link
Member

@sbueringer sbueringer commented May 25, 2023

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

What this PR does / why we need it:
This PR removes requeues in places where we already watch objects.

E.g. we don't have to requeue if the BootstrapConfig is not ready, because an update on a BootstrapConfig automatically triggers a reconcile (because we have a watch on BootstrapConfigs).

There should be no problems with stale caches after updates because we don't cache unstructured.

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 #8735

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 25, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 25, 2023
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-full-main

Signed-off-by: Stefan Büringer buringerst@vmware.com
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 1, 2023
@sbueringer sbueringer changed the title [WIP] 🌱 Remove unnecessary requeues 🌱 Remove unnecessary requeues Jun 1, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 1, 2023
@sbueringer
Copy link
Member Author

This PR is ready for review. I'll hold it to be able to do a before/after comparison with goofy.
/hold

/assign @fabriziopandini @ykakarap @killianmuldoon @CecileRobertMichon

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 1, 2023
if err := r.externalTracker.Watch(log, obj, handler.EnqueueRequestForOwner(r.Client.Scheme(), r.Client.RESTMapper(), &expv1.MachinePool{})); err != nil {
return external.ReconcileOutput{}, err
}

Copy link
Member Author

Choose a reason for hiding this comment

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

I moved the watch above the pause so that we always watch even if the object is paused right now

@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-full-main

@sbueringer
Copy link
Member Author

sbueringer commented Jun 5, 2023

/test pull-cluster-api-e2e-mink8s-main

(Just to verify it works)

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jun 5, 2023

@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-e2e-informing-ipv6-main ee582b2 link false /test pull-cluster-api-e2e-informing-ipv6-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/test-infra repository. I understand the commands that are listed here.

@sbueringer sbueringer mentioned this pull request Jun 12, 2023
27 tasks
@fabriziopandini
Copy link
Member

Nice cleanup!
/hold cancel
/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jun 12, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 3a515002a58d3596e3d919b14f22ccb0cc6c977e

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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 k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 12, 2023
@k8s-ci-robot k8s-ci-robot merged commit f8bdca3 into kubernetes-sigs:main Jun 12, 2023
30 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.5 milestone Jun 12, 2023
@sbueringer sbueringer deleted the pr-remove-requeues branch June 12, 2023 12:36
Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

/area provider/core

@k8s-ci-robot k8s-ci-robot added the area/provider/core Issues or PRs related to the core provider label Jun 27, 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/provider/core Issues or PRs related to the core provider 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.

Consider not requeuing for objects that we are also watching
7 participants