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

🐛 controllers: do not return a RequeueAfter and an error at the same time #1839

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

EmilienM
Copy link
Contributor

@EmilienM EmilienM commented Jan 24, 2024

What this PR does / why we need it:
Since controller-runtime kubernetes-sigs/controller-runtime#2451, a warning will be logged if a controller returns an error and a non-zero result (i.e. a result with a RequeueAfter).
It adjusts the OpenStackCluster controller to return errors first, as an error itself will already trigger a reconciliation (with exponential backoff).

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

Copy link

netlify bot commented Jan 24, 2024

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit 42ca30e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/65b28388c15b2c000756ef1c
😎 Deploy Preview https://deploy-preview-1839--kubernetes-sigs-cluster-api-openstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 24, 2024
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 24, 2024
@EmilienM
Copy link
Contributor Author

/hold
late for me now so I'll check tomorrow our CI logs, to verify that:

  1. We don't get the warning anymore
  2. We don't use the same reconciler ID thousands of times anymore.

@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 Jan 24, 2024
@EmilienM EmilienM changed the title 🐛 openstackcluster_controller: do not return a RequeueAfter and an error at the same time 🐛 controllers: do not return a RequeueAfter and an error at the same time Jan 24, 2024
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 24, 2024
@EmilienM
Copy link
Contributor Author

EmilienM commented Jan 24, 2024

FYI @mnaser @mdbooth @jichenjc @lentzi90
This PR (when finalized & reviewed) will need to be backported because #1753 was backported and introduced the issue.
EDIT: in fact it wasn't backported because of git conflicts and nobody (yet) took care of manually backport it AFIK.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 24, 2024
@EmilienM
Copy link
Contributor Author

/cc @lentzi90

Copy link
Contributor

@jichenjc jichenjc left a comment

Choose a reason for hiding this comment

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

/lgtm

api/v1alpha8/openstackcluster_types.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 25, 2024
Copy link
Contributor

@dulek dulek left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed 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. labels Jan 25, 2024
@EmilienM
Copy link
Contributor Author

@jichenjc
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 Jan 26, 2024
Copy link
Contributor

@lentzi90 lentzi90 left a comment

Choose a reason for hiding this comment

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

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dulek, EmilienM, lentzi90

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 Jan 26, 2024
@k8s-ci-robot k8s-ci-robot merged commit e89ec9c into kubernetes-sigs:main Jan 26, 2024
9 checks passed
@stephenfin stephenfin deleted the issue_1838 branch February 14, 2024 16:07
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.

controllers: non-empty reconcile result and error
5 participants