Skip to content

CLOUDP-332653: mutually exclusively return errors or reconcile results #2533

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

Merged
merged 2 commits into from
Jul 21, 2025

Conversation

s-urbaniak
Copy link
Collaborator

@s-urbaniak s-urbaniak commented Jul 21, 2025

Summary

With #2525 logs are now being spammed with this INFO statement:

 1 | AtlasDeployment:
 2 |   name: test
 3 |   namespace: flex
 4 | controller: AtlasDeployment
 5 | controllerGroup: atlas.mongodb.com
 6 | controllerKind: AtlasDeployment
 7 | level: INFO
 8 | msg: "Warning: Reconciler returned both a non-zero result and a non-nil error. The result will always be ignored if the error is non-nil and the non-nil error causes requeuing with exponential backoff. For more details, see: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/reconcile#Reconciler"
 9 | name: test
10 | namespace: flex
11 | reconcileID: 67857508-03af-4eac-a8b7-8f704112f8cb
12 | time: 2025-07-21T13:43:38.046+0200

This is because reconcile.Result is non empty if errors are returned.

This fixes it.

Proof of Work

All unit tests have been adapted.

Checklist

  • Have you linked a jira ticket and/or is the ticket in the title?
  • Have you checked whether your jira ticket required DOCSP changes?
  • Have you checked for release_note changes?
  • Have you signed our CLA?

Reminder (Please remove this when merging)

  • Please try to Approve or Reject Changes the PR, keep PRs in review as short as possible
  • Remember the following Communication Standards - use comment prefixes for clarity:
    • blocking: Must be addressed before approval.
    • follow-up: Can be addressed in a later PR or ticket.
    • q: Clarifying question.
    • nit: Non-blocking suggestions.
    • note: Side-note, non-actionable. Example: Praise
    • --> no prefix is considered a question

@s-urbaniak s-urbaniak marked this pull request as ready for review July 21, 2025 12:22
@s-urbaniak s-urbaniak requested a review from a team as a code owner July 21, 2025 12:22
@s-urbaniak s-urbaniak changed the title CLOUDP-332653: mutually exclusively return errors or recocile results CLOUDP-332653: mutually exclusively return errors or reconcile results Jul 21, 2025
@s-urbaniak s-urbaniak merged commit 2d3fd37 into main Jul 21, 2025
135 of 144 checks passed
@s-urbaniak s-urbaniak deleted the CLOUDP-332653 branch July 21, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants