Skip to content

fix(source-mixpanel): replace deprecated MessageRepresentationAirbyteTracedErrors with AirbyteTracedException#76039

Merged
Patrick Nilan (pnilan) merged 3 commits into
masterfrom
devin/1775148465-fix-source-mixpanel-deprecated-import
Apr 3, 2026
Merged

fix(source-mixpanel): replace deprecated MessageRepresentationAirbyteTracedErrors with AirbyteTracedException#76039
Patrick Nilan (pnilan) merged 3 commits into
masterfrom
devin/1775148465-fix-source-mixpanel-deprecated-import

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

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

What

Replace the removed MessageRepresentationAirbyteTracedErrors class with AirbyteTracedException in source-mixpanel 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 the import from airbyte_cdk.sources.streams.http.http_client.MessageRepresentationAirbyteTracedErrors to airbyte_cdk.utils.traced_exception.AirbyteTracedException
  • Updated the except clause in test_handle_time_zone_mismatch to catch AirbyteTracedException
  • Fixed import ordering to satisfy ruff (alphabetical within airbyte_cdk block)
  • Bumped version 3.6.1 → 3.6.2

Review guide

  1. unit_tests/test_streams.py — import replacement + catch clause update
  2. metadata.yaml / pyproject.toml — version bump
  3. docs/integrations/sources/mixpanel.md — changelog entry

Key consideration: MessageRepresentationAirbyteTracedErrors was a subclass of AirbyteTracedException. Catching the base class is now slightly broader. In this test (test_handle_time_zone_mismatch), the assertion on airbyte_error.message still validates the specific error, so a false-positive pass is unlikely. 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

…TracedErrors 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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

👋 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.

Co-Authored-By: bot_apk <apk@cognition.ai>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

source-mixpanel Connector Test Results

52 tests   48 ✅  30s ⏱️
 2 suites   4 💤
 2 files     0 ❌

Results for commit cfd4a73.

♻️ This comment has been updated with latest results.

Co-Authored-By: bot_apk <apk@cognition.ai>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

Deploy preview for airbyte-docs ready!

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

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

@pnilan Patrick Nilan (pnilan) marked this pull request as ready for review April 2, 2026 17:31
@pnilan
Copy link
Copy Markdown
Contributor

Patrick Nilan (pnilan) commented Apr 2, 2026

/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!

Copy link
Copy Markdown
Contributor

@pnilan Patrick Nilan (pnilan) left a comment

Choose a reason for hiding this comment

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

Pending ai-prove-fix

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

devin-ai-integration Bot commented Apr 2, 2026

Fix Validation Evidence

Outcome: Fix Validated — No Regressions Detected

Session: Devin Session

Phase Status
Context Gathering ✅ Complete
Pre-flight Checks ✅ All passed
Pre-release Publish 3.6.2-preview.cfd4a73 (workflow)
Evidence Plan ✅ Complete
Regression Tests ✅ No regressions (workflow)
Live Connection Tests ⬜ Not applicable (test-only change)

Evidence Summary

Regression tests (comparison mode) ran spec, check, discover, and read against both control (v3.6.1) and target (v3.6.2-preview.cfd4a73):

Command Control (3.6.1) Target (3.6.2-preview) Regression?
spec ✅ Pass ✅ Pass No
check ✅ Pass ✅ Pass No
discover ❌ Fail ❌ Fail No — identical failure, pre-existing
read ⏭️ Skipped ⏭️ Skipped N/A — no catalog from discover

The discover failure occurred identically in both versions, confirming it is a pre-existing infrastructure/credential issue unrelated to this PR. The target version introduced zero behavioral changes compared to the control version.

This is the expected outcome because this PR only modifies unit_tests/test_streams.py — no runtime code is changed. The connector binary is identical in both versions.

Additional Validation

  • CI unit tests: 52 tests, 48 passed, 4 skipped, 0 failures — confirms the import replacement works correctly
  • No runtime code changes: Only test imports updated (MessageRepresentationAirbyteTracedErrorsAirbyteTracedException)
  • No schema/spec/state changes: Zero risk of downstream impact
  • Live connection testing: Not applicable — pinning to the pre-release would produce identical sync behavior since no runtime paths are modified

Recommendation

This PR is safe to merge. The fix correctly replaces a removed import in test code. Regression tests confirm identical runtime behavior between control and target versions.

Pre-flight Checks
  • Viability: Fix correctly replaces removed MessageRepresentationAirbyteTracedErrors with its base class AirbyteTracedException. The test assertion on airbyte_error.message still validates the specific error, so a false-positive pass is unlikely.
  • Safety: No suspicious code patterns, no credential changes, no external network calls. Pure import replacement in test code.
  • Breaking Change: NOT breaking. No schema changes, no spec changes, no stream removals, no state changes, no PK/cursor changes. Only test code modified.
  • Reversibility: Trivially reversible — patch version bump (3.6.1 → 3.6.2), no state/config format changes.
Evidence Plan

Nature of the Change

This PR is a test-only fix — it replaces a deprecated import (MessageRepresentationAirbyteTracedErrors) with the base class (AirbyteTracedException) in unit_tests/test_streams.py. No runtime connector code is modified. The connector's actual source code, schemas, spec, and state handling are completely untouched.

Proving Criteria

  1. Regression tests pass in comparison mode — The target version behaves identically to the control version. ✅ Confirmed
  2. CI unit tests pass — 52 tests, 48 passed, 4 skipped, 0 failures. ✅ Confirmed

Disproving Criteria

  1. Regression tests show behavioral differences — Not observed
  2. New errors in target version — Not observed

Devin session

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

Pre-release Connector Publish Started

Publishing pre-release build for connector source-mixpanel.
PR: #76039

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

View workflow run
Pre-release Publish: SUCCESS

Docker image (pre-release):
airbyte/source-mixpanel:3.6.2-preview.cfd4a73

Docker Hub: https://hub.docker.com/layers/airbyte/source-mixpanel/3.6.2-preview.cfd4a73

Registry JSON:

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

↪️ Triggering /ai-review per Hands-Free AI Triage Project triage next step.

Reason: Prove-fix validated, CI all green — advancing to review stage.
Linked issue: https://github.com/airbytehq/oncall/issues/11850

Session: https://app.devin.ai/sessions/944109c31676472da2e61c4602224cad

@octavia-bot
Copy link
Copy Markdown
Contributor

octavia-bot Bot commented Apr 3, 2026

AI PR Review starting...

Reviewing PR for connector safety and quality.
View playbook

Devin AI session created successfully!

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

devin-ai-integration Bot commented Apr 3, 2026

AI PR Review Report

Review Action: NO ACTION (NOT ELIGIBLE)

Gate Status
PR Hygiene PASS
Code Hygiene PASS
Test Coverage PASS
Code Security PASS
Per-Record Performance PASS
Breaking Dependencies PASS
Backwards Compatibility PASS
Forwards Compatibility PASS
Behavioral Changes PASS
Out-of-Scope Changes PASS
CI Checks PASS
Live / E2E Tests PASS

📋 PR Details & Eligibility

Connector & PR Info

Connector(s): source-mixpanel
PR: #76039
HEAD SHA: cfd4a735e14fe5962b61a4db5b251f3d210cfc88
Session: https://app.devin.ai/sessions/a55c1902a5694d4da0da73d4f6a43d1e

Auto-Approve Eligibility

Eligible: No
Category: not-eligible
Reason: PR modifies test code (unit_tests/test_streams.py) with functional changes (import replacement and except clause update), plus version bumps in metadata.yaml and pyproject.toml. This does not fit any auto-approve category (docs-only, additive spec, patch/minor deps, or comment/whitespace-only).

Review Action Details

NO ACTION (NOT ELIGIBLE) — All gates pass but PR is not eligible for auto-approval because it contains functional test code changes beyond docs/spec/deps. No PR review submitted. Human review required.

Note: This bot can approve PRs when all gates pass AND the PR is eligible for auto-approval (docs-only, additive spec changes, patch/minor dependency bumps, or comment/whitespace-only changes). PRs with other types of changes require human review even if all gates pass.

🔍 Gate Evaluation Details

Gate-by-Gate Analysis

Gate Status Enforced? Details
PR Hygiene PASS Yes Description: 1753 chars, meaningful content. Changelog updated in docs/integrations/sources/mixpanel.md. No unresolved human reviewer comments (pnilan's REQUEST_CHANGES was "Pending ai-prove-fix" — prove-fix completed).
Code Hygiene PASS WARNING No source code modified — only test file (unit_tests/test_streams.py) and version/metadata files changed. Coverage check exempt (no source code changes).
Test Coverage PASS Yes Behavioral change indicators: title contains "fix". Test files modified with functional changes (import replacement in test_streams.py, except clause updated). New test content not required as this fixes existing test infrastructure, not connector behavior.
Code Security PASS Yes No security-sensitive file patterns matched. metadata.yaml diff contains only dockerImageTag version bump — no security keywords (authenticator, OAuthAuthenticator, api_key, etc.).
Per-Record Performance PASS WARNING No record processing code changed. Only test imports modified.
Breaking Dependencies PASS WARNING No dependency version changes. Only connector version bumped (3.6.1 → 3.6.2).
Backwards Compatibility PASS Blocks Auto-Approve No spec changes. metadata.yaml only has dockerImageTag version bump. No streams removed/renamed, no PK/cursor changes, no schema changes.
Forwards Compatibility PASS Blocks Auto-Approve No state/cursor/pagination/transformation keywords in diff hunks. Only test import and except clause changed.
Behavioral Changes PASS Blocks Auto-Approve No operational risk keywords (rate_limit, retry, backoff, timeout, sleep, error_handler, etc.) found in diff hunks.
Out-of-Scope Changes PASS Skip All 4 changed files are within connector scope (airbyte-integrations/connectors/source-mixpanel/) or docs (docs/integrations/sources/mixpanel.md).
CI Checks PASS Yes All core CI checks passed: Connector CI Checks Summary ✅, Test source-mixpanel Connector ✅, Lint source-mixpanel Connector ✅, Build and Verify Artifacts (source-mixpanel) ✅. 52 tests: 48 passed, 4 skipped, 0 failures.
Live / E2E Tests PASS Yes Title contains "fix" — validation required. Evidence: Pre-release 3.6.2-preview.cfd4a73 published and regression tests ran in comparison mode (control=3.6.1, target=3.6.2-preview). spec ✅, check ✅, discover ❌ (identical pre-existing failure in both versions — no regression). Additionally, this is a test-only change with zero runtime code modifications.

Detailed File Analysis

Changed files (4):

  1. airbyte-integrations/connectors/source-mixpanel/metadata.yamldockerImageTag: 3.6.13.6.2
  2. airbyte-integrations/connectors/source-mixpanel/pyproject.tomlversion = "3.6.1""3.6.2"
  3. airbyte-integrations/connectors/source-mixpanel/unit_tests/test_streams.py — Replaced import MessageRepresentationAirbyteTracedErrors with AirbyteTracedException; updated except clause accordingly
  4. docs/integrations/sources/mixpanel.md — Added changelog entry for 3.6.2 (+ reformatted existing entries to remove trailing whitespace)
📚 Evidence Consulted

Evidence

  • Changed files: 4 files
  • CI checks: All 44 passed (Connector CI ✅, Test ✅, Lint ✅, Build ✅, Pre-Release ✅, CodeQL ✅, Format ✅, Docs ✅)
  • PR labels: connectors/source/mixpanel
  • PR description: Present (1753 chars), detailed with What/How/Review Guide/User Impact sections
  • Existing bot reviews: REQUEST_CHANGES by pnilan for "Pending ai-prove-fix" — prove-fix completed with validation evidence
  • Prove-fix evidence: Pre-release 3.6.2-preview.cfd4a73 published, regression tests passed (no regressions detected)

Devin session

@pnilan Patrick Nilan (pnilan) merged commit 1810787 into master Apr 3, 2026
54 checks passed
@pnilan Patrick Nilan (pnilan) deleted the devin/1775148465-fix-source-mixpanel-deprecated-import branch April 3, 2026 16:35
dilanalex pushed a commit to dilanalex/airbyte that referenced this pull request Apr 6, 2026
…TracedErrors with AirbyteTracedException (airbytehq#76039)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: bot_apk <apk@cognition.ai>
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.

2 participants