blob: 3f5caf00000d8951250e18f0576145012fdf1f5a [file] [log] [blame] [edit]
// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";
package som.events;
option go_package = "infra/appengine/sheriff-o-matic/som/model/gen";
import "google/protobuf/timestamp.proto";
// Alerts contains alerts generated by sheriff-o-matic analyzer cron jobs.
message SOMAlertsEvent {
// Tree is the name of the tree.
string tree = 1;
// Timestamp is when the alerts were generated.
google.protobuf.Timestamp timestamp = 2;
// RequestId is the id of the incoming http request for the cron handler
// that generated these alerts. This ID appears in the GAE request logs as
// protoPayload.requestId.
string request_id = 3;
message Alert {
// Key is an opaque key generated for each alert.
string key = 1;
// Title is the human-readable title of the alert.
string title = 2;
// Body is the human-readable plain text body of the alert.
string body = 3;
// AlertType is the type of alert, from AlertType constants in
// infra/monitoring/messages/alerts.go. Until those constants are replaced
// in the analyzer code with these enum values, this list will have to be
// manually kept in sync.
enum AlertType {
// This should not be used. It is here as a result of deleting some unused
// values, and in proto3, the first enum value must be zero
UNUSED = 0;
// HUNG_BUILDER indicates that a builder has been executing a step for too long.
HUNG_BUILDER = 1;
// OFFLINE_BUILDER indicates that we have no recent updates from the builder.
OFFLINE_BUILDER = 2;
// IDLE_BUILDER indicates that a builder has not executed any builds recently
// even though it has requests queued up.
IDLE_BUILDER = 3;
// INFRA_FAILURE indicates that a builder step failed due to infrastructure.
INFRA_FAILURE = 4;
// BUILD_FAILURE indicates that one of the build steps failed, most likely
// due to the patch it's building/running with.
BUILD_FAILURE = 5;
// TEST_FAILURE indicates that one or more of the tests in the build failed.
TEST_FAILURE = 6;
}
// Type is the type of alert.
AlertType type = 4;
// BuildBotFaiure describes a range of failing builds on a buildbot builder.
message BuildbotFailure {
// Builder group is the name of the buildbot builder group.
string builder_group = 1;
// Builder is the name of the builder.
string builder = 2;
// Step is the name of the failing build step.
string step = 3;
// FirstFailure is the eariest known build number for this run of failures.
int64 first_failure = 4;
// LatestFailure is the latest known build number for this run of failures.
int64 latest_failure = 5;
// LatestPassing is the latest known build number where this step passed.
int64 latest_passing = 6;
}
// BuildbotFailures contains information about build failures grouped into this alert.
repeated BuildbotFailure buildbot_failures = 6;
}
// Alerts are the set of alerts generated by an analyzer cron job run.
repeated Alert Alerts = 4;
}
message SOMAnnotationEvent {
// Tree is the name of the tree.
string tree = 1;
// Timestamp is when the alerts were generated.
google.protobuf.Timestamp timestamp = 2;
// RequestId is the id of the incoming http request that generated this
// annotation. This ID appears in the GAE request logs as protoPayload.requestId.
string request_id = 3;
// User is the ID of the user making the annotation change.
string user = 4;
// AlertKeyDigest is the key digest for the alert.
string alert_key_digest = 5;
// AlertKey is an opaque key for the alert being annotated.
string alert_key = 6;
enum OperationType {
ADD = 0;
DELETE = 1;
}
// Operation is the annoation operation.
OperationType operation = 7;
message MonorailBug {
string bug_id = 1;
string project_id = 2;
}
// Deprecated, use bug_list instead
repeated string bugs = 8 [deprecated=true];
// bug_list is the list of MonorailBugs attached to the alert.
repeated MonorailBug bug_list = 13;
// Comment is a user comment attached to an alert.
message Comment {
// Text is the text of the comment.
string text = 1;
// Time is the time when the comment was posted.
google.protobuf.Timestamp time = 2;
}
// Comments is the list of comments attached to the alert.
repeated Comment comments = 9;
// SnoozeTime is the time until which to snooze the alert.
google.protobuf.Timestamp snooze_time = 10;
// GroupId is the name of the alert group to which the alert belongs.
string group_id = 11;
// ModificationTime is the time the annotation was modified.
google.protobuf.Timestamp modification_time = 12;
}