| // Copyright 2021 The LUCI Authors. |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| syntax = "proto3"; |
| |
| package cv.internal.changelist; |
| |
| option go_package = "go.chromium.org/luci/cv/internal/changelist;changelist"; |
| |
| import "google/protobuf/timestamp.proto"; |
| |
| import "go.chromium.org/luci/cv/internal/changelist/storage.proto"; |
| |
| // UpdateCLTask is for updating a single CL. |
| // |
| // Queue: "update-cl". |
| message UpdateCLTask { |
| reserved 9; // CANCEL_CL_TRIGGER |
| string luci_project = 1; |
| |
| // At least one of internal or external ID must be given. |
| int64 id = 2; // internal CLID |
| string external_id = 3; |
| |
| reserved 4; // updated_hint |
| |
| enum Requester { |
| REQUESTER_CLASS_UNSPECIFIED = 0; |
| INCR_POLL_MATCHED = 1; |
| FULL_POLL_MATCHED = 2; |
| FULL_POLL_UNMATCHED = 3; |
| PUBSUB_POLL = 4; |
| CL_PURGER = 5; |
| DEP_CL_TRIGGERER = 12; |
| RPC_ADMIN = 6; |
| RUN_POKE = 7; |
| RUN_REMOVAL = 8; |
| RESET_CL_TRIGGER = 11; |
| UPDATE_CONFIG = 10; |
| } |
| // Requester identifies various scenarios that enqueue UpdateCLTask(s). |
| // |
| // This is used to track UpdateCLTask(s) by the requester for monitoring |
| // purposes. |
| Requester requester = 5; |
| // True if the UpdateCLTask was enqueued to resolve a dependency. |
| bool is_for_dep = 6; |
| |
| message Hint { |
| // The external update time of the Snapshot to fetch. |
| google.protobuf.Timestamp external_update_time = 1; |
| // The meta rev ID of the Snapshot to fetch. |
| string meta_rev_id = 2; |
| } |
| |
| // Hint provides various hints for the snapshot to be fetched. |
| Hint hint = 7; |
| } |
| |
| // BatchUpdateCLTask is for updating many CLs. |
| // |
| // When executed, it just enqueues its tasks as individual UpdateCLTask TQ |
| // for independent execution. |
| // |
| // Queue: "update-cl". |
| message BatchUpdateCLTask { |
| repeated UpdateCLTask tasks = 1; |
| } |
| |
| // BatchOnCLUpdatedTask notifies many Projects and Runs about updated CLs. |
| // |
| // Queue: "notify-on-cl-updated". |
| message BatchOnCLUpdatedTask { |
| map<string, CLUpdatedEvents> projects = 1; |
| map<string, CLUpdatedEvents> runs = 2; |
| } |