Skip to content

[PR-verification] oauth raw expires_in from overrides - #1184

Closed
Baz (bazarnov) wants to merge 1 commit into
mainfrom
bazarnov/verify-oauth-raw-expires-in
Closed

Baz (bazarnov) wants to merge 1 commit into
mainfrom
bazarnov/verify-oauth-raw-expires-in

Conversation

@bazarnov

Copy link
Copy Markdown
Contributor

Validation run for a candidate change. Not for merge; will be closed after CI completes.

@github-actions

Copy link
Copy Markdown

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

Testing This CDK Version

You 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@bazarnov/verify-oauth-raw-expires-in#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 bazarnov/verify-oauth-raw-expires-in

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /autofix - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test - Runs connector tests with the updated CDK
  • /prerelease - Triggers a prerelease publish with default arguments
  • /poe build - Regenerate git-committed build artifacts, such as the pydantic models which are generated from the manifest JSON schema in YAML.
  • /poe <command> - Runs any poe command in the CDK environment
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

PyTest Results (Fast)

4 713 tests  +25   4 701 ✅ +25   10m 3s ⏱️ +9s
    1 suites ± 0      12 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit 95667e2. ± Comparison against base commit 0ca75ef.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

PyTest Results (Full)

4 716 tests  +25   4 704 ✅ +25   14m 51s ⏱️ + 4m 50s
    1 suites ± 0      12 💤 ± 0 
    1 files   ± 0       0 ❌ ± 0 

Results for commit 95667e2. ± Comparison against base commit 0ca75ef.

♻️ This comment has been updated with latest results.

…verrides

Since 6.45.5 refresh_access_token returns the expiry as a datetime and
set_token_expiry_date stores its argument unparsed. Overrides written
earlier still return the raw expires_in: the next expiry check raises a
TypeError, and SingleUseRefreshTokenOauth2Authenticator stores it as a
1970 epoch and refreshes on every request.

- Oauth2Authenticator and DeclarativeOauth2Authenticator
  set_token_expiry_date parse a non-datetime value again, as before
  6.45.5. A value that cannot be parsed is stored as before.
- SingleUseRefreshTokenOauth2Authenticator.set_token_expiry_date reads a
  numeric value as seconds when neither token_expiry_is_time_of_expiration
  nor token_expiry_date_format is set. Other values are stored as before.
- _parse_token_expiration_date passes datetimes through, for custom
  setters that parse the CDK's own result with it.
@bazarnov
Baz (bazarnov) force-pushed the bazarnov/verify-oauth-raw-expires-in branch from 1087ded to 95667e2 Compare September 28, 2026 14:26
assert {"Authorization": "Bearer token1"} == header3


class _ComparableWithDatetime:
@bazarnov

Copy link
Copy Markdown
Contributor Author

Validation complete; closing.

@bazarnov
Baz (bazarnov) deleted the bazarnov/verify-oauth-raw-expires-in branch September 28, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant