Repository navigation
Stop remote workloads whose proxy is still running - #7328
Merged
Merged
Conversation
Stopping a remote workload marked it stopped and removed its client configuration only when it was running or unhealthy. In starting, auth_retrying or unauthenticated its proxy is still running too, so a stop killed the proxy but left the old status and client entries pointing at a dead endpoint. Treat every status the proxy keeps running in as active. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7328 +/- ##
==========================================
- Coverage 82.27% 82.25% -0.02%
==========================================
Files 935 935
Lines 95159 95298 +139
==========================================
+ Hits 78288 78384 +96
- Misses 16866 16909 +43
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rdimitrov
previously approved these changes
Nov 26, 2026
The exhaustive linter requires every WorkloadStatus case in the switch. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
rdimitrov
approved these changes
Nov 26, 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.
Summary
thv stopon a remote workload marks itstoppedand removes its client configuration only when the workload isrunningorunhealthy. A remote workload's proxy also keeps running while it isstarting,auth_retrying(token refresh is retrying in the background) orunauthenticated(token monitoring has stopped, but the proxy keeps serving and rejecting requests). In those states a stop killed the proxy but skipped the status and client cleanup. The workload kept its old status, and clients stayed configured against a proxy that no longer exists. Theunhealthycase was fixed in #4844; this applies the same fix to the other statuses where the proxy is still running.remoteProxyActive, which lists the statuses a remote proxy keeps running in, and use it to decide whether a stop goes through the stopping → stopped transitions and client cleanup.Type of change
Test plan
task test)task test-e2e)task lint-fix)TestRemoteProxyActivepins the active and inactive statuses. The stop tests now coverstarting,unhealthy,auth_retryingandunauthenticatedgoing through stopping → stopped. Linting is left to CI because the localgolangci-lintcrashes on the Go 1.27 toolchain.Does this introduce a user-facing change?
Yes.
thv stopon a remote workload instarting,auth_retryingorunauthenticatedstopped its proxy, but the workload kept that status and its client configuration.stoppedand its client configuration is removed, as for a running workload.thv start/thv restartthen treat it like any stopped workload.Special notes for reviewers
Container workloads are unaffected; this only changes
stopRemoteWorkload. Freeing an orphaned proxy's port when the status is missing or inactive is unchanged.🤖 Generated with Claude Code