Fix the review of the checks-wait milestone: redeliveries, deleted modules, the kept queue

A check pending redelivery is read before the let-through fetches (none is handed back);
a deleted module is done for the plan's key; the queue an ask came from is let go of when
it ends. Tries say they run under their own id.
This commit is contained in:
2026-10-21 20:17:37 +02:00
parent bb8f076cc0
commit 60253c82b7
7 changed files with 149 additions and 11 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ func buildPhaseOf(p inventory.Plan) bool {
if st != nil && st.State != "" {
asked = true
}
if st == nil || st.State != "built" {
if st == nil || (st.State != "built" && st.State != planDeleted) {
unbuilt = true
}
}
@@ -81,6 +81,8 @@ func TestAPlanIsInItsBuildPhaseFromTheFirstAskToTheLastBuild(t *testing.T) {
{"between two tiers", aPlan("p", inventory.PlanRolling, tiers, map[string]string{"a": "built", "b": "built"}), true},
{"the last tier asked", aPlan("p", inventory.PlanBuilding, tiers, map[string]string{"a": "built", "b": "built", "c": "asked"}), true},
{"every build built", aPlan("p", inventory.PlanRolling, tiers, map[string]string{"a": "built", "b": "built", "c": "built"}), false},
// A module the plan deletes is done as far as its tiers go (release_plan.go), so it holds no key through the rollout.
{"a deleted module is done", aPlan("p", inventory.PlanRolling, tiers, map[string]string{"a": "built", "b": "built", "c": planDeleted}), false},
{"failed", aPlan("p", inventory.PlanFailed, tiers, map[string]string{"a": "failed", "b": "asked"}), false},
{"superseded", aPlan("p", inventory.PlanSuperseded, tiers, map[string]string{"a": "asked"}), false},
{"a batch whose window is open", aPlan("p", inventory.PlanAssembling, tiers, map[string]string{"a": "asked"}), false},