[rush] Support aborting phased command execution#5362
Merged
dmichon-msft merged 4 commits intomicrosoft:mainfrom Sep 16, 2025
Merged
[rush] Support aborting phased command execution#5362dmichon-msft merged 4 commits intomicrosoft:mainfrom
dmichon-msft merged 4 commits intomicrosoft:mainfrom
Conversation
bmiddha
approved these changes
Sep 16, 2025
libraries/rush-lib/src/logic/operations/ConsoleTimelinePlugin.ts
Outdated
Show resolved
Hide resolved
D4N14L
approved these changes
Sep 16, 2025
libraries/rush-lib/src/logic/operations/OperationExecutionManager.ts
Outdated
Show resolved
Hide resolved
bmiddha
approved these changes
Sep 16, 2025
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.
Summary
Allows watch-mode phased commands abort queued operations via the
akey. 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:
IPhasedCommandnow has asessionAbortControllerproperty, which can be used to completely abort the session (i.e. in watch mode, kill the watcher), and itssignalshould be listened to by any plugins that have long-lived state (like therush-serve-plugin).IExecuteOperationsContextalso has anabortControllerproperty, 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 startcommand and toggling abort.Impacted documentation
Phased command plugin documentation. The CLI prompt.