blob: f094736cbaf7bc69f1d6545691916feb11d74b00 [file] [log] [blame]
syntax = "proto3";
package culprit.v1;
option go_package = "go.skia.org/infra/perf/go/culprit/proto/v1";
// Handles all culprit related actions.
service CulpritService {
// Stores commits identified as culprits in persistent storage.
rpc PersistCulprit(PersistCulpritRequest) returns (PersistCulpritResponse) {
}
// Fetches a given culprit by id
rpc GetCulprit(GetCulpritRequest) returns (GetCulpritResponse) {
}
// Takes necessary actions to inform users about the regression.
rpc NotifyUser(NotifyUserRequest) returns (NotifyUserResponse) {
}
}
// Request object for PersistCulprit rpc.
message PersistCulpritRequest {
// List of commits identified as culprits.
repeated Commit commits = 1;
// ID of the anomaly group corresponding to the bisection.
string anomaly_group_id = 2;
}
// Response object for PersistCulprit rpc.
message PersistCulpritResponse {
// List of culprit ids created.
repeated string culprit_ids = 1;
}
// Request object for GetCulprit rpc.
message GetCulpritRequest {
repeated string culprit_ids = 1;
}
// Response object for GetCulprit rpc.
message GetCulpritResponse {
repeated Culprit culprits = 1;
}
// Request object for NotifyUser rpc.
message NotifyUserRequest {
// List of culprit ids.
repeated string culprit_ids = 1;
// ID of the anomaly group corresponding to the bisection.
string anomaly_group_id = 2;
}
// Response object for NotifyUser rpc.
message NotifyUserResponse {
// List of issue ids created
repeated string issue_ids = 1;
}
// Represents the change which has been identified as a culprit.
message Culprit {
string id = 1;
Commit commit = 2;
repeated string anomaly_group_ids = 3;
repeated string issue_ids = 4;
}
// Represents a commit which has been identified as a culprit.
message Commit {
// Repo host e.g. chromium.googlesource.com
string host = 1;
// Project inside the repo e.g. chromium/src
string project = 2;
// Repo ref e.g. "refs/heads/main
string ref = 3;
// Commit Hash
string revision = 4;
}