Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions api/stovepipe/proto/stovepipe.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,65 @@ message IngestResponse {
string id = 1;
}

// GetProjectStatusByURIRequest selects the authoritative validation for an exact commit URI.
message GetProjectStatusByURIRequest {
// Logical queue containing the request.
string queue = 1;
// Exact VCS-agnostic commit URI whose authoritative request is selected.
string change_uri = 2;
// Optional exact project scope. When set, page_size and page_token must be zero and empty;
// when absent, one page of planned projects is returned.
optional string project = 3;
// Maximum projects to return. Zero selects the server default; negative values and values
// above the server maximum are invalid.
int32 page_size = 4;
// Opaque continuation token. Empty selects the first page.
string page_token = 5;
}

// ProjectValidation contains one planned project and any recorded result.
message ProjectValidation {
// Stable project identifier.
string project = 1;
// Breakage degree measures how broken the project is on [0.0, 1.0]. Unset until its fact is
// recorded; zero is fully green and one is fully broken. Values are directly comparable:
// lower values are greener, and any value above zero is not green.
optional double breakage_degree = 2;
}

// GetProjectStatusByURIResponse contains the authoritative request's current validation projection.
message GetProjectStatusByURIResponse {
// Globally unique identifier of the authoritative request.
string request_id = 1;
// Logical queue containing the request.
string queue = 2;
// VCS-agnostic commit URI validated by the request.
string change_uri = 3;
// Baseline URI for incremental validation. Empty for a full build.
string base_uri = 4;
// Stable public lifecycle state and terminal outcome of the request.
string request_state = 5;
// Breakage degree measures how broken the whole repository is on [0.0, 1.0]. Unset until its
// fact is recorded; zero is fully green and one is fully broken. Values are directly
// comparable: lower values are greener, and any value above zero is not green.
optional double repository_breakage_degree = 6;
// Whether every planned project has one durable result and completion is recorded. False
// until the project list is available.
bool project_results_complete = 7;
// Planned projects in stable project order, with any recorded breakage degrees. Empty until
// the project list is available.
repeated ProjectValidation projects = 8;
// Opaque continuation token. Empty on the final page.
string next_page_token = 9;
}

// Stovepipe provides the Stovepipe API.
service Stovepipe {
// Ping returns a response indicating the service is alive
rpc Ping(PingRequest) returns (PingResponse) {}
// Ingest admits a queue's newly observed commit into the validation pipeline and returns
// the minted request ID. The caller hands off asynchronously; validation happens later.
rpc Ingest(IngestRequest) returns (IngestResponse) {}
// GetProjectStatusByURI returns current validation for an exact commit URI's authoritative request.
rpc GetProjectStatusByURI(GetProjectStatusByURIRequest) returns (GetProjectStatusByURIResponse) {}
}
Loading
Loading