ISSUE DESCRIPTION Admitted workloads are requeued too early when a worker disconnects An…
- User
ISSUE DESCRIPTION
Admitted workloads are requeued too early when a worker disconnects
An admitted workload must remain ready during a temporary worker disconnect and be retried only after the configured worker-loss timeout. Reconnection with the same configuration must restore processing without affecting other connected workers.
Interface
No new interfaces are introduced.
ADDITIONAL ADVICE
Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use
git checkout <file>to restore the file to its original state. You can also reset all changes in the repository usinggit reset --hardcommand. Additionally, you can usegit stashandgit stash popto temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you callsubmit) usinggit statusorgit diffcommands. However you don't need to usegit addorgit commitbefore submitting your changes. In fact,submitonly submits currently unstaged changes because it usesgit diffto get the changes that need to be submitted.CHECKLIST
Before submitting your solution, please go over the following checklist and make sure you've done everything:
- If an error was reported in the issue description, I have successfully reproduced it.
- If an error was reported in the issue description, I have confirmed that my fix resolves the error.
- I have thought about edge cases and made sure my fix handles them as well.
- I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.
Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!
(Current directory: /kueue, current file: none) bash-$
- Assistant
I'll start by exploring the repository structure and searching for code related to worker disconnects and workload requeueing.
- Assistant
Looking for MultiKueue worker disconnect and requeue logic.
- Assistant
Inspecting MultiKueue workload controller and worker-loss timeout handling.
- Assistant
Examining the worker-lost handling in the multikueue workload controller.
- Assistant
Reading the worker-loss handling section in workload.go.
- Assistant
Checking for recent commits and related tests around early requeue on disconnect.
- Assistant
There's a commit about managing worker cluster unavailability. Let me also look at AGENTS.md and any related issue description in docs. Let me also look at the git stash or any patches.
- Assistant
Checking the processing plan and related docs for clues about this issue.
- Assistant
Reviewing unit tests and recent MultiKueue changes around disconnect handling.
- Assistant
Tracing how a disconnect affects group reconciliation and remote client state.
- Assistant
Let me look more carefully at the syncReservingRemoteState and how ACS is set, and also how remotes are populated when connection is lost.
- Assistant
That timing math looks wrong — timeout is measured from LastTransitionTime, not disconnect. Verifying and reading the surrounding logic.
- Assistant
Inspecting syncReservingRemoteState and how connection loss is detected.
- Assistant
Checking SetAdmissionCheckState and whether recent changes broke the keep-alive path.
- Assistant
Found a likely bug:
SetAdmissionCheckStateonly updatesLastTransitionTimeon state change, so the keep-alive refresh is dropped. Checking history next. - Assistant
Checking whether MultiKueue previously updated LastTransitionTime differently.
- Assistant
Confirming how PatchAdmissionStatus and ACS LastTransitionTime are defined.
- Assistant
Let me look at Preparation of workload patch and the original BaseSSAWorkload flow more carefully. Also let me check the AdmissionCheckState docs.
- Assistant
Inspecting PrepareWorkloadPatch next.
- Assistant
Checking how patchStatus passes the workload into the update function.
- Assistant
Checking error handling when no active clusters remain.
- Assistant
Searching tests that cover LastTransitionTime refreshing.
- Assistant
Let me look if there's some git branch, PR description, or uncommitted work related to this. Also let me check why SetAdmissionCheckState doesn't update LTT - should we update it when message also cha...
- Assistant
Looking at "update check" - when state changes, LTT is updated. Is there a test for same-state with new LTT?
- Assistant
Identified the bug:
SetAdmissionCheckStateskipsLastTransitionTimewhen state is unchanged, so the MultiKueue keep-alive never refreshes after the SSA→merge-patch migration. Applying a targeted fix insyncReservingRemoteState. - Assistant
Implementing the fix so LastTransitionTime is refreshed while ACS stays Ready.
- Assistant
Writing a temporary test to verify LastTransitionTime keep-alive behavior.
- Assistant
Creating a temporary unit test to verify keep-alive LastTransitionTime refresh.
- Assistant
Running the keep-alive unit test.
- Assistant
Need to set GOCACHE and HOME.
- Assistant
MakeJob is somewhere else. Let me check the workload_test imports.
- Assistant
I need to fix the import for testingjob.
- Assistant
The keep-alive refresh works. The timeout path uses wall-clock
time.Sinceinstead of the reconciler clock — checking that next. - Assistant
Fixing worker-loss timeout calculation so it uses the reconciler clock instead of wall time.
- Assistant
The edit hit the wrong file — restoring the test and applying the change to workload.go.
- Assistant
Good, workload_test.go is restored and workload.go still has our syncReservingRemoteState fix. Now fix the time.Since line properly.
- Assistant
There's an extra closing brace — removing it.
- Assistant
There's a duplicate
} else {. Let me fix the whole block cleanly. - Assistant
Re-running the keep-alive tests and size checks.
- Assistant
Tests passed. Extending the temp test to cover reconnecting after a temporary disconnect.
- Assistant
All keep-alive cases passed. Removing the temporary test and running the full MultiKueue package tests.
- Assistant
Restoring the blank line for a cleaner diff.
- Assistant
Checking for other places that try to refresh ACS LastTransitionTime the same way:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.