Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/pypi_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,39 @@ jobs:
- name: Publish to PyPI
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true')
uses: pypa/gh-action-pypi-publish@v1.13.0

deploy_cloud_mcp:
name: Deploy Cloud MCP
needs: publish_to_pypi
if: github.event_name == 'release'
runs-on: ubuntu-latest
permissions: {}
steps:
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- name: Wait for PyPI availability
run: sleep 120

- name: Trigger cloud-mcp production deploy
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3
with:
token: ${{ secrets.GITHUB_CI_WORKFLOW_TRIGGER_PAT }}
repository: airbytehq/airbyte-ops-mcp
event-type: deploy-cloud-mcp
client-payload: '{"mcp-server": "cloud-mcp"}'
Comment on lines +90 to +99

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.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Could we gate the dispatch on actual PyPI availability instead of a fixed 120s sleep, wdyt?

This still races PyPI propagation. If the new airbyte version takes longer than two minutes to appear, the downstream build can fail or rebuild cloud-mcp against the previous package version. Polling for the exact published version before sending deploy-cloud-mcp would make both release and preview deploys deterministic.

Also applies to: 108-117

🤖 Prompt for 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.

In @.github/workflows/pypi_publish.yml around lines 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.

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.

The 2-minute fixed wait was an explicit design choice by the maintainer. A polling loop would add complexity (need to extract the version, handle PyPI API rate limits, determine timeout/retry logic) for marginal benefit — PyPI propagation almost always completes well within 2 minutes, and even if it doesn't, the downstream Dockerfile.cloud-mcp runs uv pip install airbyte without a version pin, so it would pick up the latest available version regardless.

If we want to tighten this in the future, it could be a follow-up improvement.


deploy_cloud_mcp_preview:
name: Deploy Cloud MCP (Preview)
needs: publish_to_pypi
if: github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true'
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Wait for PyPI availability
run: sleep 120

- name: Trigger cloud-mcp preview deploy
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3
with:
token: ${{ secrets.GITHUB_CI_WORKFLOW_TRIGGER_PAT }}
repository: airbytehq/airbyte-ops-mcp
event-type: deploy-cloud-mcp
client-payload: '{"mcp-server": "cloud-mcp", "preview": "true"}'
Loading