-
Notifications
You must be signed in to change notification settings - Fork 139
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
Add a retry mechanism for ReadOne
calls in rm.createResource
#81
Conversation
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.
Can you please also add some unit tests for this by mocking the ReadOne call and verifying that right number of ReadOne calls are being made in unit test assertions.
Not against this solution, since it leaves the reconciler behavior as is for services that do not suffer from this ReadOne(after Create) behavior. However i would love to hear your thoughts on following,
a) Do you think it is worth to make this retry-backoff behavior configurable for service teams in generator.yaml? (Have default values when not specified)
b) Why was existing solution of requeueing and complete reconciler loop retry not sufficient enough? (Just add in the PR description)
awaiting for soak tests results with ECR |
@vijtrip2 Yes i do believe that it can be useful for some portion of the controllers at least. Were thinking about adding a flag to make this retry/backoff configurable? |
1201035
to
d87e878
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.
Thanks @a-hilaly! Good start on this :) Left some comments about changes I'd like to see..
9de3d5f
to
4e07dce
Compare
In some rare cases and with some specific AWS APIs, calling `ReadOne` right after a `rm.Create` can return a `NotFound` error. We want to retry calling `rm.ReadOne` in hopes of receiving a correct response. This patch adds a backoff/retry mechanism around `ReadOne` call in `rm.createResource`.
/lgtm |
/unhold |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: A-Hilaly, vijtrip2 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 |
Issue #, if available:
Description of changes:
In some rare cases and with some specific AWS APIs, calling
ReadOne
right after a
rm.Create
can return aNotFound
error. We want toretry calling
rm.ReadOne
in hopes of receiving a correct response.This patch adds a backoff/retry mechanism around
ReadOne
call inrm.createResource
.By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.