-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent operations from getting stuck in the Starting
state
#6686
Prevent operations from getting stuck in the Starting
state
#6686
Conversation
NOTE: |
...s/Microsoft.Diagnostics.Monitoring.WebApi.UnitTests/Operation/EgressOperationServiceTests.cs
Outdated
Show resolved
Hide resolved
…eration/EgressOperationServiceTests.cs Co-authored-by: Justin Anderson <[email protected]>
/backport to release/8.0 |
Started backporting to release/8.0: https://github.com/dotnet/dotnet-monitor/actions/runs/9179706258 |
@schmittjoseph backporting to release/8.0 failed, the patch most likely resulted in conflicts. Please backport manually using one of the below commands, followed by PowerShell (Invoke-WebRequest "https://github.com/dotnet/dotnet-monitor/commit/3cb77016018922dac35906436ff9cf4601e8f1cc.patch").Content | git am --3way --ignore-whitespace --exclude="documentation/**.md" --keep-non-patch Bash curl -sSL "https://github.com/dotnet/dotnet-monitor/commit/3cb77016018922dac35906436ff9cf4601e8f1cc.patch" | git am --3way --ignore-whitespace --exclude="documentation/**.md" --keep-non-patch
$ git am --3way --ignore-whitespace --exclude="documentation/**.md" --keep-non-patch changes.patch
Applying: Prevent operations from getting stuck in the `Starting` state (#6686)
Using index info to reconstruct a base tree...
M src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagController.cs
M src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagnosticsControllerBase.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagnosticsControllerBase.cs
CONFLICT (content): Merge conflict in src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagnosticsControllerBase.cs
Auto-merging src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagController.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Prevent operations from getting stuck in the `Starting` state (#6686)
Error: The process '/usr/bin/git' failed with exit code 128 |
Summary
When an operation is first created it enters a
Starting
state and typically signals a task completion source once it has started and the operation transitions to aRunning
state. If an error occurs while running the operation transitions to theFailed
state.There are 2 edge cases that could cause an operation to get indefinitely stuck in the
Starting
state:Running
state, the operation will be stuck in theStarting
state and never transition toFailed
.Starting
->Completed
), the operation will be stuck in theStarting
state.This PR fixes these issues and adds test coverage for
EgressOperationService
. Since there previously was no test coverage, I've had to do some minor refactoring to enable easier testing.Closes #6683
Release Notes Entry
Fix an issue where operations could finish, or fail, but their state would be still be reported as
Starting
(issue #6683).