go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/buildbucket/proto/task.proto (about) 1 // Copyright 2021 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto3"; 16 17 package buildbucket.v2; 18 19 import "google/protobuf/struct.proto"; 20 import "go.chromium.org/luci/buildbucket/proto/common.proto"; 21 import "go.chromium.org/luci/buildbucket/proto/field_option.proto"; 22 23 option go_package = "go.chromium.org/luci/buildbucket/proto;buildbucketpb"; 24 25 // A backend task. 26 // Next id: 9. 27 message Task { 28 TaskID id = 1; 29 30 // (optional) Human-clickable link to the status page for this task. 31 // This should be populated as part of the Task response in RunTaskResponse. 32 // Any update to this via the Task field in BuildTaskUpdate will override the 33 // existing link that was provided in RunTaskResponse. 34 string link = 2; 35 36 // The backend's status for handling this task. 37 Status status = 3; 38 39 // The 'status_details' around handling this task. 40 StatusDetails status_details = 4; 41 42 // Deprecated. Use summary_markdown instead. 43 string summary_html = 5; 44 45 // Additional backend-specific details about the task. 46 // 47 // This could be used to indicate things like named-cache status, task 48 // startup/end time, etc. 49 // 50 // This is limited to 10KB (binary PB + gzip(5)) 51 // 52 // This should be populated as part of the Task response in RunTaskResponse. 53 // Any update to this via the Task field in BuildTaskUpdate will override the 54 // existing details that were provided in RunTaskResponse. 55 google.protobuf.Struct details = 6; 56 57 // A monotonically increasing integer set by the backend to track 58 // which task is the most up to date when calling UpdateBuildTask. 59 // When the build is first created, this will be set to 0. 60 // When RunTask is called and returns a task, this should not be 0 or nil. 61 // Each UpdateBuildTask call will check this to ensure the latest task is 62 // being stored in datastore. 63 int64 update_id = 7; 64 65 // Human-readable commentary around the handling of this task. 66 string summary_markdown = 8; 67 } 68 69 // A unique identifier for tasks. 70 message TaskID { 71 // Target backend. e.g. "swarming://chromium-swarm". 72 string target = 1 [ 73 (buildbucket.v2.create_build_field_option).field_behavior = REQUIRED 74 ]; 75 76 // An ID unique to the target used to identify this task. e.g. Swarming task 77 // ID. 78 string id = 2; 79 } 80 81 // A message sent by task backends as part of the payload to a 82 // pubsub topic corresponding with that backend. Buildbucket handles these 83 // pubsub messages with the UpdateBuildTask cloud task. 84 // Backends must use this proto when sending pubsub updates to buildbucket. 85 // 86 // NOTE: If the task has not been registered with buildbucket yet (by means of 87 // RunTask returning or StartBuild doing an initial associaton of the task to 88 // the build), then the message will be dropped and lost forever. 89 // Use with caution. 90 message BuildTaskUpdate { 91 // A build ID. 92 string build_id = 1; 93 94 // Task 95 Task task = 2; 96 }