Skip to content

fix(source-linkedin-ads): replace deprecated MessageRepresentationAirbyteTracedErrors with AirbyteTracedException - #76040

Merged
Patrick Nilan (pnilan) merged 4 commits into
masterfrom
devin/1775148530-fix-source-linkedin-ads-deprecated-import
Apr 6, 2026
Merged

Patrick Nilan (pnilan) merged 4 commits into
masterfrom
devin/1775148530-fix-source-linkedin-ads-deprecated-import

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor

What

Replace the removed MessageRepresentationAirbyteTracedErrors class with its base class AirbyteTracedException in source-linkedin-ads unit tests.

MessageRepresentationAirbyteTracedErrors was removed from airbyte_cdk.sources.streams.http.http_client in CDK PR #927 (v7.10.2) without a backward-compatible alias, causing ImportError when running the test suite on newer CDK versions.

Resolves https://github.com/airbytehq/oncall/issues/11850:

How

  • Changed import from airbyte_cdk.sources.streams.http.http_client.MessageRepresentationAirbyteTracedErrors to airbyte_cdk.utils.traced_exception.AirbyteTracedException
  • Updated pytest.raises(MessageRepresentationAirbyteTracedErrors) → pytest.raises(AirbyteTracedException) in test_should_retry_on_error
  • Bumped connector version 5.6.5 → 5.6.6

Review guide

  1. unit_tests/test_source.py — import replacement and pytest.raises update
  2. metadata.yaml — version bump to 5.6.6
  3. docs/integrations/sources/linkedin-ads.md — changelog entry

Key consideration: MessageRepresentationAirbyteTracedErrors was a subclass of AirbyteTracedException. The pytest.raises is now slightly broader — it will pass for any AirbyteTracedException, not just HTTP-client-originated ones. Since this test exercises HTTP error codes (429, 500, 503) through the HTTP client, the exception origin is unchanged in practice. Verify this is acceptable.

User Impact

No user-facing behavior change. Fixes broken test suite on CDK >= v7.10.2.

Can this PR be safely reverted and rolled back?

  • YES 💚

Link to Devin session: https://app.devin.ai/sessions/83cdd5ae8ab140fa9b4c072d44e9163a

…byteTracedErrors with AirbyteTracedException

Replace import and usage of the removed MessageRepresentationAirbyteTracedErrors
class with AirbyteTracedException from airbyte_cdk.utils.traced_exception in test file.

The MessageRepresentationAirbyteTracedErrors class was removed in CDK PR #927
(airbyte-python-cdk v7.10.2) without a backward-compatible alias, causing ImportError.

Resolves airbytehq/oncall#11850

Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 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 and CI monitoring

@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • 🛠️ Quick Fixes
    • /format-fix - Fixes most formatting issues.
    • /bump-version - Bumps connector versions, scraping changelog description from the PR title.
      • Bump types: patch (default), minor, major, major_rc, rc, promote.
      • The rc type is a smart default: applies minor_rc if stable, or bumps the RC number if already RC.
      • The promote type strips the RC suffix to finalize a release.
      • Example: /bump-version type=rc or /bump-version type=minor
    • /bump-progressive-rollout-version - Alias for /bump-version type=rc. Bumps with an RC suffix and enables progressive rollout.
  • ❇️ AI Testing and Review (internal link: AI-SDLC Docs):
    • /ai-prove-fix - Runs prerelease readiness checks, including testing against customer connections.
    • /ai-canary-prerelease - Rolls out prerelease to 5-10 connections for canary testing.
    • /ai-review - AI-powered PR review for connector safety and quality gates.
  • 🚀 Connector Releases:
    • /publish-connectors-prerelease - Publishes pre-release connector builds (tagged as {version}-preview.{git-sha}) for all modified connectors in the PR.
  • ☕️ JVM connectors:
    • /update-connector-cdk-version connector=<CONNECTOR_NAME> - Updates the specified connector to the latest CDK version.
      Example: /update-connector-cdk-version connector=destination-bigquery
  • 🐍 Python connectors:
    • /poe connector source-example lock - Run the Poe lock task on the source-example connector, committing the results back to the branch.
    • /poe source example lock - Alias for /poe connector source-example lock.
    • /poe source example use-cdk-branch my/branch - Pin the source-example CDK reference to the branch name specified.
    • /poe source example use-cdk-latest - Update the source-example CDK dependency to the latest available version.
  • ⚙️ Admin commands:
    • /force-merge reason="<REASON>" - Force merges the PR using admin privileges, bypassing CI checks. Requires a reason.
      Example: /force-merge reason="CI is flaky, tests pass locally"
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

devin-ai-integration Bot and others added 2 commits April 2, 2026 16:53
Co-Authored-By: bot_apk <apk@cognition.ai>
Co-Authored-By: bot_apk <apk@cognition.ai>
@github-actions

github-actions Bot commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor

Deploy preview for airbyte-docs ready!

✅ Preview
https://airbyte-docs-f07y3oltx-airbyte-growth.vercel.app

Built with commit ff5dd6b.
This pull request is being automatically deployed with vercel-action

@github-actions

github-actions Bot commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor

source-linkedin-ads Connector Test Results

160 tests   154 ✅  3m 45s ⏱️
  2 suites    6 💤
  2 files      0 ❌

Results for commit ff5dd6b.

♻️ This comment has been updated with latest results.

@pnilan
Patrick Nilan (pnilan) marked this pull request as ready for review April 2, 2026 17:34
@pnilan

Patrick Nilan (pnilan) commented Apr 2, 2026 •

Copy link
Copy Markdown
Member

/ai-prove-fix

AI Prove Fix Started

Running readiness checks and testing against customer connections.
View workflow run
🔍 AI Prove Fix session starting... Running readiness checks and testing against customer connections. View playbook

✅ Devin AI session created successfully!

@devin-ai-integration

devin-ai-integration Bot commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Fix Validation Evidence

Status: ✅ FIX VALIDATED — No regressions detected. Safe to merge.

Evidence Summary

Evidence Type Result Details
Pre-flight checks ✅ Passed Non-breaking, reversible, safe, viable
Pre-release publish ✅ Published Image: 5.6.6-preview.750dcf1
Regression test: SPEC ✅ Passed No behavioral difference
Regression test: CHECK ✅ Passed No behavioral difference
Regression test: DISCOVER ✅ Passed No behavioral difference
Regression test: READ ⚠️ Both versions failed Pre-existing credential issue in test env; no regression
PR CI unit tests ✅ Passed 168 passed, 8 skipped
Live connection test ⏭️ Skipped Test-only change — no runtime code modified

Key Findings

  1. Regression tests passed (workflow): Comparison mode confirmed zero behavioral differences between 5.6.6-preview.750dcf1 (target) and 5.6.5 (control). The READ step showed both versions failing identically — a pre-existing test environment credential issue, not a regression.

  2. Live testing skipped (justified): This PR modifies only unit test imports — zero runtime/production code changed. The connector binary is functionally identical to v5.6.5. Pinning live connections would not exercise any changed code path.

  3. Production health: Connector is actively functioning with successful syncs in production. Observed failures are pre-existing and unrelated to this PR.

Pre-flight Checks
  • Viability: Fix correctly replaces a removed import (MessageRepresentationAirbyteTracedErrors → AirbyteTracedException). The old class was a subclass of the new one, so pytest.raises scope is slightly broader but functionally equivalent for HTTP error tests.
  • Safety: No suspicious code. Only import path changes in test files and a version bump.
  • Breaking Change: NOT breaking. No schema changes, no spec changes, no state changes, no stream removals. Test-only change with patch version bump.
  • Reversibility: Fully reversible — patch version bump, no state/config format changes.
Evidence Plan

Proving Criteria: Regression tests show no behavioral difference between dev and control versions ✅
Disproving Criteria: Regression tests show behavioral differences or new failures ❌ Not triggered

Test Approach: Since this is a test-only change with no runtime code modifications, live connection pinning would not exercise the fix code path. Regression tests (comparison mode) are the most appropriate evidence for this type of change.

Recommendation

  • ✅ Safe to merge — fix is validated
  • /ai-canary-prerelease is optional but not necessary for a test-only change
  • Daily automation will monitor post-release rollout

Session: https://app.devin.ai/sessions/1b07b363f040491395b5c9dc87f41648

@github-actions

github-actions Bot commented Apr 2, 2026 •

Copy link
Copy Markdown
Contributor

Pre-release Connector Publish Started

Publishing pre-release build for connector source-linkedin-ads.
PR: #76040

Pre-release versions will be tagged as {version}-preview.750dcf1
and are available for version pinning via the scoped_configuration API.

View workflow run
⚠️ Pre-release Publish CANCELLED for source-linkedin-ads.

@pnilan

Copy link
Copy Markdown
Member

Danylo Jablonski (@DanyloGL) It looks like the we're getting blocked on an expired refresh token. Is this something you can help with?

@DanyloGL

Copy link
Copy Markdown
Collaborator

Danylo Jablonski (Danylo Jablonski (@DanyloGL)) It looks like the we're getting blocked on an expired refresh token. Is this something you can help with?

GSM creds updated.

…recated-import, bump to 5.6.7

Co-Authored-By: bot_apk <apk@cognition.ai>
@pnilan
Patrick Nilan (pnilan) merged commit b22321b into master Apr 6, 2026
43 checks passed
@pnilan
Patrick Nilan (pnilan) deleted the devin/1775148530-fix-source-linkedin-ads-deprecated-import branch April 6, 2026 16:03
Kevin (unkedeuxke) added a commit to ollivierj/airbyte that referenced this pull request Aug 17, 2026
The master-sync push (384073d) dropped these two rows while renumbering
5.7.0 -> 6.1.0. They are not duplicates: master carries each exactly once
(airbytehq#76040 and airbytehq#75583, both dated 2026-04-06), so the branch was deleting real
release history as a side effect of the renumber.

A PR adding a stream has no business rewriting entries that predate it. The
changelog diff is now purely the 6.1.0 row, and the whole docs page diff
against master is additive: the Videos bullet, the Videos section and that one
row, with zero deletions.

Thanks to the AI review for catching it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants