Repository navigation
feat(declarative): add RESET_OPAQUE_TOKEN recovery for OpaqueTokenCursor (2/2) - #1235
Draft
devin-ai-integration[bot] wants to merge 2 commits into
Draft
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Co-Authored-By: bot_apk <apk@cognition.ai>
Co-Authored-By: bot_apk <apk@cognition.ai>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting This CDK VersionYou can test this version of the CDK using the following: # Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/airbyte-python-cdk.git@devin/1792189821-opaque-token-reset#egg=airbyte-python-cdk[dev]' --help
# Update a connector to use the CDK from this branch ref:
cd airbyte-integrations/connectors/source-example
poe use-cdk-branch devin/1792189821-opaque-token-resetPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
|
PyTest Results (Fast)3 106 tests - 2 692 3 084 ✅ - 2 683 11m 30s ⏱️ -56s For more details on these failures, see this check. Results for commit 6bca0ac. ± Comparison against base commit 9808890. |
Patrick Nilan (pnilan)
added this pull request to stack #1236
October 17, 2026 00:15
This branch was successfully deployed
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.
Summary
Adds recovery for rejected or expired opaque tokens, for example Ashby
sync_token_expired. This is PR 2 of 2, stacked on #1234 (base branchdevin/1792189821-opaque-token-cursor).Resolves https://github.com/airbytehq/airbyte-internal-issues/issues/17213:
Close on merge: yes — internally filed, no customer to confirm with.
Changes
ResponseAction.RESET_OPAQUE_TOKEN, plus the schema and model enum entries, so anHttpResponseFiltercan map a token rejection to the new action:HttpClientraisesOpaqueTokenResetRequiredExceptionfor that action, the same wayRESET_PAGINATIONdoes.CompositeErrorHandlerkeeps the action instead of falling through.SimpleRetriever._read_records_or_split_request_windowcatches the exception and callstoken_reset_handler, which the factory binds toOpaqueTokenCursor.restart_without_token. It then re-reads the partition from page 1 with a fresh read context (paginator, page-size reducer, record parser).cursor_slice={}, so the re-read sendsinitial_tokenor nothing.system_error. That includes a rejection of a read that sent no stored token.RESET_OPAQUE_TOKENon a stream withoutOpaqueTokenCursorraisesOpaqueTokenResetNotSupportedException(config_error).Declarative-First Evaluation
This is a CDK feature, not a connector change.
RESET_PAGINATIONrestarts pagination but keeps the stored token, and no existing action drops the token. The new action is a built-in declarative option for adopters.Test Coverage
stream_interval, after a page-size reduction.system_error.RESET_PAGINATIONalone and after a token reset; a second pagination reset fails.CompositeErrorHandlerkeeps the action.test_http_client.pyandtest_composite_error_handler.py.Breaking change
None. This adds an opt-in action, and existing actions and streams are unchanged.
Link to Devin session: https://app.devin.ai/sessions/94b41efe75db43e78eb5a4f8d5f58484
Open in Devin Desktop: https://app.devin.ai/desktop/session/94b41efe75db43e78eb5a4f8d5f58484?variant=devin