-
Notifications
You must be signed in to change notification settings - Fork 781
update deploy to retry if deployment failed #477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update deploy to retry if deployment failed #477
Conversation
|
Caution Review failedThe pull request is closed. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds retry-enabled deployment to the deploy CLI with a new --retry-count option and an internal async retry flow. Updates the retry utility to re-raise asyncio.CancelledError. Adjusts a test to pass retry_count. The deploy path now bundles, deploys via mcp_app_client, and retries with exponential backoff on failure. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CLI as Deploy CLI (deploy_config)
participant Bundler as wrangler_deploy
participant AppAPI as mcp_app_client.deploy_app
participant Retry as retry_async_with_exponential_backoff
User->>CLI: deploy --retry-count=N
CLI->>Retry: attempt deploy (max N)
rect rgb(240,248,255)
note over CLI,Retry: Single attempt flow
Retry->>Bundler: bundle artifacts
Bundler-->>Retry: bundle result or error
Retry->>AppAPI: deploy bundle
AppAPI-->>Retry: app info or error
end
alt Success
Retry-->>CLI: app info
CLI-->>User: Print App ID/URL/Status
else Non-retriable error
Retry-->>CLI: raise CLIError(retriable=False)
CLI-->>User: Error (no further retries)
else Retriable error
Retry-->>Retry: exponential backoff then retry
end
%% Cancellation path
User--x CLI: cancel
CLI->>Retry: cancel in-flight attempt
Retry-->>CLI: re-raise asyncio.CancelledError
CLI-->>User: Aborted
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
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 |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c76d1e8 to
a532d02
Compare
65929ef to
bd0f3de
Compare
a532d02 to
e748862
Compare
bd0f3de to
ddb1062
Compare
e748862 to
b630e23
Compare
ddb1062 to
79b1e41
Compare
b630e23 to
01a0d8b
Compare
79b1e41 to
a3ed6b7
Compare
01a0d8b to
9e5aeed
Compare
9e5aeed to
a02b521
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, that comment from graphite PR bot seems legit
ddd950f to
41d9904
Compare
a3ed6b7 to
17040ab
Compare
17040ab to
5b8c790
Compare
41d9904 to
5b1ced8
Compare
Merge activity
|
fix test split up bundling and deployment logic for retries
f1f34d6 to
4311918
Compare

TL;DR
Added retry functionality to the MCP Agent deployment process to improve reliability.
What changed?
--retry-countoption to the deploy command with a default of 3 retriesHow to test?
Deploy an MCP agent with the default retry settings:
Test with a custom retry count:
Force a deployment failure to verify retry behavior (e.g., by temporarily disrupting network connectivity)
Summary by CodeRabbit
New Features
Bug Fixes
Tests