Commit cd41d0c
authored
test(e2e): prove a dependent batch is woken by the merge ahead of it (#576)
## Summary
### Why?
The parent change fixes a dropped wake-up: a merged batch fans out to
speculate so its dependents can re-plan, and that message used to reuse
the bare batch ID the batch controller had already published to the same
topic and partition at creation. The queue deduplicates against rows it
has not collected yet, consumed ones included, so the fan-out was
reported as a success, stored nothing, and never arrived.
That fix shipped with unit coverage on the message ID and integration
coverage on the queue semantics, but nothing exercised the path the bug
actually broke. It is also a path that hides easily: any other event
re-plans the queue and moves the dependent along, so a naive two-request
test passes with or without the fix.
### What?
A new e2e case isolates the fan-out as the only possible wake-up,
following the stop → observe → start shape
`TestCancel_CaughtPreBatch_NeverLands` already uses:
1. Close the `runway-merge` gate for the queue before landing, so the
lead batch cannot complete its merge.
2. Land the lead; wait for its merge to park, keyed by the lead's batch
ID.
3. Land the dependent. Its batch serializes behind the lead's, which is
in-flight (`Merging` is a dependency state).
4. Wait for the dependent to reach `speculated` — its speculative build
has already passed, so its own build signals are finished and nothing
else will wake it.
5. Open the gate. The lead merges and fans out.
The dependent reaching `landed` is then attributable to the fan-out
alone.
Supporting changes: `e2e-chain-queue` is registered in `queues.yaml`. It
is deliberately absent from the orchestrator's per-queue profiles so it
falls through to the baseline profile and its `all` conflict analyzer,
which serializes every new batch behind every in-flight one — that is
what builds the chain. A new `awaitBatchID` harness helper resolves a
request's batch ID from the operating store, since merge messages are
keyed by batch rather than by the sqid a test holds.
## Test Plan
- ✅ `bazel test //test/e2e/...` — 3 suites, including the new case
(~33s)
- ✅ `make lint-license`, `make lint-message-id`, `make lint-queue-shard`
- **Confirmed the test fails against the unfixed code.** Reverting the
parent's `mergesignal` message ID to the bare batch ID leaves the
dependent stuck at `speculated` and the suite runs to Bazel's timeout
(`TIMEOUT in 240.3s` with `--test_timeout=240`); with the fix it passes
in 33s.
A stalled pipeline surfaces as a test timeout rather than an assertion
failure, which is how this harness reports non-convergence — `pollUntil`
has no deadline of its own by design, so Bazel's timeout is the only
one.
## Stack
1. #574
1. @ #5761 parent e21ab03 commit cd41d0c
3 files changed
Lines changed: 107 additions & 0 deletions
File tree
- service/submitqueue/gateway/server
- test/e2e/submitqueue
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
186 | 210 | | |
187 | 211 | | |
188 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
279 | 357 | | |
280 | 358 | | |
281 | 359 | | |
| |||
0 commit comments