Skip to content

Cancel build Git operations on server builders - #1580

Open
ZowieTao wants to merge 1 commit into
moghtech:mainfrom
ZowieTao:agent/cancel-server-build-git-stage
Open

Cancel build Git operations on server builders#1580
ZowieTao wants to merge 1 commit into
moghtech:mainfrom
ZowieTao:agent/cancel-server-build-git-stage

Conversation

@ZowieTao

Copy link
Copy Markdown

What changed

  • Propagate a Build-specific cancellation id into the Periphery PullOrCloneRepo request.
  • Register a cancellation token while Build repository operations run.
  • Pass that token to clone, fetch, checkout, pull, and reset commands through CommandOptions.
  • Ask Periphery to cancel the registered Git process group when Core receives CancelBuild during the repository stage.
  • Preserve the existing non-cancellable Git APIs for other callers.

Why

The v2.3.0 cancellation flow explicitly cancels the Periphery image-build command, but cancellation during the earlier clone/pull stage only stops Core from awaiting the request. The Git process group can therefore survive after the Build update has been finalized, leaving actual host state inconsistent with Komodo's action state.

This was reproduced with a stalled HTTPS git pull, which left git remote-https and git-remote-https running after cancellation.

Closes #1579. Follow-up to #148.

Validation

  • cargo fmt --all -- --check
  • cargo check -p git -p periphery_client -p komodo_periphery -p komodo_core
  • cargo test -p command -p git -p periphery_client

@ZowieTao
ZowieTao marked this pull request as ready for review August 12, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build cancellation leaves Git processes running during clone/pull

1 participant