Repository navigation
feat(mcp): deploy sources from custom YAML definitions via deploy_connector_to_cloud - #1387
Conversation
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)".
|
Co-Authored-By: AJ Steers <aj@airbyte.io>
👋 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/1792087062-deploy-custom-yaml-source' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1792087062-deploy-custom-yaml-source'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 |
…ffort custom spec fallback Co-Authored-By: AJ Steers <aj@airbyte.io>
There was a problem hiding this comment.
Devin Review found 2 potential issues.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
Co-Authored-By: AJ Steers <aj@airbyte.io>
…/1792087062-deploy-custom-yaml-source Co-Authored-By: AJ Steers <aj@airbyte.io> # Conflicts: # airbyte/cloud/connectors.py
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
Aaron ("AJ") Steers (aaronsteers)
left a comment
There was a problem hiding this comment.
Devin, please confirm secret hydration shouldn't/doesn't happen in hosted MCP mode.
|
Aaron ("AJ") Steers (@aaronsteers) Confirmed: in hosted (HTTP) mode, no secret hydration can happen on any
Tests: Hydration therefore only happens over stdio with trusted execution explicitly turned on, or when someone calls the Python library directly. Neither of those is hosted. |
5a6b8c2
into
release-candidate/v1
Overview
👉 TL;DR: Lets agents create an Airbyte Cloud source from a custom connector that was built with YAML, not only from connectors in the public catalog. Before this, a person had to create the source in the UI.
Specifically, this adds
custom_definition_idto thedeploy_connector_to_cloudMCP tool (withconnector_namenow optional), andCloudWorkspace.deploy_sourcenow accepts a configdictplusdefinition_id.Changes
deploy_connector_to_cloud: newcustom_definition_idarg. Pass exactly one ofconnector_nameorcustom_definition_id. A custom ID is always a source (connector_type=destinationis rejected). Works with and withoutdefer_credentials.spec.connection_specification(with the same hardcoded-secret rejection as the registry path), validates it and deploys. The MCP layer does no secret hydration. Core does it, the same as on the registry path.AirbyteConnectorNotRegisteredErrorthat external orgs hit) and passes the custom ID to the draft create.CloudWorkspace.deploy_source: accepts adictconfig whendefinition_idis given. It resolvessecret_reference::values (hydrate_secrets, the counterpart ofSource._hydrated_config) without changing the caller's dict, and sends nosourceType. A dict withoutdefinition_idstill raises.CloudWorkspace._deploy_deferred: when the registry has no spec for a source definition, it falls back to the custom definition's manifest spec, soairbyte_secretfields are still detected. This is best effort: if the lookup fails, it uses the global secret mask.CustomCloudSourceDefinition: newconfig_spec_jsonschemaproperty (the manifest'sspec.connection_specification, orNone) and avalidate_config()method that hydrates before validating, likeConnectorBase.validate_config.Review Spotlight
Reviewers with limited time, please review first:
airbyte/mcp/cloud.pydeploy_connector_to_cloud: the arg contract and the custom vs registry branchesairbyte/cloud/workspaces.pydeploy_source: the dict +definition_idpathEvidence
Live probe against the CI workspace on
release-candidate/v1, run before any code change. Each resource was created and then deleted.sources.create_sourcewith customdefinitionId, nosourceTypesources/getshowed the given keys, with secrets masked.sourceDefinitionIdmatched the custom definition./sources/createwithcreateAsDraft+ customsourceDefinitionIdThe new integration test
test_deploy_source_from_custom_yaml_definitionpasses in CI (Pytest (Integration, cloud)) against the same workspace.Risks
connector_namebecomes optional, but existing callers that pass it see no change.configurationasSourceAirtable(...). PyAirbyte only readssource_idfrom that response, so nothing here depends on it.Follow-ups
hydrate_secretsdoesn't resolve baresecret_reference::strings that sit directly inside lists. This affects the registry and custom paths alike and is out of scope here.Link to Devin session: https://app.devin.ai/sessions/ec525534f583457aa0fee362e8f42d34
Open in Devin Desktop: https://app.devin.ai/desktop/session/ec525534f583457aa0fee362e8f42d34?variant=devin
Requested by: Aaron ("AJ") Steers (@aaronsteers)