Repository navigation
Conversation
- A cancelled run with nothing left pending claims as usual, so a task its stopped process left running is taken back instead of the run being written off - A retried task of a cancelled run runs again; only a first attempt is cancelled
JohnDuprey
approved these changes
Oct 15, 2026
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.
This pull request improves task cancellation and recovery behavior in the orchestration system, enhances diagnostics for blocked PowerShell workers, and updates dependencies. The main changes ensure that tasks left running by a cancelled or stopped process are properly retried and finished, and that logs now include detailed information about where a PowerShell worker is blocked. Several new tests have been added to verify these behaviors.
Orchestration cancellation and recovery improvements:
RunTaskAsyncinOrchestratorService.csto accept anattemptparameter and only finish as "Cancelled" if it is the first attempt, allowing retried tasks left running by a cancelled process to be executed again.WorkPump.csso that if a cancelled run has no pending tasks left to cancel, any running task left by a stopped process is reclaimed and run again, ensuring the run can finish properly.PowerShell worker diagnostics:
Abandonmethod inPowerShellWorker.csto log the script call stack of a blocked pipeline, providing better visibility into where the worker is stuck. Added theBlockedCallStackhelper method for this purpose. [1] [2]Testing improvements:
HungWorkerRecycleTests.cs,OrchestrationAzuriteTests.cs, andOrchestrationRecoveryTests.csto verify correct behavior when cancelling runs with live tasks, reclaiming tasks from stopped processes, and logging of blocked statements. [1] [2] [3]Dependency updates:
System.Security.Cryptography.Xmlpackage to version 8.0.5 inCraft.csproj.