Repository navigation
Conversation
…e call is cancelled A deploy lasts from seconds to minutes, and until now the call said nothing until it ended. The pipeline now hands each log line to a watcher the moment it is made, and the tool delivers it to the client mid-call: as a progress notification when the request carried a progress token (which is also what keeps a client's per-call timeout from running out), else as a logging message. The local server declares the logging capability so a client expects the latter. The same watch carries a stop: cancelling the request drops the run at its next step (a canister call already in flight completes on the network), and the outcome reports `interrupted` with every canister the run had created, like a failure does. An interrupted deploy keeps its working directory, since whoever asked for the stop may be a client that went away and will never read the answer; the directory's mapping file remains the record, as for a run that is cut off. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #232 (deploy-3). Fourth step of the deploy stack, and the first of the work that brings the deploy tool to the hosted server: the call shape both servers will share.
What
icp_deploy_bundlestays one blocking call, but now reports each phase as it completes and stops when the call is cancelled.Why
A deploy lasts from seconds to minutes (canister creation, installs, a frontend's asset sync) and the call said nothing until it ended. On the hosted server a silent minutes-long call is also what trips a client's per-call timeout. Progress notifications fix both: the client sees each phase, and the MCP SDK clients reset their timeout on every progress notification.
How
deploy::Watchis handed todeploy_bundle: astoptoken and an optionallinessender.collect_logsends each log line the moment it is made, so the outcome's log and the streamed lines are the same lines in the same order (test:the_log_is_streamed_as_it_is_made).stopwith a biasedselect!: cancelling drops the run at its next await, which is the next canister call or plugin step. A canister call already in flight completes on the network. The outcome reports a new status,interrupted, with every canister created before the stop increatedandcanister_ids, like a failure does. The tool returns it as an error result, like a failure.an_interrupted_deploy_stops_and_keeps_its_directory): whoever asked for the stop may be a client that went away and will never read the answer, so the directory's mapping file stays as the record, as it does for a run that is cut off.#[allow(deprecated)]with the reason. The local server declares theloggingcapability so a client expects it.stopis the request context's cancellation token, which rmcp cancels on the client'snotifications/cancelled. The hosted server will add the connection going away as a second source in a later PR.Not here: the hosted composition, the bundle upload, concurrency across sessions. Those are the next PRs on this stack.
🤖 Generated with Claude Code