[CRE-3889] Retry org resolution#2097
Conversation
|
👋 agparadiso, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
📊 API Diff Results
|
There was a problem hiding this comment.
Pull request overview
This PR extends the OrgResolverFallback wrapper to retry org resolution for a broader set of transient gRPC errors, using bounded exponential backoff, before falling back to the in-memory cache.
Changes:
- Replace the single “Unavailable retry” with a bounded retry loop and exponential backoff.
- Expand retried gRPC status codes beyond
Unavailablevia a newisRetriableGRPCCodehelper. - Update and extend unit tests to reflect the new retry behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pkg/services/orgresolver/fallback.go | Adds bounded retries with exponential backoff, expands retriable error set, and adjusts fallback behavior. |
| pkg/services/orgresolver/fallback_test.go | Updates retry call-count assertions and adds a test case for retrying DeadlineExceeded. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ial backoff with a max of 4 retries
e7cbdb3 to
eaf3738
Compare
| backoff = initialRetryBackoff | ||
| ) | ||
|
|
||
| for attempt := 1; attempt <= maxGetAttempts; attempt++ { |
There was a problem hiding this comment.
Could you use "github.com/smartcontractkit/chainlink-common/pkg/utils/retry" here?
Description
This pr was already adding a single retry + cache.
What we are adding here is an increase in the scope of errors in which we retry (before it was only on
unavailable) + adding exponential backoff with a max of 3 retriesRequires
Supports