Repository navigation
feat(mcp): give non-Cloud tool errors fixed Datadog span messages from exception docstrings - #1358
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. 💡 Show Tips and TricksTesting This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1791758951-mcp-tool-error-trace-messages' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1791758951-mcp-tool-error-trace-messages'PR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
📚 Show Repo GuidanceHelpful ResourcesCommunity SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
Code Coverage OverviewLanguages: Python Python / code-coverage/pytest-no-credsThe overall line coverage in commit d6a598d in the Show a line coverage summary of the most impacted files.
Python / code-coverage/pytestThe overall line coverage in commit d6a598d in the Show a line coverage summary of the most impacted files.
Python / code-coverage/pytest-unitThe overall line coverage in commit d6a598d in the Show a line coverage summary of the most covered files.
Updated |
|
Codex (@codex) review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e36f997f7e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
Aaron ("AJ") Steers (aaronsteers)
left a comment
There was a problem hiding this comment.
Approved. Great work integrating with the existing exception class declarations. This is a nice reuse of those existing date structures.
bce0b0e
into
release-candidate/v1
TL;DR: Failed tool calls that aren't Cloud API errors (local-demo-mode refusals, a missing workspace, bad input, an unknown tool, ...) now get a fixed, class-specific Datadog
error.message: the first line of the exception class's docstring. Before, they gottool resulted in an error (user_error). There's no separate list to maintain, and what the agent sees doesn't change.Summary
#1356 put fixed text on the span only for Cloud API errors. Every other failure still exported only the classification summary, so trace consumers (e.g. an eval pipeline judging whether a refusal explained itself) had nothing to go on.
AirbyteLibError.get_message()already uses as its default._NON_AIRBYTE_TOOL_ERROR_MESSAGEScovers the 5 types we don't own: FastMCPValidationError/NotFoundError/DisabledError,asyncio.CancelledErrorandNotImplementedError. It's keyed by class, so a pydanticValidationErrorraised inside tool code doesn't match FastMCP's argument-validation entry._datadog._exception_attributesand_raised_tool_error_messagenow calltool_error_trace_messageinstead ofcloud_error_trace_message. The OTel backend is untouched: span messages stay Datadog-only, as in feat(mcp): use fixed Cloud error message as Datadog span error.message #1356.AirbyteMissingResourceError,AirbyteConnectionSyncTimeoutError). This also changesget_message()'s default text for those two classes when they're raised without a message.test_airbyte_exception_docstrings_have_safe_first_linesrequires everyairbyte.exceptionsclass to have a docstring first line with no{,}or://. The real-FastMCP end-to-end test covers a local-demo-mode refusal, bad arguments and an unknown tool. It also checks three more things: the bareValueErrorand Cloud cases are unchanged, no exception text appears in span tags, and the agent-facing text is unchanged.Example, the local-demo-mode refusal span:
Link to Devin session: https://app.devin.ai/sessions/85c491e543a74ab89151fdf7a0ba5d20
Open in Devin Desktop: https://app.devin.ai/desktop/session/85c491e543a74ab89151fdf7a0ba5d20?variant=devin
Requested by: Caleb Evans (@calebevans-ab)
Important
Auto-merge enabled.
This PR is set to merge automatically when all requirements are met.