Repository navigation
fix(mcp): surface the SQL passthrough notice in metadata.warnings so MCP renderers show it - #1257
Conversation
…MCP renderers show it Co-authored-by: Piotr Kozikowski <piotr.kozikowski@gmail.com> Co-Authored-By: AJ Steers <aj@airbyte.io>
|
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/1790381492-sql-notice-metadata-warnings' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1790381492-sql-notice-metadata-warnings'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 52fbb32 in the Show a line coverage summary of the most impacted files.
Python / code-coverage/pytestThe overall line coverage in commit 52fbb32 in the Show a line coverage summary of the most impacted files.
Python / code-coverage/pytest-unitThe overall line coverage in commit 52fbb32 in the Show a line coverage summary of the most covered files.
Updated |
…_warning Co-authored-by: Piotr Kozikowski <piotr.kozikowski@gmail.com> Co-Authored-By: AJ Steers <aj@airbyte.io>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review issues remain.
Review effort: Lite
Findings: None
What changed in this PR
Updates SQL passthrough warning placement so MCP renderers expose notices through metadata.warnings.
Changes:
- Stores notices in guidance metadata.
- Adds coverage for metadata and both MCP renderers.
| File | Summary |
|---|---|
tests/unit_tests/test_cloud_describe.py |
Verifies metadata and rendered warnings. |
airbyte/_direct_connectors/connector_docs.py |
Places SQL notices in guidance metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
c36aa80
into
release-candidate/v1
Overview
👉 TL;DR: The "SQL passthrough is not enabled" notice for a destination was attached to a field the MCP tools never read, so agents never saw it as a warning. It now lands where both MCP docs renderers look.
Specifically,
build_direct_access_sql_guidancenow putsSQL_PASSTHROUGH_NOT_ENABLED_NOTICEintoDirectAccessGuidanceIndexEntry.warnings(guidance.metadata.warnings) instead of the top-levelDirectAccessGuidance.warnings;render_connector_docs_resultandrender_agent_skill_docs_resultreaddocs.metadata.warnings.Supersedes part of #1240 (re-cut as a focused PR; co-authored with Piotr Kozikowski (@pkozikow)).
Changes
airbyte/_direct_connectors/connector_docs.py::build_direct_access_sql_guidance: move thewarnings=[sql_passthrough_notice]kwarg from theDirectAccessGuidance(...)return to theDirectAccessGuidanceIndexEntry(...)metadata.tests/unit_tests/test_cloud_describe.py: the two destination-guidance tests assertguidance.metadata.warnings == [notice]and that both MCP renderers surface it.Test plan
uv run pytest tests/unit_tests/test_cloud_describe.py -q-> 35 passeduv run ruff check/uv run ruff format --check-> cleanLink to Devin session: https://app.devin.ai/sessions/3c39d8b470bb44f8929a9e9d6ab5c178
Open in Devin Desktop: https://app.devin.ai/desktop/session/3c39d8b470bb44f8929a9e9d6ab5c178?variant=devin
Requested by: Aaron ("AJ") Steers (@aaronsteers)