feat(source-github): replace custom token rotation with CDK TokenPoolAuthenticator#80341
Draft
Aaron ("AJ") Steers (aaronsteers) wants to merge 4 commits into
Draft
feat(source-github): replace custom token rotation with CDK TokenPoolAuthenticator#80341Aaron ("AJ") Steers (aaronsteers) wants to merge 4 commits into
Aaron ("AJ") Steers (aaronsteers) wants to merge 4 commits into
Conversation
…r with CDK TokenPoolAuthenticator Uses the new TokenPoolAuthenticator from the CDK with RateLimitAwareRotation strategy, replacing the connector-specific token rotation implementation. TK-TODO: Pin to stable CDK release after airbytehq/airbyte-python-cdk#1057 is merged and released. Co-Authored-By: AJ Steers <aj@airbyte.io>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Contributor
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksPR Slash CommandsAirbyte Maintainers (that's you!) can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful Resources
|
This comment has been minimized.
This comment has been minimized.
Co-Authored-By: AJ Steers <aj@airbyte.io>
Contributor
|
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
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
Replaces source-github's custom
MultipleTokenAuthenticatorWithRateLimiter(~273 lines inutils.py) with the new CDKTokenPoolAuthenticator+RateLimitAwareRotationstrategy from airbytehq/airbyte-python-cdk#1057.This validates the CDK component end-to-end with a real connector as proof of functionality.
How
source.py: SwapMultipleTokenAuthenticatorWithRateLimiter→TokenPoolAuthenticatorwithRateLimitAwareRotationbackoff_strategies.py: Feed rate-limit response headers to the authenticator viaon_http_response()so the rotation strategy can track per-token quota statepyproject.toml: Pin CDK dependency to the feature branch (devin/1750005100-token-pool-authenticator)The old custom implementation tracked
x-ratelimit-remaining/x-ratelimit-resetheaders internally and rotated tokens when exhausted. The new CDK component provides the same behavior as a generic, reusable declarative component. Theupdate_token()compatibility method ensures the existing backoff strategy continues to force-rotate when backoff exceeds 10 minutes.Review guide
source_github/source.py— new_get_authenticator()using CDK componentssource_github/backoff_strategies.py— addedon_http_responsecall for state feedbackpyproject.toml— CDK pinned to dev branch (temporary)User Impact
No user-facing behavior change. Token rotation and rate-limit handling remain functionally equivalent. The old
MultipleTokenAuthenticatorWithRateLimiterclass inutils.pyis retained for now (used by existing tests) but no longer referenced by production code.Can this PR be safely reverted and rolled back?
Devin session
Requested by: Aaron ("AJ") Steers (@aaronsteers)