Skip to content

Conversation

@dmichon-msft
Copy link
Contributor

Summary

Allows watch-mode phased commands abort queued operations via the a key. Aborting execution does not stop any operations that are currently executing, but any that are waiting will be aborted and automatically marked as invalid for the next iteration.

Details

Aborting is supported at two levels:

  • IPhasedCommand now has a sessionAbortController property, which can be used to completely abort the session (i.e. in watch mode, kill the watcher), and its signal should be listened to by any plugins that have long-lived state (like the rush-serve-plugin).
  • IExecuteOperationsContext also has an abortController property, which is bound only to the current execution pass. This can be used to abort the currently queued operations.

Also fixes an issue where when the watcher is "paused", it still will do an immediate recheck for changes. This check now also gets paused.

How it was tested

Unit tests handling the abort status reporting.
Manual invocation of the rushstack rush start command and toggling abort.

Impacted documentation

Phased command plugin documentation. The CLI prompt.

@dmichon-msft dmichon-msft merged commit f017e4b into microsoft:main Sep 16, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Bug Triage Sep 16, 2025
@dmichon-msft dmichon-msft deleted the rush-abort branch September 16, 2025 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

3 participants