chore: adapt PyAirbyte to airbyte-api==1.0.1 breaking changes#1048
chore: adapt PyAirbyte to airbyte-api==1.0.1 breaking changes#1048Aaron ("AJ") Steers (aaronsteers) wants to merge 4 commits into
Conversation
Co-Authored-By: AJ Steers <aj@airbyte.io>
🤖 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:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting This PyAirbyte VersionYou 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 CommandsAirbyte Maintainers can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful ResourcesCommunity SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
Code Coverage OverviewLanguages: Python Python / code-coverage/pytest-fastThe overall coverage in the branch is 67%. The coverage in the branch is 65%. Show a code coverage summary of the most impacted files.
Python / code-coverage/pytest-no-credsThe overall coverage in the branch is 67%. The coverage in the branch is 65%. Show a code coverage summary of the most impacted files.
Python / code-coverage/pytestThe overall coverage in the branch remains at 71%, unchanged from the branch. Show a code coverage summary of the most impacted files.
Updated |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changesairbyte-api 1.0.1 Upgrade with httpx Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
…mport Co-Authored-By: AJ Steers <aj@airbyte.io>
There was a problem hiding this comment.
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-apifrom a<1.0range to==1.0.0rc2in project dependencies and lockfile. - Update Snowflake destination credential model import to the new SDK model name while preserving the local
UsernameAndPasswordalias.
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.
| dependencies = [ | ||
| "airbyte-api>=0.53.0,<1.0", | ||
| "airbyte-api==1.0.0rc2", | ||
| "airbyte-cdk>=7.21.1,<8.0.0", |
| dynamic = ["version"] | ||
| dependencies = [ | ||
| "airbyte-api>=0.53.0,<1.0", | ||
| "airbyte-api==1.0.0rc2", |
There was a problem hiding this comment.
🚩 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:
- No automatic pickup of bug fixes or the final 1.0.0 release.
- RC versions may have known issues that get fixed before GA.
- Other libraries depending on
airbyte-apiwith 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.
Was this helpful? React with 👍 or 👎 to provide feedback.
| dynamic = ["version"] | ||
| dependencies = [ | ||
| "airbyte-api>=0.53.0,<1.0", | ||
| "airbyte-api==1.0.0rc2", |
There was a problem hiding this comment.
🚩 Incomplete migration — other airbyte_api imports not audited for breaking changes
The PR only updates one import (UsernameAndPassword → DestinationSnowflakeUsernameAndPassword), 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.
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>
Co-Authored-By: AJ Steers <aj@airbyte.io>
Summary
Adapts PyAirbyte to work with
airbyte-api==1.0.1(up from0.53.0). The SDK v1.0 release includes several intentional breaking changes:1. Keyword-only
request=argument — all SDK resource methods now requirerequest=as keyword-only. 27 call sites updated inapi_util.py:2. HTTP library migration:
requests→httpx—raw_responsetype changed fromrequests.Responsetohttpx.Response. UpdatedAirbyteApiResponseDuckTypeprotocol inapi_duck_types.py.3. Model rename —
UsernameAndPassword→DestinationSnowflakeUsernameAndPasswordin_cache_to_dest.py(aliased to preserve internal API).4. Schema tightening —
ConnectionResponsenow requiresschedule.scheduleType. Updated test helper intest_cloud_api_util.pyto useConnectionScheduleResponse(schedule_type=ScheduleTypeWithBasicEnum.MANUAL)and migrated mock responses fromrequests.Response()tohttpx.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
1.0.1to improve stability and compatibility.httpxresponses and to consistently pass HTTP request objects via an explicitrequest=argument.httpxresponses/requests for mocked HTTP flows.