Skip to content

fix(source-nexus-datasets): add missing imports for AirbyteTracedException and FailureType#76138

Merged
Patrick Nilan (pnilan) merged 3 commits intomasterfrom
devin/1775594690-fix-nexus-datasets-missing-imports
Apr 9, 2026
Merged

fix(source-nexus-datasets): add missing imports for AirbyteTracedException and FailureType#76138
Patrick Nilan (pnilan) merged 3 commits intomasterfrom
devin/1775594690-fix-nexus-datasets-missing-imports

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot commented Apr 7, 2026

What

Fixes missing imports for AirbyteTracedException and FailureType in source-nexus-datasets/components.py. Without these imports, the FlexibleDecoder.decode() method raises a NameError at runtime instead of the intended AirbyteTracedException when encountering HTTP 304, 202, or other non-200 status codes.

Also fixes a CI failure caused by the Nexus API returning application/octet-stream content type for data exports, which the decoder did not previously accept.

Resolves https://github.com/airbytehq/airbyte-internal-issues/issues/16157

How

  • Added from airbyte_cdk.models import FailureType import
  • Added from airbyte_cdk.utils.traced_exception import AirbyteTracedException import
  • Added application/octet-stream to the accepted content types in FlexibleDecoder.decode() (the Nexus API uses this content type for JSONL data exports)
  • Bumped connector version from 0.1.3 to 0.1.4
  • Added changelog entry
  • Created unit test infrastructure (conftest.py, pyproject.toml) and test file for this manifest-only connector
  • Updated unit test CDK dependency from 6.x to >=7.0.0,<8.0.0 to match the runtime base image (source-declarative-manifest:7.10.0)

Review guide

  1. components.py — two import additions (lines 17, 21) and application/octet-stream added to accepted content types (line 196)
  2. unit_tests/test_components.py — 7 tests covering all FlexibleDecoder.decode() paths: error statuses, success, octet-stream, and unsupported content type
  3. unit_tests/conftest.py — wires up the CDK's manifest_only_fixtures for component loading
  4. unit_tests/pyproject.toml — test dependencies pinned to CDK 7.x
  5. metadata.yaml — version bump to 0.1.4
  6. docs/integrations/sources/nexus-datasets.md — changelog entry

⚠️ Reviewer checklist

  • Verify application/octet-stream is a safe content type to accept as JSONL — the Nexus API returns it for data exports, but it is a generic binary type. Confirm this doesn't silently swallow non-JSONL binary responses.
  • The cumulative diff may show airbyte-cdk = "6.10.0" and [XXXXX] placeholder — both were fixed in the latest commit (5d00445). Verify they are correct on the branch head.

User Impact

Connector error handling now works correctly. Previously, non-200 HTTP responses (304, 202, 5xx, etc.) would crash with an unhelpful NameError instead of surfacing the intended user-facing error message via AirbyteTracedException. Additionally, successful data reads that returned application/octet-stream content type would fail with a ValueError — these are now decoded correctly.

Can this PR be safely reverted and rolled back?

  • YES 💚

Link to Devin session: https://app.devin.ai/sessions/6c39a2e90977482a8601d2ee80e58292

…ption and FailureType

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

github-actions bot commented Apr 7, 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

source-nexus-datasets Connector Test Results

10 tests   9 ✅  7s ⏱️
 2 suites  1 💤
 2 files    0 ❌

Results for commit 5d00445.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Deploy preview for airbyte-docs ready!

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

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

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.

API Source PR Review

Connector: source-nexus-datasets
Connector Type: Low-code with custom components (manifest-only + components.py)
Linked Issue: https://github.com/airbytehq/airbyte-internal-issues/issues/16157

Verdict: APPROVED WITH CHANGES

The fix is correct and complete — adding the two missing imports for AirbyteTracedException and FailureType resolves the NameError on all error-handling paths. Tests are well-targeted and use the CDK fixture pattern correctly.

Two items to address before merge:


1. CDK version mismatch in unit tests

unit_tests/pyproject.toml pins airbyte-cdk = "6.10.0", but the runtime base image is source-declarative-manifest:7.10.0 (CDK 7.x). Tests should run against the same major version as production.

# Before
airbyte-cdk = "6.10.0"

# After
airbyte-cdk = ">=7.0.0,<8.0.0"

2. Changelog placeholder PR number

docs/integrations/sources/nexus-datasets.md has [XXXXX] instead of the actual PR number:

# Before
| 0.1.4 | 2026-04-07 | [XXXXX](https://github.com/airbytehq/airbyte/pull/XXXXX) | ...

# After
| 0.1.4 | 2026-04-07 | [76138](https://github.com/airbytehq/airbyte/pull/76138) | ...

@pnilan
Copy link
Copy Markdown
Contributor

CI checks are failing -- review, suggest fix, don't say "they're preexisting failures"

@pnilan
Copy link
Copy Markdown
Contributor

Why are CI checks failing?

devin-ai-integration bot and others added 2 commits April 9, 2026 20:55
…ype in FlexibleDecoder

Co-Authored-By: bot_apk <apk@cognition.ai>
…x and fix changelog PR number

Co-Authored-By: bot_apk <apk@cognition.ai>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Both review items addressed in commit 5d00445:

  1. CDK version mismatch: Updated unit_tests/pyproject.toml from airbyte-cdk = "6.10.0" to airbyte-cdk = ">=7.0.0,<8.0.0" (resolves to 7.17.0). All 7 unit tests pass with CDK 7.x.

  2. Changelog placeholder: Replaced [XXXXX] with [76138] in docs/integrations/sources/nexus-datasets.md.

Additionally, the previous commit (76e4df0) fixed the CI test_basic_read failure by adding application/octet-stream to the accepted content types in FlexibleDecoder.decode() — the Nexus API returns this content type for data exports.


Devin session

@pnilan Patrick Nilan (pnilan) merged commit 3281913 into master Apr 9, 2026
44 checks passed
@pnilan Patrick Nilan (pnilan) deleted the devin/1775594690-fix-nexus-datasets-missing-imports branch April 9, 2026 21:44
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