tigerquoll opened a new pull request, #1136:
URL: https://github.com/apache/yunikorn-core/pull/1136

   ### What is this PR for?
   
   Fixes the two test failures on current master 
([YUNIKORN-3398](https://issues.apache.org/jira/browse/YUNIKORN-3398)) caused 
by a semantic conflict between two independently merged PRs:
   
   - [YUNIKORN-3360](https://issues.apache.org/jira/browse/YUNIKORN-3360) 
(#1130) added a guard to `RollbackAllocation` that rejects the rollback when 
the ask is missing from `sa.requests`.
   - [YUNIKORN-3352](https://issues.apache.org/jira/browse/YUNIKORN-3352) 
(#1122) added tests that exercise exactly that "ghost" state (ask wiped from 
`sa.requests`, allocation still in `sa.allocations`) and expected the pre-guard 
behaviour where the rollback succeeds.
   
   There was no textual conflict, so both merged cleanly and the combination 
broke `make test`:
   
   - `TestRollbackAllocationAskNotTracked` — asserted the ghost rollback 
succeeds
   - `TestApplicationPropertyFuzzHistogram` — asserted at least one successful 
ghost rollback across the seed set
   
   This is a **test-only** change aligning both tests with the YUNIKORN-3360 
semantics:
   
   - `TestRollbackAllocationAskNotTracked` now pins the guard: the rollback of 
a confirmed allocation whose ask is no longer tracked must be **rejected**, and 
must leave the allocation, `allocatedResource` and the pending histogram 
untouched. Since #1130 added no test of its own, this becomes the guard's first 
direct coverage.
   - The property fuzzer's rollback case now counts ghost rollback **attempts** 
and asserts each one is rejected; its reference model already treated a 
rejected rollback as a no-op, so the per-step invariant checks are unchanged.
   
   One note kept out of scope here: the ghost state itself is reachable in 
production (`removeAsksInternal("")` leaves `sa.allocations` populated until 
the shim confirms the releases), and with the guard in place a 
`SCHEDULING_FAILED_ON_RM` release arriving in that window is now dropped 
without cleaning up the allocated side. Whether that needs proper handling is a 
question for YUNIKORN-3360, not for these tests.
   
   ### What type of PR is it?
   * [x] Bug Fix (test only)
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/browse/YUNIKORN-3399
   
   ### How should this be tested?
   
   - `go test -tags deadlock -race -run 
'TestRollbackAllocationAskNotTracked|TestApplicationPropertyFuzzHistogram' 
./pkg/scheduler/objects/` — both pass (fail on master before this change)
   - full `./pkg/scheduler/objects/` package green with `-race -tags deadlock`
   
   Generated by the Author with assistance from Claude Code.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to