-
Notifications
You must be signed in to change notification settings - Fork 180
Fix resource state handling and error propagation in reconciler #218
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 resource state handling and error propagation in reconciler #218
Conversation
|
/retest |
a-hilaly
left a comment
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.
Thanks michael. Can we have an e2e tests for this either for ecr, s3 or both?
/lgtm
e2052ec to
1e070dd
Compare
a9b9940 to
3e3bdc9
Compare
|
/retest |
|
Tests will not pass for some controllers since they were not merged with the latest code-generator version, where we match the interface changes |
| adoptionPolicy, err := GetAdoptionPolicy(desired) | ||
| if err != nil { | ||
| return nil, err | ||
| return latest, err |
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.
Q: What's the impact of return a copy of desired vs nil here?
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.
latest is a deepCopy of desired.
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've got that part. I'm wondering what the difference in behavior that returning latest instead of nil is expected to have. Is to ensure that HandleReconcilerErrors doesn't skip patching the resource due to the ackcompare.IsNotNil check?
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.
that's correct
3e3bdc9 to
13caeb5
Compare
knottnt
left a comment
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.
Thanks @michaelhtm
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: a-hilaly, knottnt, michaelhtm The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@michaelhtm: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
This reverts commit 79724c6.
Issue #2682
Changes Made
reconciler.go:
latestwithdesired.DeepCopy()to ensure consistent resource state is returned on errorsutil.go:
reconciler_test.go:
Impact
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.