github.com/GoogleCloudPlatform/testgrid@v0.0.174/pb/state/state.proto (about)

     1  // Backing state for a test results table of a TestGrid dashboard tab.
     2  // Grid is the top-level message; updated and stored by the updater and
     3  // tabulator.
     4  syntax = "proto3";
     5  
     6  package testgrid.state;
     7  
     8  option go_package = "github.com/GoogleCloudPlatform/testgrid/pb/state";
     9  
    10  import "google/protobuf/timestamp.proto";
    11  import "pb/config/config.proto";
    12  
    13  message Property { map<string, string> property = 1; }
    14  
    15  // A metric and its values for each test cycle.
    16  message Metric {
    17    string name = 1; // Name of metric, such as duration
    18    // Sparse encoding of values. Indices is a list of pairs of <index, count>
    19    // that details columns with metric values. So given:
    20    //   Indices: [0, 2, 6, 4]
    21    //   Values: [0.1,0.2,6.1,6.2,6.3,6.4]
    22    // Decoded 12-value equivalent is:
    23    // [0.1, 0.2, nil, nil, nil, nil, 6.1, 6.2, 6.3, 6.4, nil, nil, ...]
    24    repeated int32 indices =
    25        2; // n=index of first value, n+1=count of filled values
    26    repeated double values = 3; // only present for columns with a metric value
    27  }
    28  
    29  message UpdatePhaseData {
    30    // The name for a part of the update cycle.
    31    string phase_name = 1;
    32  
    33    // Time taken for a part of the update cycle, in seconds.
    34    double phase_seconds = 2;
    35  }
    36  
    37  // Info on time taken to update test results during the last update cycle.
    38  message UpdateInfo {
    39    // Metrics for how long parts of the update cycle take.
    40    repeated UpdatePhaseData update_phase_data = 1;
    41  }
    42  
    43  // Info on a failing test row about the failure.
    44  message AlertInfo {
    45    // Number of results that have failed.
    46    int32 fail_count = 1;
    47  
    48    // The build ID the test first failed at.
    49    string fail_build_id = 2;
    50  
    51    // The time the test first failed at.
    52    google.protobuf.Timestamp fail_time = 3;
    53  
    54    // The test ID for the first test failure.
    55    string fail_test_id = 4;
    56  
    57    // The build ID the test last passed at.
    58    string pass_build_id = 5;
    59  
    60    // The time the test last passed at.
    61    google.protobuf.Timestamp pass_time = 6;
    62  
    63    // A snippet explaining the failure.
    64    string failure_message = 7;
    65  
    66    // Link to search for build changes, internally a code-search link.
    67    string build_link = 8;
    68  
    69    // Text for option to search for build changes.
    70    string build_link_text = 9;
    71  
    72    // Text to display for link to search for build changes.
    73    string build_url_text = 10;
    74  
    75    // The build ID for the latest test failure. (Does not indicate the failure is
    76    // 'over', just the latest test failure we found.)
    77    string latest_fail_build_id = 11;
    78  
    79    // The test ID for the latest test failure.
    80    string latest_fail_test_id = 14;
    81  
    82    // Maps (property name):(property value) for arbitrary alert properties.
    83    map<string, string> properties = 12;
    84  
    85    // A list of IDs for issue hotlists related to this failure.
    86    repeated string hotlist_ids = 13;
    87  
    88    // Dynamic email list, route email alerts to these instead of the configured
    89    // defaults.
    90    repeated string email_addresses = 15;
    91  
    92    // Maps (custom column headers name):(custom column headers value) for arbitrary alert properties.
    93    map<string,string> custom_column_headers = 16;
    94  }
    95  
    96  // Info on default test metadata for a dashboard tab.
    97  message TestMetadata {
    98    // Name of the test with associated test metadata.
    99    string test_name = 1;
   100  
   101    // Default bug component.
   102    int32 bug_component = 2;
   103  
   104    // Default owner.
   105    string owner = 3;
   106  
   107    // Default list of cc's.
   108    repeated string cc = 4;
   109  
   110    // When present, only file a bug for failed tests with same error type.
   111    // Otherwise, always file a bug.
   112    string error_type = 5;
   113  
   114    reserved 6;
   115  }
   116  
   117  // TestGrid column headers. Does not contain the individual cells.
   118  message Column {
   119    // Unique instance of the job, typically BUILD_NUMBER from prow or a guid
   120    string build = 1;
   121  
   122    // Name associated with the column (such as the run/invocation ID).No two
   123    // columns should have the same build_id and name. The name field allows the
   124    // display of multiple columns with the same build_id.
   125    string name = 2;
   126  
   127    // Milliseconds since start of epoch (python time.time() * 1000)
   128    // TODO(#683): Use a timestamp, not this double
   129    double started = 3;
   130  
   131    // Additional custom headers like commit, image used, etc.
   132    repeated string extra = 4;
   133  
   134    // Custom hotlist ids.
   135    string hotlist_ids = 5;
   136  
   137    // An optional hint for the updater.
   138    string hint = 6;
   139  
   140    // Dynamic email list, route email alerts to these instead of the configured
   141    // defaults.
   142    repeated string email_addresses = 7;
   143  
   144    // Status totals for the column.
   145    // Only written in tab state, if a broken threshold is defined for columns.
   146    Stats stats = 8;
   147  }
   148  
   149  message Stats {
   150    int32 fail_count = 1;
   151    int32 pass_count = 2;
   152    int32 total_count = 3;
   153    // True if this column has any in-progress runs.
   154    bool pending = 4;
   155    // True if a broken threshold is defined, and this column's fail/total ratio
   156    // exceeds it.
   157    bool broken = 5;
   158  }
   159  
   160  // TestGrid rows
   161  message Row {
   162    // Display name, which might process id to append/filter info.
   163    string name = 1;
   164  
   165    // raw id for the row, such as the bazel target or golang package.
   166    string id = 2;
   167  
   168    // Results for this row, run-length encoded to reduce size/improve
   169    // performance. Thus (encoded -> decoded equivalent):
   170    //   [0, 3, 5, 4] -> [0, 0, 0, 5, 5, 5, 5]
   171    //   [5, 1] -> [5]
   172    //   [1, 5] -> [1, 1, 1, 1, 1]
   173    // The decoded values are Result enums
   174    repeated int32 results = 3;
   175  
   176    // Test IDs for each test result in this test case.
   177    // Must be present on every column, regardless of status.
   178    repeated string cell_ids = 4;
   179  
   180    // Short description of the result, displayed on mouseover.
   181    // Present for any column with a non-empty status (not NO_RESULT).
   182    repeated string messages = 5;
   183  
   184    reserved 6;
   185  
   186    // Names of metrics associated with this test case. Stored separate from
   187    // metric info (which may be omitted).
   188    repeated string metric = 7;
   189  
   190    repeated Metric metrics = 8; // Numerical performance/timing data, etc.
   191  
   192    // Short string to place inside the cell (F for fail, etc)
   193    // Present for any column with a non-empty status (not NO_RESULT).
   194    repeated string icons = 9;
   195  
   196    // IDs for issues associated with this row.
   197    repeated string issues = 10;
   198  
   199    // An alert for the failure if there's a recent failure for this row.
   200    AlertInfo alert_info = 11;
   201  
   202    // Values of a user-defined property found in cells for this row.
   203    // TODO: Fold this into `properties` field.
   204    repeated string user_property = 12;
   205  
   206    // General key-value pairs associated with cells in this row.
   207    // Present for any column with a non-empty status (not NO_RESULT).
   208    repeated Property properties = 13;
   209  }
   210  
   211  // A single table of test results backing a dashboard tab.
   212  message Grid {
   213    // A cycle of test results, not including the results. In the TestGrid client,
   214    // the cycles define the columns.
   215    repeated Column columns = 1;
   216  
   217    // A test case with test results. In the TestGrid client, the cases define the
   218    // rows (and the results define the individual cells).
   219    repeated Row rows = 2;
   220  
   221    reserved 3;
   222  
   223    // The latest configuration used to generate this test group.
   224    testgrid.config.TestGroup config = 4;
   225  
   226    reserved 5;
   227  
   228    // Seconds since epoch for last time this cycle was updated.
   229    double last_time_updated = 6;
   230  
   231    reserved 7;
   232  
   233    // Stored info on previous timing for parts of the update cycle.
   234    repeated UpdateInfo update_info = 8;
   235  
   236    // Stored info on default test metadata.
   237    repeated TestMetadata test_metadata = 9;
   238  
   239    // Clusters of failures for a TestResultTable instance.
   240    repeated Cluster cluster = 10;
   241  
   242    // Most recent timestamp that clusters have processed.
   243    double most_recent_cluster_timestamp = 11;
   244  }
   245  
   246  // A cluster of failures grouped by test status and message for a test results
   247  // table.
   248  message Cluster {
   249    // Test status cluster grouped by.
   250    int32 test_status = 1;
   251  
   252    // Error message or testFailureClassification string cluster grouped by.
   253    string message = 2;
   254  
   255    // ClusterRows that belong to this cluster.
   256    repeated ClusterRow cluster_row = 3;
   257  }
   258  
   259  // Cells in a TestRow that belong to a specific Cluster.
   260  message ClusterRow {
   261    // Name of TestRow.
   262    string display_name = 1;
   263  
   264    // Index within row that belongs to Cluster (refer to columns of the row).
   265    repeated int32 index = 2;
   266  }