Flow runs wait their turn in a queue per project and base #196
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/3759-s1-the-queue-in-the-store-and-its-slots"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracker: #3759
Step 1 of #3672's planspec (note revision 5): the queue in the store, and its slots.
What it delivers
queuedflow run. A queue runs one flow run at a time until its slots are set; 0 slots holds it. A run its queue began holds a slot until it ends, done or stopped, and keeps it while it waits on Agra or is blocked at a Wait.advance_queuesbegins its first queued run, by position, whose task waits on nothing: no task it follows or that blocks it is undone (its status done, or its latest started flow run ended done). Every store write that answers the runs it queues calls it once before its COMMIT.start_flowsplits intoenqueue_flowandbegin_flow. A Wait's blockers and Run steps' steps begin at once outside the slots, and begin a queued run their task already has. A run held at a Wait takes the queued runs of its pending blockers out of their queues, ablocksrelation created onto its task included, so a queue never waits on itself.started_at, and renumbers the runs behind it; a task its earlier run made done stays done. Stopping a holder frees its slot.started_at) decidesdone_by,steps_on,blockers_toldandBlockingTask.latest.flow_runthroughapply_rebuild: thequeuedstate,queue_pos,started_at,from_queue,options,imagesandproposal_option, with the task's CHECKs, and addsflow_queue. The backfill gives every run itscreated_atasstarted_at, andfrom_queue1 to every run noqueuedevent with partflownames, in one uncorrelated pass over the events.PUT /api/projects/:id/queuestakes{base, slots}and answers the queue; a basebranch_validrefuses or negative slots answer 400invalid.GET /api/flow-runs?state=queuedlists queued runs. docs/api.md documents thequeuedstate, the Queues section and the route.queuedflow-run state to the design system's queued state, and the task's flow card offers Stop on a queued run.Tests
0acbc0c1the re-dispatched step's run staysqueuedat position 1 and the plan staysneeds_you; with the fix it begins and the plan resumes at its Run steps.heldblocktidonce tid's run has begun.stopAllstops queued runs. No golden is added or changed.Gates
sak-gate full, gate run 1 ate0ede19f: passed (72 sx tests, step9_release, the deploy contract, e2e 777 passed, runner e2e 10 passed).Flow runs wait their turn in a queue per project and base, and a queue begins its next run whenever it has a free slotto Flow runs wait their turn in a queue per project and base, which begins its next run whenever it has a free slotFlow runs wait their turn in a queue per project and base, which begins its next run whenever it has a free slotto Flow runs wait their turn in a queue per project and base