fix: restore backward-compatible MessageRepresentationAirbyteTracedErrors alias#976
Conversation
…rors alias Co-Authored-By: bot_apk <apk@cognition.ai>
🤖 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 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/1775067700-restore-deprecated-alias#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/1775067700-restore-deprecated-aliasPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
|
There was a problem hiding this comment.
Pull request overview
Restores a backward-compatible MessageRepresentationAirbyteTracedErrors symbol in http_client.py to prevent downstream ImportErrors in connectors that still import the old name after PR #927 removed the subclass.
Changes:
- Reintroduce
MessageRepresentationAirbyteTracedErrorsas a module-level alias ofAirbyteTracedException. - Add unit tests validating the alias is importable, identical to
AirbyteTracedException, and usable in exception raising/catching flows.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| airbyte_cdk/sources/streams/http/http_client.py | Adds the backward-compatible alias MessageRepresentationAirbyteTracedErrors = AirbyteTracedException. |
| unit_tests/sources/streams/http/test_http_client.py | Adds regression tests ensuring the alias remains available and behaves equivalently to AirbyteTracedException. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
PR #927 removed the
MessageRepresentationAirbyteTracedErrorsclass fromhttp_client.pywhen promoting its__str__behavior into the baseAirbyteTracedException. However, several connectors in theairbytehq/airbytemonorepo still importMessageRepresentationAirbyteTracedErrorsby name, causingImportErrorat connector startup (affects CDK v7.10.2 through v7.15.0).This PR restores a simple module-level alias:
This is an additive, non-breaking change. A companion PR in the monorepo will migrate all downstream usages to
AirbyteTracedExceptiondirectly.Resolves https://github.com/airbytehq/oncall/issues/11850:
Related to #946:
MessageRepresentationAirbyteTracedErrors, breaking multiple connectors #946Review & Testing Checklist for Human
MessageRepresentationAirbyteTracedErrorswas only used as a catch target and for raising, never subclassed, so a plain alias (not a subclass) is correctDeprecationWarningshould be emitted to nudge downstream migration (intentionally omitted here for simplicity; downstream migration PR is in progress)Notes
semantic-pr-release-drafter— no manual version bump neededsource-github(runtime breakage),source-mixpanelandsource-linkedin-ads(test-only breakage)Link to Devin session: https://app.devin.ai/sessions/83cdd5ae8ab140fa9b4c072d44e9163a