fix(okta): retry transient errors once on the pooled client path#547
Merged
Conversation
somethingnew2-0
marked this pull request as ready for review
July 16, 2026 22:59
The run-lifetime pooled aiohttp session the syncer uses reuses keep-alive connections Okta can close server-side; reusing a dead one raises a transient error the SDK does not retry itself (it bails immediately on a null response and only retries HTTP statuses). Retry a call that raises OktaTransientError once in _WrapperClient — an immediate retry gets a fresh connection and recovers within the run instead of skipping the resource until the next reconcile. Bounded to one retry so a degraded endpoint or a lingering 429 still gives up quickly. Composes with the None-response AttributeError reclassification in #546, which surfaces that specific transport failure as OktaTransientError for this retry to catch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
somethingnew2-0
force-pushed
the
pcollins/okta-transient-retry
branch
from
July 16, 2026 23:03
ba0053e to
57e9a62
Compare
somethingnew2-0
enabled auto-merge (squash)
July 16, 2026 23:06
Jeff-Rowell
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
A pooled Okta client reuses one long-lived aiohttp session across a run. Keep-alive connections it holds can be closed server-side by Okta's load balancer during idle gaps; reusing a dead one raises a transient failure (a
ServerDisconnectedError, which the SDK surfaces as a null-response error). The SDK does not retry these itself — it bails immediately on a null response and only retries HTTP statuses, not connection-launch failures.This retries a call that raises
OktaTransientErroronce, rebuilding the coroutine each attempt. An immediate retry gets a fresh connection and usually succeeds, so a transient blip recovers within the run instead of skipping the resource until the next reconcile. It is bounded to a single retry so a genuinely-degraded endpoint — or a lingering 429 — still gives up quickly rather than amplifying load.Composes with #546: that PR reclassifies the SDK's null-response
AttributeErrorasOktaTransientError, which is exactly what this retry catches for the connection-reuse case. Independently, this also retries returned 5xx/timeout transients.🤖 Generated with Claude Code