-
Notifications
You must be signed in to change notification settings - Fork 372
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
fix(controllers): use custom CriticalAnnotationUpdater #1953
fix(controllers): use custom CriticalAnnotationUpdater #1953
Conversation
@wotolom thanks for pointing that out. This is quite a tricky breaking change that wasn't pointed out in the release notes of https://github.com/crossplane/crossplane-runtime. I wonder if it is possible to fix this issue without removing the code from If we want a quick fix for this issue I guess the easiest solution is to use a custom implementation of We can then decide how we want to move forward with this issue for v0.46+. |
4c785e1
to
c7c2137
Compare
also
However I did go with this solution for now as hotfix, due the uncertainty how many/which resources/controllers are running into this issue besides |
limitations under the License. | ||
*/ | ||
|
||
package custommanaged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not very happy with this package name. Can we move it to /pkg/utils/reconciler/managed
and maybe import it as custommanaged
if necessary?
Also it would be good to add a doc string to this package to explain the reason for this special implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, done! :)
c7c2137
to
638e422
Compare
Signed-off-by: Charel Baum (external expert on behalf of DB Netz AG) <charel.baum-extern@deutschebahn.com>
638e422
to
5fc305b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you very much @wotolom for this fix!
Successfully created backport PR #1956 for |
Description of your changes
updated description
as suggested by #1953 (comment), this adds a custom implementation of
managed.RetryingCriticalAnnotationUpdater
- before the change from crossplane/crossplane-runtime#526 - that is used in all controllers.This aims to revert back the suddenly being effective/working one-time-initialization (of
spec.forProvider
) based on the AWS Create() response in most many controllers.Fixes #1951
OG description
This change removes all field/parameter initialization based on the Create() response in ACK generated controllers.
(I did not mark this as breaking, bc this change aims to revert back to pre v0.45 behaviour.)
Fixes #1951
The ACK generated controllers always were using the AWS Create()-Call response to set fields in
cr.spec.forProvider
andcr.status.atProvider
. However, before provider-aws v0.45.0, this did actually never propagate to the resource in the k8s-cluster.This can be verified by debugging a MR in v0.44 and one in v0.45.
When trying to find out, what change had this effect, respectively why this setting of fields did not propagated to the MR before, I was only able to narrow it down to this commit that bumped - among others - crossplane-runtime to v1.14.1.
Note: This PR comment also was observing this changed behavior, linked to the mentioned commit.
some findings, while debugging:
this is the place in reconcile.go, where data in
(managed.data).spec
and.status
got lost pre v0.45 and now only.status
is lostthey changed the description of this function from "reset" to "might get reset"
Note: However I was not able (yet) to properly test/confirm if this is actually what screwed the controllers over
ToDos before removing Draft-state:
I have:
make reviewable test
to ensure this PR is ready for review.How has this code been tested
Tested manually for
rds.DBInstance
,rds.DBCluster
,docdb.DBInstance
,docdb.DBCluster
andneptune.DBCluster