ci(mcp): trigger cloud-mcp-preview deploy after PyPI publish - #1050
Conversation
After publishing to PyPI, wait 2 minutes for package availability then dispatch the cloud-mcp deploy workflow on airbyte-ops-mcp via repository_dispatch. This keeps the hosted Cloud MCP server in sync with each PyAirbyte release. Co-Authored-By: AJ Steers <aj@airbyte.io>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 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/1782532058-cloud-mcp-deploy-trigger' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1782532058-cloud-mcp-deploy-trigger'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. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe PyPI publish workflow adds a downstream job that waits 120 seconds after publishing, then dispatches a Cloud MCP preview deployment event for eligible release or manual publish runs. ChangesCloud MCP preview deployment
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant publish_to_pypi
participant deploy_cloud_mcp_preview
participant airbytehq/airbyte-ops-mcp
publish_to_pypi->>deploy_cloud_mcp_preview: completes successfully
deploy_cloud_mcp_preview->>deploy_cloud_mcp_preview: wait 120 seconds
deploy_cloud_mcp_preview->>airbytehq/airbyte-ops-mcp: dispatch deploy-cloud-mcp with preview payload
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: AJ Steers <aj@airbyte.io>
Code Coverage OverviewLanguages: Python Python / code-coverage/pytest-fastThe overall coverage in commit 34c78d9 in the Show a code coverage summary of the most impacted files.
Python / code-coverage/pytest-no-credsThe overall coverage in commit 34c78d9 in the Show a code coverage summary of the most impacted files.
Python / code-coverage/pytestThe overall coverage in commit 34c78d9 in the Show a code coverage summary of the most impacted files.
Updated |
There was a problem hiding this comment.
Pull request overview
Adds an automated post-PyPI-publish step to trigger a rebuild/deploy of the hosted Cloud MCP server, ensuring mcp.internal.airbyte.ai/cloud-mcp picks up the newly released airbyte package from PyPI.
Changes:
- Introduces a new
deploy_cloud_mcpjob that runs afterpublish_to_pypi. - Waits briefly for PyPI availability, then triggers an
airbytehq/airbyte-ops-mcprepository_dispatchevent (deploy-cloud-mcp) with payload{"mcp-server":"cloud-mcp"}.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: AJ Steers <aj@airbyte.io>
Split deploy_cloud_mcp into two jobs: - deploy_cloud_mcp: fires on release events, deploys to production - deploy_cloud_mcp_preview: fires on workflow_dispatch prereleases, sends preview=true in client_payload to deploy to cloud-mcp-preview Co-Authored-By: AJ Steers <aj@airbyte.io>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/pypi_publish.yml:
- Around line 90-99: Replace the fixed sleep in the PyPI publish workflow with a
check that waits until the newly published airbyte version is actually available
on PyPI before triggering the repository dispatch. Update the logic around the
“Wait for PyPI availability” step and the subsequent `repository-dispatch`
action so deployment only proceeds once the exact version can be resolved, and
apply the same gating to the preview path referenced by the shared deploy steps.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 0843f5b1-fe91-488d-bf34-ad3837a10867
📒 Files selected for processing (1)
.github/workflows/pypi_publish.yml
Co-Authored-By: AJ Steers <aj@airbyte.io>
cloud-mcp-preview deploy after PyPI publish
Co-Authored-By: AJ Steers <aj@airbyte.io>
Summary
Auto-deploys the Cloud MCP Cloud Run service after PyAirbyte publishes to PyPI, with different targets based on release type:
releaseevent) → deploy to productioncloud-mcpserviceworkflow_dispatchwithpublish: true) → deploy tocloud-mcp-previewserviceBoth jobs wait 2 minutes for PyPI propagation, then send a
repository_dispatchtoairbytehq/airbyte-ops-mcpwithevent-type: deploy-cloud-mcp. The prerelease job includes"preview": "true"in the client payload to route to the preview service.Companion to airbyte-ops-mcp#1001 which adds
client_payload.previewsupport to the deploy workflow.Link to Devin session: https://app.devin.ai/sessions/9274bd4f3e0a4b0880795fc1ef9c806b
Requested by: Aaron ("AJ") Steers (@aaronsteers)
Summary by CodeRabbit
Important
Auto-merge enabled.
This PR is set to merge automatically when all requirements are met.