go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/cv/internal/changelist/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 cv.internal.changelist; 18 19 option go_package = "go.chromium.org/luci/cv/internal/changelist;changelist"; 20 21 import "google/protobuf/timestamp.proto"; 22 23 import "go.chromium.org/luci/cv/internal/changelist/storage.proto"; 24 25 // UpdateCLTask is for updating a single CL. 26 // 27 // Queue: "update-cl". 28 message UpdateCLTask { 29 reserved 9; // CANCEL_CL_TRIGGER 30 string luci_project = 1; 31 32 // At least one of internal or external ID must be given. 33 int64 id = 2; // internal CLID 34 string external_id = 3; 35 36 reserved 4; // updated_hint 37 38 enum Requester { 39 REQUESTER_CLASS_UNSPECIFIED = 0; 40 INCR_POLL_MATCHED = 1; 41 FULL_POLL_MATCHED = 2; 42 FULL_POLL_UNMATCHED = 3; 43 PUBSUB_POLL = 4; 44 CL_PURGER = 5; 45 DEP_CL_TRIGGERER = 12; 46 RPC_ADMIN = 6; 47 RUN_POKE = 7; 48 RUN_REMOVAL = 8; 49 RESET_CL_TRIGGER = 11; 50 UPDATE_CONFIG = 10; 51 } 52 // Requester identifies various scenarios that enqueue UpdateCLTask(s). 53 // 54 // This is used to track UpdateCLTask(s) by the requester for monitoring 55 // purposes. 56 Requester requester = 5; 57 // True if the UpdateCLTask was enqueued to resolve a dependency. 58 bool is_for_dep = 6; 59 60 message Hint { 61 // The external update time of the Snapshot to fetch. 62 google.protobuf.Timestamp external_update_time = 1; 63 // The meta rev ID of the Snapshot to fetch. 64 string meta_rev_id = 2; 65 } 66 67 // Hint provides various hints for the snapshot to be fetched. 68 Hint hint = 7; 69 } 70 71 // BatchUpdateCLTask is for updating many CLs. 72 // 73 // When executed, it just enqueues its tasks as individual UpdateCLTask TQ 74 // for independent execution. 75 // 76 // Queue: "update-cl". 77 message BatchUpdateCLTask { 78 repeated UpdateCLTask tasks = 1; 79 } 80 81 // BatchOnCLUpdatedTask notifies many Projects and Runs about updated CLs. 82 // 83 // Queue: "notify-on-cl-updated". 84 message BatchOnCLUpdatedTask { 85 map<string, CLUpdatedEvents> projects = 1; 86 map<string, CLUpdatedEvents> runs = 2; 87 }