github.com/GoogleCloudPlatform/testgrid@v0.0.174/pb/api/v1/data.proto (about) 1 syntax = "proto3"; 2 3 package testgrid.api.v1; 4 5 option go_package = "github.com/GoogleCloudPlatform/testgrid/pb/api/v1"; 6 7 import "google/protobuf/timestamp.proto"; 8 import "pb/config/config.proto"; 9 import "pb/state/state.proto"; 10 import "pb/summary/summary.proto"; 11 12 service TestGridData { 13 // GET /dashboards 14 // Lists dashboard names 15 rpc ListDashboards(ListDashboardsRequest) returns (ListDashboardsResponse) {} 16 17 // GET /dashboard-groups 18 // Lists the dashboard group names 19 rpc ListDashboardGroups(ListDashboardGroupsRequest) 20 returns (ListDashboardGroupsResponse) {} 21 22 // GET /dashboards/{dashboard}/tabs 23 // Lists the dashboard tab names 24 rpc ListDashboardTabs(ListDashboardTabsRequest) 25 returns (ListDashboardTabsResponse) {} 26 27 // GET /dashboards/{dashboard} 28 // Returns a Dashboard config's metadata 29 // Excludes subtabs, accessed through the /tabs list method instead 30 rpc GetDashboard(GetDashboardRequest) returns (GetDashboardResponse) {} 31 32 // GET /dashboard-groups/{dashboard-group} 33 // Lists the dashboard names in that group 34 rpc GetDashboardGroup(GetDashboardGroupRequest) 35 returns (GetDashboardGroupResponse) {} 36 37 // GET /dashboards/{dashboard}/tabs/{tab}/headers 38 // Returns the headers for grid results 39 rpc ListHeaders(ListHeadersRequest) returns (ListHeadersResponse) {} 40 41 // GET /dashboards/{dashboard}/tabs/{tab}/rows 42 // Returns information on grid rows, and data within those rows 43 rpc ListRows(ListRowsRequest) returns (ListRowsResponse) {} 44 45 // GET /dashboards/{dashboard}/tab-summaries 46 // Returns the list of tab summaries for dashboard. 47 rpc ListTabSummaries(ListTabSummariesRequest) returns (ListTabSummariesResponse){} 48 49 // GET /dashboards/{dashboard}/tab-summaries/{tab} 50 rpc GetTabSummary(GetTabSummaryRequest) returns (GetTabSummaryResponse){} 51 52 // GET /dashboard-groups/{dashboard-group}/dashboard-summaries 53 rpc ListDashboardSummaries(ListDashboardSummariesRequest) returns (ListDashboardSummariesResponse){} 54 55 // GET /dashboards/{dashboard}/summary 56 rpc GetDashboardSummary(GetDashboardSummaryRequest) returns (GetDashboardSummaryResponse){} 57 } 58 59 message ListDashboardsRequest { string scope = 1; } 60 61 message ListDashboardsResponse { repeated DashboardResource dashboards = 1; } 62 63 message ListDashboardGroupsRequest { string scope = 1; } 64 65 message ListDashboardGroupsResponse { repeated Resource dashboard_groups = 1; } 66 67 message ListDashboardTabsRequest { 68 string scope = 1; 69 string dashboard = 2; 70 } 71 72 message ListDashboardTabsResponse { repeated Resource dashboard_tabs = 1; } 73 74 message GetDashboardRequest { 75 string scope = 1; 76 string dashboard = 2; 77 } 78 79 message GetDashboardResponse { 80 // A list of notifications attached to this dashboard. 81 // This is displayed on any dashboard tab in this dashboard. 82 repeated testgrid.config.Notification notifications = 1; 83 84 // Control which tab is displayed when first opening a dashboard. 85 // Defaults to Summary 86 string default_tab = 2; 87 88 // Controls whether to suppress highlighting of failing tabs. 89 bool suppress_failing_tabs = 3; 90 91 // Controls whether to apply special highlighting to result header columns for 92 // the current day. 93 bool highlight_today = 4; 94 } 95 96 message GetDashboardGroupRequest { 97 string scope = 1; 98 string dashboard_group = 2; 99 } 100 101 message GetDashboardGroupResponse { repeated Resource dashboards = 1; } 102 103 message ListHeadersRequest { 104 string scope = 1; 105 string dashboard = 2; 106 string tab = 3; 107 } 108 109 message ListHeadersResponse { 110 repeated Header headers = 1; 111 112 message Header { 113 // Unique instance of the job, typically BUILD_NUMBER from prow or a guid 114 string build = 1; 115 116 // Name associated with the column (such as the run/invocation ID). No two 117 // columns should have the same build_id and name. The name field allows the 118 // display of multiple columns with the same build_id. 119 string name = 2; 120 121 // When the build started running 122 google.protobuf.Timestamp started = 3; 123 124 // Additional custom headers like commit, image used, etc. 125 repeated string extra = 4; 126 127 // Custom hotlist ids. 128 string hotlist_ids = 5; 129 } 130 } 131 132 message ListRowsRequest { 133 string scope = 1; 134 string dashboard = 2; 135 string tab = 3; 136 } 137 138 message ListRowsResponse { 139 repeated Row rows = 1; 140 141 message Row { 142 // Display name of the test case 143 string name = 1; 144 145 // Historical results of the test case. Unencoded. 146 repeated Cell cells = 2; 147 148 // Issue or Bug IDs associated with the test case 149 repeated string issues = 3; 150 151 // Alert associated with the test case 152 testgrid.state.AlertInfo alert = 4; 153 154 // TODO(chases2): Add metrics to these resources 155 } 156 157 message Cell { 158 int32 result = 1; 159 string cell_id = 2; 160 string message = 3; 161 string icon = 4; 162 } 163 } 164 165 // A Resource is a REST resource, often returned by a LIST command 166 // It includes the name of the resource and a link to the resource 167 message Resource { 168 string name = 1; 169 string link = 2; 170 } 171 172 // A DashboardResource is a REST resource for a dashboard 173 // It includes the name of the resource, a link, and a dashboard group to which it belongs 174 message DashboardResource { 175 string name = 1; 176 string link = 2; 177 // Dashboard group to which the dashboard belongs to. 178 // Empty if dashboard doesn't belong to any group. 179 string dashboard_group_name = 3; 180 } 181 182 message ListTabSummariesRequest { 183 // Scope defines the GCS bucket to read the results from. 184 string scope = 1; 185 186 // Name of the dashboard to fetch tab summaries for. 187 string dashboard = 2; 188 } 189 190 message ListTabSummariesResponse { 191 // List of tab summaries. 192 repeated TabSummary tab_summaries = 1; 193 } 194 195 message GetTabSummaryRequest{ 196 // Scope defines the GCS bucket to read the results from. 197 string scope = 1; 198 199 // Name of the dashboard to fetch tab summaries for. 200 string dashboard = 2; 201 202 // Name of the particular tab to fetch the summary for. 203 string tab = 3; 204 } 205 206 message GetTabSummaryResponse{ 207 // Summary for the tab 208 TabSummary tab_summary = 1; 209 } 210 211 message ListDashboardSummariesRequest{ 212 // Scope defines the GCS bucket to read the results from. 213 string scope = 1; 214 215 // Name of the dashboard group to fetch dashboard summaries for. 216 string dashboard_group = 2; 217 } 218 219 message ListDashboardSummariesResponse{ 220 // List of dashboard summaries. 221 repeated DashboardSummary dashboard_summaries = 1; 222 } 223 224 message GetDashboardSummaryRequest{ 225 // Scope defines the GCS bucket to read the results from. 226 string scope = 1; 227 228 // Name of the dashboard to fetch the summary for. 229 string dashboard = 2; 230 } 231 232 message GetDashboardSummaryResponse{ 233 // Summary for the dashboard. 234 DashboardSummary dashboard_summary = 1; 235 } 236 237 // Summary for a particular tab. 238 // Contains the info required to render tab summary in UI. 239 message TabSummary { 240 // The name of the dashboard this tab belongs to. 241 string dashboard_name = 1; 242 243 // The name of the tab. 244 string tab_name = 2; 245 246 // Overall status for the dashboard tab (e.g. PASSING, FAILING, etc.) 247 string overall_status = 3; 248 249 // Summary of the status for this dashboard tab. 250 string detailed_status_message = 4; 251 252 // Timestamp at which tests last ran. 253 google.protobuf.Timestamp last_run_timestamp = 5; 254 255 // Timestamp at which the test group was last updated. 256 google.protobuf.Timestamp last_update_timestamp = 6; 257 258 // The ID for the latest passing build. 259 string latest_passing_build = 7; 260 261 // Summarized info on the failing tests. 262 // In this case, any test which raised an alert and did not suppress it is considered failing. 263 FailuresSummary failures_summary = 8; 264 265 //Summarized info on the tab's healthiness. 266 HealthinessSummary healthiness_summary = 9; 267 } 268 269 // Summarized representation of data from failing test summaries. 270 // Will be rendered in failures summary component within tab summary. 271 message FailuresSummary { 272 273 // Top failing tests by fail count. 274 repeated FailingTestInfo top_failing_tests = 1; 275 276 // Aggregated stats across all failing tests. 277 FailureStats failure_stats = 2; 278 } 279 280 // Subset of data from FailingTestSummary defined in summary.proto. 281 message FailingTestInfo { 282 283 // Name of the failing test. 284 string display_name = 1; 285 286 // number of times the test has failed. 287 int32 fail_count = 2; 288 289 // Timestamp for the last cycle in which the test passed. 290 google.protobuf.Timestamp pass_timestamp = 3; 291 292 // Timestamp for the first cycle in which the test failed. 293 google.protobuf.Timestamp fail_timestamp = 4; 294 } 295 296 // Aggregate stats across all failing tests. 297 message FailureStats { 298 299 // Number of failing tests for the tab. 300 int32 num_failing_tests = 1; 301 } 302 303 // Summarized representation of data from tab's HealthinessInfo. 304 // Will be rendered in healthiness summary component within tab summary. 305 message HealthinessSummary { 306 307 // Top flaky tests (with flakiness > 0) by the current flakiness %. 308 repeated FlakyTestInfo top_flaky_tests = 1; 309 310 // Aggregated healthiness stats for the tab. 311 HealthinessStats healthiness_stats = 2; 312 } 313 314 // Subset of data from HealthinessInfo.TestInfo defined in summary.proto. 315 message FlakyTestInfo { 316 317 // Name of the flaky test. 318 string display_name = 1; 319 320 // The flakiness of the test, in % measured out of 100 321 float flakiness = 2; 322 323 // The change of flakiness based on the last interval's flakiness 324 // The interval is set by each tab's config, with a default of 7 days. 325 testgrid.summary.TestInfo.Trend change = 3; 326 } 327 328 // Aggregated healthiness stats across the tab. 329 message HealthinessStats { 330 331 // The start of the time frame that the analysis was run for. 332 google.protobuf.Timestamp start = 1; 333 334 // The end of the time frame that the analysis was run for. 335 google.protobuf.Timestamp end = 2; 336 337 // Number of flaky tests in the tab. 338 int32 num_flaky_tests = 3; 339 340 // Average flakiness for the current analysis interval. 341 float average_flakiness = 4; 342 343 // Average flakiness for the previous analysis interval. 344 float previous_flakiness = 5; 345 } 346 347 // Summary for a particular dashboard. 348 // Contains the info required to render dashboard summary in UI (done in the dashboard group view). 349 message DashboardSummary{ 350 351 // Name of the dashboard. 352 string name = 1; 353 354 // Overall status of the dashboard. 355 // Will be calculated based on the presence and importance of underlying tabs. 356 string overall_status = 2; 357 358 // Count of the tabs by status. 359 map<string, int32> tab_status_count = 3; 360 }