Skip to content

feat(stovepipe): coalesce backlog in process controller#324

Merged
mnoah1 merged 2 commits into
mainfrom
mnoah1/stovepipe-process-coalesce
Jul 13, 2026
Merged

feat(stovepipe): coalesce backlog in process controller#324
mnoah1 merged 2 commits into
mainfrom
mnoah1/stovepipe-process-coalesce

Conversation

@mnoah1

@mnoah1 mnoah1 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What

This PR begins implementing core logic of the Process controller to supersede older requests as new ones come in.

https://github.com/uber/submitqueue/blob/main/doc/rfc/stovepipe/steps/process.md#process-algorithm

  • accepted requests get compared against the queue's latest request ID value
    • If a request is outdated compared to the queue's last ID, mark it superceded (this PR)
    • Otherwise, we'll build it now or re-check it later when a build slot is free (logic to come)
  • superseded / processing → ack no-op
  • Retryable load for request/queue not-found

Why

Implementing https://github.com/uber/submitqueue/blob/main/doc/rfc/stovepipe/steps/process.md step. Building out logic to accept incoming requests and narrow down builds to only the latest head.

Test plan

  • //stovepipe/controller/process:go_default_test
  • //stovepipe/controller:go_default_test
  • //test/integration/stovepipe:go_default_test

@mnoah1 mnoah1 requested review from a team, behinddwalls and sbalabanov as code owners July 9, 2026 15:22
@mnoah1 mnoah1 marked this pull request as draft July 9, 2026 15:23
@mnoah1 mnoah1 changed the title feat(stovepipe): coalesce backlog in process controller [draft / wip] feat(stovepipe): coalesce backlog in process controller Jul 9, 2026
@mnoah1 mnoah1 force-pushed the mnoah1/stovepipe-process-coalesce branch from 65c5fd6 to 0bb81c6 Compare July 9, 2026 15:28
@mnoah1 mnoah1 changed the title [draft / wip] feat(stovepipe): coalesce backlog in process controller feat(stovepipe): coalesce backlog in process controller (PR A) Jul 9, 2026
@mnoah1 mnoah1 changed the title feat(stovepipe): coalesce backlog in process controller (PR A) [draft / wip] feat(stovepipe): coalesce backlog in process controller (PR A) Jul 9, 2026
@mnoah1 mnoah1 force-pushed the mnoah1/stovepipe-ingest-queue-wiring branch from 6a281c4 to b27d20c Compare July 10, 2026 14:27
@mnoah1 mnoah1 force-pushed the mnoah1/stovepipe-process-coalesce branch from 0bb81c6 to 686ed39 Compare July 10, 2026 14:46
@mnoah1 mnoah1 changed the title [draft / wip] feat(stovepipe): coalesce backlog in process controller (PR A) feat(stovepipe): coalesce backlog in process controller Jul 10, 2026
@mnoah1 mnoah1 marked this pull request as ready for review July 10, 2026 15:12
@mnoah1 mnoah1 force-pushed the mnoah1/stovepipe-ingest-queue-wiring branch from fee8ec1 to 5f7ab76 Compare July 10, 2026 18:13
@mnoah1 mnoah1 force-pushed the mnoah1/stovepipe-process-coalesce branch from 1a66cd1 to ee5ac0c Compare July 10, 2026 18:21
@mnoah1 mnoah1 force-pushed the mnoah1/stovepipe-ingest-queue-wiring branch from 5f7ab76 to 1cb5649 Compare July 10, 2026 18:50
@mnoah1 mnoah1 force-pushed the mnoah1/stovepipe-process-coalesce branch from ee5ac0c to c1ee23a Compare July 10, 2026 18:51
@behinddwalls behinddwalls force-pushed the mnoah1/stovepipe-process-coalesce branch from c1ee23a to 7003035 Compare July 10, 2026 20:07
@behinddwalls behinddwalls changed the base branch from mnoah1/stovepipe-ingest-queue-wiring to main July 10, 2026 20:07

@behinddwalls behinddwalls left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the coalesce logic against the ingest-side invariants (pointer stamped before publish, queue row ensured before publish) — the supersede path and retryability calls all check out. Left a few minor inline suggestions, nothing blocking.

One non-inline note: unit coverage for the new transition is good; test/integration/stovepipe still only exercises ingest. A follow-up that ingests two successive heads through the real stack and asserts the older ends superseded would cover the CAS path against real MySQL — fine as a separate PR once the fake SourceControl can report successive heads.

Comment thread stovepipe/controller/process/process.go Outdated
Comment thread stovepipe/controller/process/process.go Outdated
Comment thread stovepipe/controller/process/process.go
Comment thread stovepipe/controller/process/process.go
Comment thread stovepipe/controller/process/process.go
Comment thread stovepipe/controller/process/process_test.go Outdated
Comment thread stovepipe/controller/process/process_test.go Outdated
mnoah1 added 2 commits July 13, 2026 19:13
Compare accepted requests against queue.latest_request_id and mark
older heads superseded. Latest heads remain accepted until admit lands
in a follow-up PR.
Add processing republish TODO, warn on unexpected states, broaden
storage_errors and superseded metrics, and harden coalesce unit tests.
@mnoah1 mnoah1 force-pushed the mnoah1/stovepipe-process-coalesce branch from 7003035 to 2b2eb79 Compare July 13, 2026 19:46
@mnoah1 mnoah1 added this pull request to the merge queue Jul 13, 2026
Merged via the queue into main with commit 6cfdca6 Jul 13, 2026
23 of 27 checks passed
@behinddwalls behinddwalls deleted the mnoah1/stovepipe-process-coalesce branch July 13, 2026 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants