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

Do not modify the informer cache objects in resource.AnnotationChangedPredicate.Update #561

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

ulucinar
Copy link
Contributor

Description of your changes

Fixes #560

This PR proposes a change in the implementation of the resource.AnnotationChangedPredicate.Update function so that we no longer modify the metadata.annotations of the underlying informer cache object when the predicate is run. There's a race between this predicate and the managed reconciler when the managed reconciler tries to fetch the object from the informer cache.

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

We have built an AWS provider image by updating the crossplane-runtime module dependency:
index.docker.io/ulucinar/provider-aws-iam:v0.40.0-2f7af2124115916c53aa5f3df8c3ac53e28702fa,
and we have not been able to reproduce the data race on metadata.annotations with the packages containing this fix.

…dPredicate.Update

Signed-off-by: Alper Rifat Ulucinar <[email protected]>
@sttts
Copy link
Contributor

sttts commented Sep 25, 2023

Lgtm.

Copy link
Contributor

@phisco phisco left a comment

Choose a reason for hiding this comment

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

LGTM! 🙏

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.

Data Race on metadata.annotations for Managed Resources
3 participants