Skip to content

chore: adapt PyAirbyte to airbyte-api==1.0.1 breaking changes#1048

Open
Aaron ("AJ") Steers (aaronsteers) wants to merge 4 commits into
mainfrom
devin/1782184227-test-airbyte-api-1.0.0
Open

chore: adapt PyAirbyte to airbyte-api==1.0.1 breaking changes#1048
Aaron ("AJ") Steers (aaronsteers) wants to merge 4 commits into
mainfrom
devin/1782184227-test-airbyte-api-1.0.0

Conversation

@aaronsteers

@aaronsteers Aaron ("AJ") Steers (aaronsteers) commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

Adapts PyAirbyte to work with airbyte-api==1.0.1 (up from 0.53.0). The SDK v1.0 release includes several intentional breaking changes:

1. Keyword-only request= argument — all SDK resource methods now require request= as keyword-only. 27 call sites updated in api_util.py:

# before
response = airbyte_instance.workspaces.get_workspace(api.GetWorkspaceRequest(...))
# after
response = airbyte_instance.workspaces.get_workspace(request=api.GetWorkspaceRequest(...))

2. HTTP library migration: requestshttpxraw_response type changed from requests.Response to httpx.Response. Updated AirbyteApiResponseDuckType protocol in api_duck_types.py.

3. Model renameUsernameAndPasswordDestinationSnowflakeUsernameAndPassword in _cache_to_dest.py (aliased to preserve internal API).

4. Schema tighteningConnectionResponse now requires schedule.scheduleType. Updated test helper in test_cloud_api_util.py to use ConnectionScheduleResponse(schedule_type=ScheduleTypeWithBasicEnum.MANUAL) and migrated mock responses from requests.Response() to httpx.Response(...).

Requested by Aaron ("AJ") Steers (@aaronsteers). Related SDK issue: airbytehq/airbyte-api-python-sdk#178

Link to Devin session: https://app.devin.ai/sessions/84168ffdefe74522bb6d0cad34fcbb0b

Summary by CodeRabbit

  • Chores
    • Pinned the Airbyte API dependency to version 1.0.1 to improve stability and compatibility.
  • Bug Fixes
    • Corrected Snowflake credential mapping when converting cached destination data to use the appropriate Airbyte API credential model.
  • Refactor
    • Updated the API layer to use httpx responses and to consistently pass HTTP request objects via an explicit request= argument.
  • Tests
    • Updated Cloud API unit tests to use httpx responses/requests for mocked HTTP flows.

Co-Authored-By: AJ Steers <aj@airbyte.io>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@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 PyAirbyte Version

You can test this version of PyAirbyte using the following:

# Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1782184227-test-airbyte-api-1.0.0' pyairbyte --help

# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1782184227-test-airbyte-api-1.0.0'

PR Slash Commands

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

  • /fix-pr - Fixes most formatting and linting issues
  • /uv-lock - Updates uv.lock file
  • /test-pr - Runs tests with the updated PyAirbyte
  • /prerelease - Builds and publishes a prerelease version to PyPI
📚 Show Repo Guidance

Helpful Resources

Community Support

Questions? Join the #pyairbyte channel in our Slack workspace.

📝 Edit this welcome message.

@github-code-quality

github-code-quality Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: Python

Python / code-coverage/pytest-fast

The overall coverage in the branch is 67%. The coverage in the branch is 65%.

Show a code coverage summary of the most impacted files.
File d9f652f 1db7b6e +/-
airbyte/_util/api_util.py 36% 37% +1%
airbyte/registry.py 70% 72% +2%
airbyte/mcp/_tool_utils.py 72% 77% +5%
airbyte/mcp/int...c_history_ui.py 0% 36% +36%
airbyte/mcp/int...hared_models.py 0% 81% +81%
airbyte/mcp/int..._registry_ui.py 0% 92% +92%
airbyte/cloud/models.py 0% 92% +92%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%
airbyte/mcp/int...ive/__init__.py 0% 100% +100%
airbyte/mcp/int...tive/_prefab.py 0% 100% +100%

Python / code-coverage/pytest-no-creds

The overall coverage in the branch is 67%. The coverage in the branch is 65%.

Show a code coverage summary of the most impacted files.
File d9f652f 1db7b6e +/-
airbyte/_util/api_util.py 36% 37% +1%
airbyte/registry.py 70% 72% +2%
airbyte/mcp/_tool_utils.py 72% 77% +5%
airbyte/mcp/int...c_history_ui.py 0% 36% +36%
airbyte/mcp/int...hared_models.py 0% 81% +81%
airbyte/mcp/int..._registry_ui.py 0% 92% +92%
airbyte/cloud/models.py 0% 92% +92%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%
airbyte/mcp/int...ive/__init__.py 0% 100% +100%
airbyte/mcp/int...tive/_prefab.py 0% 100% +100%

Python / code-coverage/pytest

The overall coverage in the branch remains at 71%, unchanged from the branch.

Show a code coverage summary of the most impacted files.
File d9f652f 1db7b6e +/-
airbyte/_util/api_util.py 72% 62% -10%
airbyte/cloud/workspaces.py 66% 62% -4%
airbyte/registry.py 70% 72% +2%
airbyte/mcp/int...c_history_ui.py 0% 36% +36%
airbyte/mcp/int...hared_models.py 0% 81% +81%
airbyte/mcp/int..._registry_ui.py 0% 92% +92%
airbyte/cloud/models.py 0% 93% +93%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%
airbyte/mcp/int...ive/__init__.py 0% 100% +100%
airbyte/mcp/int...tive/_prefab.py 0% 100% +100%

Updated June 23, 2026 19:30 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ca74991e-b248-424f-b122-45d4a9a6daf4

📥 Commits

Reviewing files that changed from the base of the PR and between a1ebf32 and 1db7b6e.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml

📝 Walkthrough

Walkthrough

The airbyte-api dependency is pinned to the stable release 1.0.1, requiring concurrent migration from requests to httpx for HTTP responses, standardization of API call signatures to use explicit keyword arguments for request objects, and updated test mocks. The Snowflake credentials import is also adjusted for API compatibility.

Changes

airbyte-api 1.0.1 Upgrade with httpx Migration

Layer / File(s) Summary
HTTP response type protocol update to httpx
airbyte/_util/api_duck_types.py
AirbyteApiResponseDuckType protocol switches raw_response type from requests.Response to httpx.Response, and the TYPE_CHECKING import is updated accordingly.
API utility function calls with keyword argument convention
airbyte/_util/api_util.py
27 API client method calls across workspace, connection, job, source, destination, and declarative source definition functions are updated to pass request objects via explicit request= keyword argument instead of positionally.
Test mocks updated to httpx.Response construction
tests/unit_tests/test_cloud_api_util.py
Import switched from requests to httpx. All mocked raw_response objects are reconstructed using httpx.Response with explicit request targets across jobs, connections, and workspaces test scenarios. Connection schedule response adjusted to use ConnectionScheduleResponse with MANUAL type.
Dependency pin and Snowflake credentials import update
pyproject.toml, airbyte/caches/_utils/_cache_to_dest.py
airbyte-api pinned from >=0.53.0,<1.0 to ==1.0.1. Snowflake credentials import updated to alias DestinationSnowflakeUsernameAndPassword as UsernameAndPassword for compatibility with the new API model.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.61% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective: adapting PyAirbyte to breaking changes in airbyte-api==1.0.1, which is the central change across all modified files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch devin/1782184227-test-airbyte-api-1.0.0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]

This comment was marked as resolved.

…mport

Co-Authored-By: AJ Steers <aj@airbyte.io>
@aaronsteers Aaron ("AJ") Steers (aaronsteers) marked this pull request as ready for review June 23, 2026 06:07
Copilot AI review requested due to automatic review settings June 23, 2026 06:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins PyAirbyte’s airbyte-api dependency to a 1.0.0 pre-release to run regression testing across the CI matrix and adjust Snowflake destination credential model usage for the updated SDK.

Changes:

  • Pin airbyte-api from a <1.0 range to ==1.0.0rc2 in project dependencies and lockfile.
  • Update Snowflake destination credential model import to the new SDK model name while preserving the local UsernameAndPassword alias.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
pyproject.toml Pins runtime dependency airbyte-api==1.0.0rc2.
uv.lock Locks airbyte-api to 1.0.0rc2 and updates its transitive dependency set.
airbyte/caches/_utils/_cache_to_dest.py Updates Snowflake credential model import to match the SDK’s renamed model.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment on lines 10 to 12
dependencies = [
"airbyte-api>=0.53.0,<1.0",
"airbyte-api==1.0.0rc2",
"airbyte-cdk>=7.21.1,<8.0.0",

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Open in Devin Review

Comment thread pyproject.toml Outdated
dynamic = ["version"]
dependencies = [
"airbyte-api>=0.53.0,<1.0",
"airbyte-api==1.0.0rc2",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Dependency pinned to a release candidate version

The airbyte-api dependency is pinned to ==1.0.0rc2, a release candidate. This is a hard pin to a pre-release version, which means:

  1. No automatic pickup of bug fixes or the final 1.0.0 release.
  2. RC versions may have known issues that get fixed before GA.
  3. Other libraries depending on airbyte-api with different version constraints could cause resolution conflicts.

The previous constraint >=0.53.0,<1.0 was a range. If this pin is intentional for testing the RC, it should be loosened before a production release of PyAirbyte.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread pyproject.toml Outdated
dynamic = ["version"]
dependencies = [
"airbyte-api>=0.53.0,<1.0",
"airbyte-api==1.0.0rc2",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Incomplete migration — other airbyte_api imports not audited for breaking changes

The PR only updates one import (UsernameAndPasswordDestinationSnowflakeUsernameAndPassword), but the major version bump from <1.0 to 1.0.0rc2 could introduce other breaking changes in the airbyte_api SDK (e.g., changed method signatures on airbyte_api.AirbyteAPI, renamed fields on response models, changes to models.Security or models.SchemeClientCredentials used in airbyte/_util/api_util.py:226-236). I verified all model class names still exist in the new version's __init__.py, but could not verify constructor signatures, method APIs, or runtime behavior changes without running the test suite. The CI pipeline should confirm these, but a reviewer should verify tests pass end-to-end.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

- Pin airbyte-api==1.0.0rc3
- Add request= keyword to all SDK method calls (keyword-only in v1)
- Update AirbyteApiResponseDuckType protocol: requests.Response -> httpx.Response
- Rename UsernameAndPassword -> DestinationSnowflakeUsernameAndPassword
- Fix test helpers: ConnectionResponse now requires schedule.scheduleType and tags
- Update test mocks to use httpx.Response instead of requests.Response

Co-Authored-By: AJ Steers <aj@airbyte.io>
@devin-ai-integration devin-ai-integration Bot changed the title Do not merge: test airbyte-api==1.0.0 regression testing chore: adapt PyAirbyte to airbyte-api 1.0.0rc3 breaking changes Jun 23, 2026
Co-Authored-By: AJ Steers <aj@airbyte.io>
@devin-ai-integration devin-ai-integration Bot changed the title chore: adapt PyAirbyte to airbyte-api 1.0.0rc3 breaking changes chore: adapt PyAirbyte to airbyte-api==1.0.1 breaking changes Jun 23, 2026
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.

2 participants