Skip to content

feat(submitqueue): Add queuepause Store contract and QueuePause entity - #862

Merged
manjari25 merged 5 commits into
mainfrom
manjari/queue-pause-1-contract
Oct 15, 2026
Merged

manjari25 merged 5 commits into
mainfrom
manjari/queue-pause-1-contract

Conversation

@manjari25

@manjari25 manjari25 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Why?

Operators need to pause a queue at runtime without redeploying (see the pause and unpause RFC). The pause state needs its own source, separate from queue config, so each deployment can back it with whatever it uses for runtime config.

What?

  • entity.QueuePause: two independent switches, RejectLands and FreezeProcessing. The zero value means not paused.
  • queuepause.Store: a single Get(ctx, queue) contract. A queue with no entry returns the zero state, and an error means the backend could not be read, never that the queue is unpaused.
  • The mock, a README, and the new package added to the mock generation list.

Test Plan

bazel build //submitqueue/extension/queuepause/... //submitqueue/entity/...
make lint
make check-gazelle
make check-tidy
CI

Issue

@manjari25
manjari25 requested review from a team, behinddwalls and sbalabanov as code owners October 14, 2026 17:37
@behinddwalls
behinddwalls added this pull request to stack #868 October 14, 2026 19:49

@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.

Two independent booleans, with the zero value meaning not paused, looks like the right shape to me: all four combinations mean something, and absence naturally reads as unpaused. Inline: one suggested field (Reason), one naming nit, and a note on how the error doc relates to the freeze fail-open question. I'd deliberately leave out Queue (lookups are by key), Version (nothing in SubmitQueue writes this yet) and expiry (automatic unpausing is a behavior decision).

Comment thread submitqueue/entity/queue_pause.go
Comment thread submitqueue/entity/queue_pause_state.go Outdated
Comment thread submitqueue/extension/queuepause/queuepause.go Outdated
@manjari25
manjari25 force-pushed the manjari/queue-pause-1-contract branch from d1a293e to 0b5ce36 Compare October 14, 2026 20:17
@manjari25 manjari25 changed the title feat(submitqueue): Add queuepause Store contract and QueuePauseState entity feat(submitqueue): Add queuepause Store contract and QueuePause entity Oct 14, 2026
@behinddwalls
behinddwalls added this pull request to the merge queue Oct 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 15, 2026
@manjari25
manjari25 added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit e761b05 Oct 15, 2026
33 of 35 checks passed
@manjari25
manjari25 deleted the manjari/queue-pause-1-contract branch October 15, 2026 22:14
Tmwakalasya pushed a commit to Tmwakalasya/submitqueue that referenced this pull request Oct 15, 2026
## Why?
The pause RFC still presented two options as an open comparison, but the
stack in uber#862 to uber#865 and the e2e tests implement one of them. An RFC
describes what is on main, so it now records the design that shipped and
only the alternative it rejected.

## What?
- Rewrites the pause RFC around the shipped design: a separate
`queuepause` extension, reject (`FailedPrecondition`, carrying the
operator's reason) and freeze, both failing closed on a read error. A
cancelled context is passed through.
- Documents the `noop`, `file` and `fake` stores,
`QUEUE_PAUSE_CONFIG_PATH`, and the shared wiring helper.
- Adds the requirements an implementation of `queuepause.Store` must
meet, such as failing closed on read errors, strict parsing, and failing
at construction on bad configuration.
- States that the gateway's own request-log consumer is not frozen, so
status and history keep materializing during a freeze.
- Keeps the queue-config option only as a short rejected alternative,
and drops the resolved fail-open question.
- Corrects the consumer gate RFC: orchestrator stages share one consumer
group, and production pause is a separate mechanism that wraps the gate.
Updates the RFC index entry.

## Test Plan
Docs only, no runnable change. `make lint` passes.

## Issue
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