Skip to content

fix(cloud): treat an unavailable feature probe as unknown, not disabled - #1258

Closed
Aaron ("AJ") Steers (aaronsteers) wants to merge 3 commits into
release-candidate/v1from
devin/1790381530-unavailable-probe-unknown
Closed

Aaron ("AJ") Steers (aaronsteers) wants to merge 3 commits into
release-candidate/v1from
devin/1790381530-unavailable-probe-unknown

Conversation

@aaronsteers

Copy link
Copy Markdown
Member

Overview

👉 TL;DR: When Airbyte Cloud cannot tell us whether a connector is enabled for agent access (the docs lookup is denied or missing), we now report that as "unknown" instead of quietly saying the connector has no features. The connector list and connector describe tools now agree with each other on this.

Specifically, CloudWorkspace._get_connector_features returns None on a 403/404 docs probe, CloudConnector gains a public get_enabled_features(*, warnings=...) -> frozenset[ConnectorFeature] | None, and both list_cloud_connectors and describe_cloud_connector emit enabled_features: "unknown" for that case.

Supersedes part of #1240 (re-cut as a focused PR; co-authored with Piotr Kozikowski (@pkozikow)). Pairs with #1257 (the other half of that split).

Related, already merged: #1249 covered the 5xx/transport probe failure case with the same "unknown" sentinel; this PR extends it to the 403/404 "docs unavailable" case.

Changes

  • CloudWorkspace._get_connector_features(connector, *, warnings=None) -> frozenset | None: returns None when _context_layer_inspect yields None (403/404), forwards the warnings sink; still frozenset() for no-Context-layer-API and non-passthrough destinations (known empty).
  • CloudConnector.get_enabled_features(*, warnings=None) replaces private _get_enabled_features; caches only known results (including a known-empty frozenset()), never caches None, so a later probe can recover. enabled_features property keeps the conservative None -> frozenset() behavior.
  • CloudWorkspace.list_connectors(feature_filter=...) (Python API) now goes through connector.enabled_features; unknown is still excluded there (conservative).
  • MCP list_cloud_connectors with feature_filter: a 403/404 probe now yields a result with enabled_features="unknown" plus the probe warning, instead of silently dropping the connector.
  • MCP describe_cloud_connector: uses get_enabled_features(warnings=warnings); None -> FEATURES_UNKNOWN. Successful-probe warnings still surface via _context_layer_details.warnings.
  • Tests for None semantics, no-cache-on-unknown/recovery, enabled_features fallback, and list/describe consistency.

Review Spotlight

Reviewers with limited time, please review first:

Not carried over from #1240

Risks

  • Behavior change for MCP list_cloud_connectors(feature_filter=...): connectors whose docs probe 403/404s now appear (as "unknown") rather than being excluded. Agents should treat "unknown" as "verify", not as enabled.
  • _context_layer_inspect warnings keep the raw {error} text (unchanged from release-candidate/v1); this PR does not sanitize them.

Test plan

  • uv run pytest tests/unit_tests/test_cloud_describe.py tests/unit_tests/test_mcp_cloud.py tests/unit_tests/test_cloud_direct_execute.py -q -> 173 passed
  • uv run ruff check airbyte tests/unit_tests / uv run ruff format --check / uv run pyrefly 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)

devin-ai-integration Bot and others added 2 commits September 26, 2026 00:15
Co-authored-by: Piotr Kozikowski <piotr.kozikowski@gmail.com>
Co-Authored-By: AJ Steers <aj@airbyte.io>
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/1790381530-unavailable-probe-unknown' pyairbyte --help

# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1790381530-unavailable-probe-unknown'

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 47fa2fc in the devin/1790381530-una... 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/1790381530-una... 47fa2fc +/-
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 47fa2fc in the devin/1790381530-una... 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/1790381530-una... 47fa2fc +/-
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 47fa2fc in the devin/1790381530-una... 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/1790381530-una... 47fa2fc +/-
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 26, 2026 00:41 UTC

…is unavailable

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

See #1262, which repoints the MCP at the new cloud enablement services. That moots this work. Please rebase on top of it

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Agreed — #1262 makes the enablement API the source of truth and already reports "unknown" for 403/5xx lookups, so the docs-probe uncertainty handling here has no remaining purpose once it lands. Rather than rebase, I think this should be closed as superseded by #1262; checking with Aaron ("AJ") Steers (@aaronsteers) before closing.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Closing as superseded by #1262 (confirmed with Aaron ("AJ") Steers (@aaronsteers)).

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