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

cleanerr: Clean errors for stable status #122

Merged
merged 1 commit into from
Aug 18, 2023

Conversation

chlunde
Copy link
Contributor

@chlunde chlunde commented Jun 27, 2023

Description of your changes

Some error messages from the kubernetes API contain formatted pointers. This
triggers an infinite loop in provider-kubernetes, as each attempt to reconcile
updates the status with a new error message.

To avoid this loop, mask pointer references in errors on update.

A similar fix exists in provider-aws.

Without this change, we can see a lot of reconciles for one object over a short
time period:

Warning CannotUpdateExternalResource 3m38s (x849 over 8m39s) managed/object.kubernetes.crossplane.io (combined from similar events):

This might also block other resources from reconciling.

For consideration: It may be that PR #110 effectively fixes most of the issue covered here. Events produced would still be duplicated, but the reconcile spinning would likely stop.

I have:

  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

  • Ran provider-kubernetes locally, created Job objects and modified them.
  • Added new unit tests for this function.

Some error messages from the kubernetes API contain formatted pointers. This
triggers an infinite loop in provider-kubernetes, as each attempt to reconcile
updates the status with a new error message.

To avoid this loop, mask pointer references in errors on update.

A similar fix exists in provider-aws.

Without this change, we can see a lot of reconciles for one object over a short
time period:

  Warning  CannotUpdateExternalResource  3m38s (x849 over 8m39s)  managed/object.kubernetes.crossplane.io  (combined from similar events):

This might also block other resources from reconciling.

Signed-off-by: Carl Henrik Lunde <[email protected]>
Copy link
Collaborator

@turkenh turkenh left a comment

Choose a reason for hiding this comment

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

Thanks @chlunde 🙌

@turkenh turkenh merged commit 5dc99d4 into crossplane-contrib:main Aug 18, 2023
@chlunde chlunde deleted the cleanerr branch August 20, 2023 18:10
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.

2 participants