Repository navigation
feat(mcp): support connection namespace settings in create_connection and update_connection - #1474
Conversation
… and update_connection 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: 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-creds
View coverage of the 10 most impacted files.
Python / code-coverage/pytest
View coverage of the 10 most impacted files.
Python / code-coverage/pytest-unit
Line coverage data for the release-candidate/v1 branch is not yet available. View coverage of the 10 most covered files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
Devin Review🟢 Devin Review found nothing to fix · View findings · Follow Devin's work |
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
There was a problem hiding this comment.
Devin Review found 1 finding. Devin automatically fixed it.
Fixed by Devin (1)
- Rejected stream updates leave connections disabled — Stream overrides are validated/applied before any disable; order is now overrides → disable → namespace → enable → schedule, with a regression test.
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
74ae3c1
into
release-candidate/v1
Summary
Closes #1473. Requested by AJ Steers.
Adds optional
namespace_provider(source|destination|custom) andcustom_namespace_patternarguments to thecreate_connection,update_connectionandupdate_connection_unsafeMCP tools. They are passed through to the public API'snamespaceDefinition/namespaceFormat, andcustommaps to the API'scustom_format. The read-onlyCloudConnection.namespace_definition/namespace_formatproperties keep their names because they mirror the API response.Annotatedalias (NamespaceProviderArg,CustomNamespacePatternArg) that carries the type, description andTraceArgmarker, and all three tools use them. A shared_NAMESPACE_TOOL_HELPpointer is added to each tool description.${SOURCE_NAMESPACE}").api_util.create_connection/patch_connectiondon't serialize omitted args, so creation keeps the API defaults and updates keep the existing settings.CloudWorkspace.deploy_connectionforwards the args. The newCloudConnection.set_namespace()handles updates.api_util.validate_namespace_settingsruns before any write.custom_namespace_patternrequires an explicitnamespace_provider="custom"(also on update), and empty or whitespace-only patterns are rejected._update_cloud_connection_implis: stream overrides (validated, then written) → disable ifenabled=False→ namespace → enable ifenabled=True→ schedule. This way, enabling or scheduling can't start a sync into the old namespace, and a rejected stream override doesn't leave the connection disabled._validate_update_connection_args.table_prefixand from the source-sidestream_namespaceselector.Test plan
tests/unit_tests/test_connection_namespaces.py: create and update with each provider and with a custom pattern, omitted args not sent, invalid combinations failing before any write, and update-ordering regressions.Link to Devin session: https://app.devin.ai/sessions/d310284bcb10417d98c97fa1d6c237d8
Open in Devin Desktop: https://app.devin.ai/desktop/session/d310284bcb10417d98c97fa1d6c237d8?variant=devin
Requested by: Aaron ("AJ") Steers (@aaronsteers)