Skip to content

fix(mcp): surface the SQL passthrough notice in metadata.warnings so MCP renderers show it - #1257

Merged
Aaron ("AJ") Steers (aaronsteers) merged 2 commits into
release-candidate/v1from
devin/1790381492-sql-notice-metadata-warnings
Oct 3, 2026
Merged

Aaron ("AJ") Steers (aaronsteers) merged 2 commits into
release-candidate/v1from
devin/1790381492-sql-notice-metadata-warnings

Conversation

@aaronsteers

Copy link
Copy Markdown
Member

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_guidance now puts SQL_PASSTHROUGH_NOT_ENABLED_NOTICE into DirectAccessGuidanceIndexEntry.warnings (guidance.metadata.warnings) instead of the top-level DirectAccessGuidance.warnings; render_connector_docs_result and render_agent_skill_docs_result read docs.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 the warnings=[sql_passthrough_notice] kwarg from the DirectAccessGuidance(...) return to the DirectAccessGuidanceIndexEntry(...) metadata.
  • tests/unit_tests/test_cloud_describe.py: the two destination-guidance tests assert guidance.metadata.warnings == [notice] and that both MCP renderers surface it.

Test plan

  • uv run pytest tests/unit_tests/test_cloud_describe.py -q -> 35 passed
  • uv run ruff check / uv run ruff format --check -> clean

Link 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)

…MCP renderers show it

Co-authored-by: Piotr Kozikowski <piotr.kozikowski@gmail.com>
Co-Authored-By: AJ Steers <aj@airbyte.io>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

Copy link
Copy Markdown

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

Testing This PyAirbyte Version

You 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 Commands

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

  • /fix-pr - Fixes most formatting and linting issues
  • /uv-lock - Updates uv.lock file
  • /test-pr - Runs tests with the updated PyAirbyte
  • /prerelease - Builds and publishes a prerelease version to PyPI
📚 Show Repo Guidance

Helpful Resources

Community Support

Questions? Join the #pyairbyte channel in our Slack workspace.

📝 Edit this welcome message.

@github-code-quality

github-code-quality Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: Python

Python / code-coverage/pytest-no-creds

The overall line coverage in commit 52fbb32 in the devin/1790381492-sql... branch is 76%. The line coverage in commit d9f652f in the release-candidate/v1 branch is 65%.

Show a line coverage summary of the most impacted files.
File release-candidate/v1 d9f652f devin/1790381492-sql... 52fbb32 +/-
airbyte/_util/api_util.py 36% 57% +21%
airbyte/mcp/cloud.py 52% 76% +24%
airbyte/cloud/connectors.py 34% 63% +29%
airbyte/mcp/_otel.py 0% 89% +89%
airbyte/_direct...ctors/models.py 0% 91% +91%
airbyte/_direct...nnector_docs.py 0% 91% +91%
airbyte/mcp/int..._registry_ui.py 0% 92% +92%
airbyte/mcp/_sso_auth.py 0% 96% +96%
airbyte/cloud/models.py 0% 96% +96%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%

Python / code-coverage/pytest

The overall line coverage in commit 52fbb32 in the devin/1790381492-sql... branch is 79%. The line coverage in commit d9f652f in the release-candidate/v1 branch is 71%.

Show a line coverage summary of the most impacted files.
File release-candidate/v1 d9f652f devin/1790381492-sql... 52fbb32 +/-
airbyte/cloud/connectors.py 51% 71% +20%
airbyte/mcp/cloud.py 52% 76% +24%
airbyte/mcp/_otel.py 0% 89% +89%
airbyte/_direct...ctors/models.py 0% 91% +91%
airbyte/_direct...nnector_docs.py 0% 91% +91%
airbyte/mcp/int..._registry_ui.py 0% 92% +92%
airbyte/mcp/_sso_auth.py 0% 96% +96%
airbyte/cloud/models.py 0% 96% +96%
airbyte/mcp/int...nc_status_ui.py 0% 97% +97%
airbyte/mcp/http_main.py 0% 97% +97%

Python / code-coverage/pytest-unit

The overall line coverage in commit 52fbb32 in the devin/1790381492-sql... branch is 72%. Line coverage data for the release-candidate/v1 branch is not yet available.

Show a line coverage summary of the most covered files.
File release-candidate/v1 devin/1790381492-sql... 52fbb32 +/-
airbyte/mcp/_sso_auth.py — 96% —
airbyte/cloud/models.py — 96% —
airbyte/cloud/client.py — 91% —
airbyte/mcp/_otel.py — 89% —
airbyte/exceptions.py — 85% —
airbyte/progress.py — 80% —
airbyte/mcp/cloud.py — 76% —
airbyte/shared/...ql_processor.py — 68% —
airbyte/cloud/connectors.py — 63% —
airbyte/_util/api_util.py — 57% —

Updated September 28, 2026 04:31 UTC

Comment thread airbyte/_direct_connectors/connector_docs.py Outdated
@aaronsteers
Aaron ("AJ") Steers (aaronsteers) marked this pull request as ready for review September 28, 2026 04:17
Copilot AI lite review requested due to automatic review settings September 28, 2026 04:17
…_warning

Co-authored-by: Piotr Kozikowski <piotr.kozikowski@gmail.com>
Co-Authored-By: AJ Steers <aj@airbyte.io>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@aaronsteers
Aaron ("AJ") Steers (aaronsteers) merged commit c36aa80 into release-candidate/v1 Oct 3, 2026
22 checks passed
@aaronsteers
Aaron ("AJ") Steers (aaronsteers) deleted the devin/1790381492-sql-notice-metadata-warnings branch October 3, 2026 00:19
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.

2 participants