Skip to content

fix: use message=None instead of message="" in job_orchestrator#935

Merged
sophiecuiy merged 1 commit intomainfrom
sophie/fix-job-orchestrator-empty-message
Mar 6, 2026
Merged

fix: use message=None instead of message="" in job_orchestrator#935
sophiecuiy merged 1 commit intomainfrom
sophie/fix-job-orchestrator-empty-message

Conversation

@sophiecuiy
Copy link
Copy Markdown
Contributor

@sophiecuiy sophiecuiy commented Mar 6, 2026

Summary

  • Changes message="" to message=None in job_orchestrator.py:484 so that str(exc) falls back to the detailed internal_message instead of returning an empty string.

This is a companion fix for PR #927, which adds is not None checks in AirbyteTracedException.__str__. With those checks, message="" would return "" instead of falling back to internal_message, silently losing all diagnostic context.

Test plan

  • Existing tests pass — no behavioral change for the as_airbyte_message() output since it reads message and internal_message fields directly.
  • str(exc) now correctly returns the joined internal_message instead of an empty string.

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved error message handling in async job orchestration to provide clearer feedback when configuration issues occur.

Important

Auto-merge enabled.

This PR is set to merge automatically when all requirements are met.

With the `is not None` checks in `AirbyteTracedException.__str__` (PR #927),
`message=""` returns an empty string instead of falling back to the detailed
`internal_message`. Using `None` lets the fallback work correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 6, 2026 00:36
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 6, 2026

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

Testing This CDK Version

You 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@sophie/fix-job-orchestrator-empty-message#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 sophie/fix-job-orchestrator-empty-message

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /autofix - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test - Runs connector tests with the updated CDK
  • /prerelease - Triggers a prerelease publish with default arguments
  • /poe build - Regenerate git-committed build artifacts, such as the pydantic models which are generated from the manifest JSON schema in YAML.
  • /poe <command> - Runs any poe command in the CDK environment
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates AirbyteTracedException construction in the async job orchestrator to ensure str(exc) preserves diagnostic context after the AirbyteTracedException.__str__ behavior change introduced in PR #927.

Changes:

  • Replace message="" with message=None when raising AirbyteTracedException so __str__ falls back to internal_message.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 6, 2026

📝 Walkthrough

Walkthrough

A single-line change in the job orchestrator that modifies the exception payload when raising a final aggregated error. The message parameter is changed from an empty string to None in an AirbyteTracedException, while preserving the failure type and internal message logic.

Changes

Cohort / File(s) Summary
Exception Payload Update
airbyte_cdk/sources/declarative/async_job/job_orchestrator.py
Modified exception instantiation in create_and_get_completed_partitions to use message=None instead of message="" when raising the final AirbyteTracedException, altering exception semantics without changing control flow.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: replacing message="" with message=None in job_orchestrator.py, which is the sole modification in this PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sophie/fix-job-orchestrator-empty-message

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 6, 2026

PyTest Results (Fast)

3 890 tests  ±0   3 878 ✅ ±0   6m 19s ⏱️ -28s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 943b89c. ± Comparison against base commit b6abaed.

@sophiecuiy sophiecuiy enabled auto-merge (squash) March 6, 2026 00:44
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 6, 2026

PyTest Results (Full)

3 893 tests  ±0   3 881 ✅ ±0   11m 10s ⏱️ -17s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 943b89c. ± Comparison against base commit b6abaed.

@sophiecuiy sophiecuiy merged commit 6136336 into main Mar 6, 2026
36 checks passed
@sophiecuiy sophiecuiy deleted the sophie/fix-job-orchestrator-empty-message branch March 6, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants