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

CRs are not patched correctly after a rm.ReadOne/sdkFind call #807

Closed
a-hilaly opened this issue Jun 2, 2021 · 0 comments
Closed

CRs are not patched correctly after a rm.ReadOne/sdkFind call #807

a-hilaly opened this issue Jun 2, 2021 · 0 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@a-hilaly
Copy link
Member

a-hilaly commented Jun 2, 2021

Custom Resource seem to not change values when sdkFind() returns an error. The main reason is that rm.ReadOne is returning onError using the actual state (r) and not the observed state (observed)

/priority important-soon
/assign

@a-hilaly a-hilaly added the kind/bug Categorizes issue or PR as related to a bug. label Jun 2, 2021
@ack-bot ack-bot added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Jun 2, 2021
ack-bot pushed a commit to aws-controllers-k8s/code-generator that referenced this issue Jun 7, 2021
Issue aws-controllers-k8s/community#807

For some controllers we noticed an incorrect reconciliation behaviour
when a custom hook code was returning a `RequeueNeededAfter` error.
More precisely `resourceManager.ReadOne` was not returning the correct
observed state when `sdkFind` returns with an error. Which was causing
 the reconciler to patch to wrong state (`desird` instead `observed`).

This patch fixes this issue by passing the correct observed state to `onError`.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
@a-hilaly a-hilaly closed this as completed Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

2 participants