Skip to content

Commit bed2585

Browse files
authored
Merge branch 'main' into blrd
2 parents 658986d + e17ca6c commit bed2585

31 files changed

Lines changed: 2473 additions & 59 deletions

api/stovepipe/proto/stovepipe.proto

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,72 @@ message IngestResponse {
5454
string id = 1;
5555
}
5656

57+
// GetRequestHistoryByIDRequest selects one request history by the ID returned from Ingest.
58+
message GetRequestHistoryByIDRequest {
59+
// Logical queue containing the request.
60+
string queue = 1;
61+
// Globally unique request identifier returned from Ingest.
62+
string request_id = 2;
63+
}
64+
65+
// GetRequestHistoryByURIRequest selects retained request histories for an exact commit URI.
66+
message GetRequestHistoryByURIRequest {
67+
// Logical queue containing the request.
68+
string queue = 1;
69+
// Exact VCS-agnostic commit URI whose request histories are selected.
70+
string uri = 2;
71+
}
72+
73+
// HistoryEvent is one retained request state or lifecycle event.
74+
message HistoryEvent {
75+
// Opaque stable identity of this logical occurrence within the request.
76+
string event_id = 1;
77+
// Occurrence time in Unix milliseconds.
78+
int64 timestamp_ms = 2;
79+
// Exactly one occurrence kind is populated.
80+
oneof occurrence {
81+
// Durable request state reached by the request.
82+
string request_state = 3;
83+
// Event that occurred without changing the request state.
84+
string event = 4;
85+
}
86+
// Newer request that caused a superseded state. Empty when not applicable.
87+
string superseded_by_request_id = 5;
88+
// Build associated with the occurrence. Empty when no build applies.
89+
string build_id = 6;
90+
// Stable domain reason for a terminal request outcome. Empty otherwise.
91+
string outcome_reason = 7;
92+
}
93+
94+
// RequestHistory identifies one request and contains its ordered events.
95+
message RequestHistory {
96+
// Globally unique request identifier.
97+
string request_id = 1;
98+
// Events ordered by occurrence time and stable event identity.
99+
repeated HistoryEvent events = 2;
100+
}
101+
102+
// GetRequestHistoryByIDResponse contains all retained events for one request.
103+
message GetRequestHistoryByIDResponse {
104+
// Events ordered by occurrence time and stable event identity.
105+
repeated HistoryEvent events = 1;
106+
}
107+
108+
// GetRequestHistoryByURIResponse contains all retained request histories for an exact URI.
109+
message GetRequestHistoryByURIResponse {
110+
// Histories ordered by numeric request-ID counter, then request ID.
111+
repeated RequestHistory histories = 1;
112+
}
113+
57114
// Stovepipe provides the Stovepipe API.
58115
service Stovepipe {
59116
// Ping returns a response indicating the service is alive
60117
rpc Ping(PingRequest) returns (PingResponse) {}
61118
// Ingest admits a queue's newly observed commit into the validation pipeline and returns
62119
// the minted request ID. The caller hands off asynchronously; validation happens later.
63120
rpc Ingest(IngestRequest) returns (IngestResponse) {}
121+
// GetRequestHistoryByID returns retained history for one request ID.
122+
rpc GetRequestHistoryByID(GetRequestHistoryByIDRequest) returns (GetRequestHistoryByIDResponse) {}
123+
// GetRequestHistoryByURI returns retained histories for an exact commit URI.
124+
rpc GetRequestHistoryByURI(GetRequestHistoryByURIRequest) returns (GetRequestHistoryByURIResponse) {}
64125
}

0 commit comments

Comments
 (0)