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
Per AGENTS.md: usage of AGENTS.md is experimental without any guarantees of backwards/future compatibility — please consider this disclaimer acknowledged as instructed by the task setup. Now let me investigate the issue.
- Assistant
Now let me check tests around
SetAdmissionCheckStatein pkg/workload to understand the expected semantics there: - Assistant
Let me look at how
patchStatuscomputes the patch: - Assistant
Also fix the lost-worker branch to use the injected clock (it currently uses the real clock via
time.Since, which is inconsistent with the reconciler's injectedw.clockused to write the timestamp): - Assistant
Build passes. Now run the unit tests:
- Assistant
Unit tests pass. Let me verify the SSA (non-merge-patch) path also carries the admission check timestamp — check
PrepareWorkloadPatch: - Assistant
Now let me verify the fix end-to-end behavior with a temporary test that reproduces the disconnect scenario. First, let me look at the test harness setup:
- Assistant
Now I'll write a temporary lifecycle test (to verify the fix; I'll delete it afterwards):
- Assistant
Now run the full unit test suite for the affected packages one final time, plus related packages that use these code paths:
- Assistant
While that runs, let me review the final diff:
- Assistant
The diff is minimal and clean. Waiting for the integration test to complete:
- Assistant
The binary must run from within the project tree. Rerun from
/kueue: - Assistant
Confirmed. Now waiting for the integration test result:
- Assistant
Waiting for the second integration run. The production diff is final;
git diff --checkalready passed cleanly. - Assistant
Awaiting the second integration verdict — will summarize once it lands.
- Assistant
All verification complete. Final state of the work:
Fix summary
Issue: Admitted MultiKueue workloads were requeued (set to
Retry) immediately when a worker cluster disconnected, instead of remaining ready and being retried only after the configured . - Assistant
That's the monitor confirming the same result already reported: both worker-lost integration specs passed (2 Passed, 0 Failed). No further action needed — the fix is complete and verified, with the changes left uncommitted in
pkg/controller/admissionchecks/multikueue/workload.go. - Assistant
The monitor stream has ended — all background tasks are finished. The task is complete:
- Fix:
pkg/controller/admissionchecks/multikueue/workload.go— heartbeat refresh of the MultiKueue admission check'sLastTransitionTimeinsyncReservingRemoteState, plus using the injected clock in the lost-worker timeout computation. - Verified: unit tests, vet, build, and both worker-lost integration specs all pass; the pre-fix failure mode (immediate requeue on disconnect) was reproduced and confirmed fixed.
- Changes remain uncommitted in the working tree.
- Fix:
- Assistant
That's just the stale monitor from the first (environment-limited) ginkgo attempt timing out — no re-arm needed, since the tests were already rerun successfully from the precompiled binary (2 Passed, 0 Failed).
Everything is done:
- Production change:
pkg/controller/admissionchecks/multikueue/workload.go— refresh the admission check'sLastTransitionTimeheartbeat insyncReservingRemoteState, and usew.clock.Sincein the lost-worker timeout check. - Verified: package build,
go vet, unit tests (pkg/controller/admissionchecks/...,pkg/workload,pkg/util/admissioncheck), and both worker-lost integration specs pass;git diff --checkis clean. - Changes are left uncommitted in the working tree as required.
- Production change:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.