Admitted workloads are requeued too early when a worker disconnects An admitted workload…
- User
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.
- Assistant
Note: this repo's AGENTS.md is experimental with no backwards/future-compatibility guarantees — per the task setup I'm treating that disclaimer as acknowledged and proceeding.
Let me look at the MultiKueue code that handles worker disconnects and the worker-loss timeout.
- Assistant
Now let me look at the cluster reconciler to see how disconnects are tracked.
- Assistant
Let me look at
SetAdmissionCheckStateand how the AC transition time is maintained. - Assistant
Confirmed the mechanism. Now let me check the integration tests around worker disconnect to understand the expected behavior.
- Assistant
Let me check
PatchAdmissionStatus/PatchStatusto understand the patching behavior. - Assistant
Let me check
defaultWorkerLostTimeoutin the tests and howcontrollers.gowires things. - Assistant
Now let me check how the integration test breaks the connection, to make sure my approach matches how a disconnect manifests.
- Assistant
Now add the paired mark/query helpers next to the existing conn-attempt helpers:
- Assistant
Now update the connect/disconnect transition sites:
- Assistant
Now the
clustersReconciler— track clusters whose client was removed (the broken-kubeconfig path): - Assistant
Now the fix in
workload.go— measure the worker-lost wait from the disconnect time when the reserving worker is unavailable: - Assistant
Now add the helper near
remoteClientsForAC: - Assistant
Build passes. Now run the package's unit tests:
- Assistant
All existing tests pass. Now let me add focused unit tests for the new behavior in a new test file (keeping the existing test file untouched):
- Assistant
All production transitions now go through the paired helpers. Let me build the whole repo and run a broader vet to make sure nothing else broke:
- Assistant
Let me check whether integration test assets are available to run the worker-disconnect integration test:
- Assistant
No envtest assets, so integration tests can't run in this environment; unit coverage will have to carry it. Let me do a final review of the complete diff:
- Assistant
Diff is clean. Final formatting check and one more full run:
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.