Skip to content

Commit 88d2243

Browse files
committed
feat(stovepipe): Track issues in bounded passes
1 parent 9721cf1 commit 88d2243

8 files changed

Lines changed: 1095 additions & 16 deletions

File tree

‎stovepipe/controller/issuetrack/BUILD.bazel‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ go_library(
66
importpath = "github.com/uber/submitqueue/stovepipe/controller/issuetrack",
77
visibility = ["//visibility:public"],
88
deps = [
9+
"//platform/base/id:go_default_library",
10+
"//platform/base/messagequeue:go_default_library",
911
"//platform/consumer:go_default_library",
1012
"//platform/metrics:go_default_library",
13+
"//stovepipe/core/loader:go_default_library",
14+
"//stovepipe/core/messagequeue:go_default_library",
1115
"//stovepipe/entity:go_default_library",
1216
"//stovepipe/extension/storage:go_default_library",
1317
"@com_github_uber_go_tally//:go_default_library",
@@ -18,11 +22,14 @@ go_library(
1822
go_test(
1923
name = "go_default_test",
2024
srcs = [
25+
"delivery_test.go",
2126
"issuetrack_test.go",
2227
"pending_change_race_test.go",
2328
],
2429
embed = [":go_default_library"],
2530
deps = [
31+
"//platform/base/messagequeue:go_default_library",
32+
"//platform/consumer/mock:go_default_library",
2633
"//stovepipe/core/messagequeue:go_default_library",
2734
"//stovepipe/entity:go_default_library",
2835
"//stovepipe/extension/storage:go_default_library",

‎stovepipe/controller/issuetrack/README.md‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Issue tracking
22

3+
## Notifications and bounded work
4+
5+
Notifications identify a queue, build, and whether analysis is final. They share one queue partition and consumer group. Pending work is finished before another source is accepted. With no pass pending, request ingest order rejects older builds, finalized requests reject later refreshes, and completed owning notifications are ignored on replay. A notification that helps another pass finish holds once more for its own work.
6+
7+
Each delivery processes at most 100 distinct task/unit keys, including a resumed change and closed records. Refresh opens newly reported issues but does not close by absence. Finalization also scans issue states: reported issues stay open or reopen, absent open issues close, and closed records remain untouched. A canceled build cannot close by absence because validation may not have run. Every scanned key advances progress, including closed records; a full read requires another batch to establish exhaustion.
8+
9+
Before changing an issue, planning reads its current version and saves the exact intended transition using progress CAS. No issue write happens if that save loses a race. The saved change retains its original expected version and history timestamp. Final handoff requires successful complete detection and persistence, and the request's recorded winning terminal build. Finalization uses accumulated per-build issues, not just the latest detector response.
10+
311
## Applying a saved change
412

513
The controller applies one `PendingIssueChange` already saved in the queue's progress record. Expected issue version zero means create-if-absent. A positive version means update that exact version. A retry never adopts a newly loaded version to execute old instructions.
@@ -10,4 +18,4 @@ A replacement must finish that same pending change before accepting later work.
1018

1119
All writes use complete primary keys. There are no cross-record transactions, leases, snapshot indexes, or additional operation counters. Records and versions must not be deleted or reset while an old delivery could resume. All issue-state writers must follow this protocol.
1220

13-
This layer does not scan build issues, receive queue messages, publish repairs, or register a runtime consumer. Planning, delivery orchestration, and terminal recovery are separate additions.
21+
The reference host does not register this consumer. Repair publication and terminal recovery remain follow-ups. Permanently failing pending changes block later issue-tracking work and require recovery; skipping the saved change is not safe. A future repair handoff must persist its prerequisites and publish before clearing the change that owns that obligation.

0 commit comments

Comments
 (0)