go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/cv/internal/tryjob/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.tryjob; 18 19 option go_package = "go.chromium.org/luci/cv/internal/tryjob;tryjob"; 20 21 // UpdateTryjobTask checks the status of a Tryjob and updates and saves the 22 // Datastore entity, and notifies Runs which care about this Tryjob. 23 // 24 // It does NOT involve deciding next actions to take based on changes in Tryjob 25 // state; e.g. it doesn't involve triggering retries or ending the Run; the 26 // Tryjob Executor is responsible for this, see also ExecuteTryjobsPayload. 27 // 28 // Queue: "tryjob-update". 29 message UpdateTryjobTask { 30 // id is the Tryjob entity datastore ID. Internal to CV. 31 int64 id = 1; 32 33 // external_id is the ID that identifies the Tryjob in the backend. 34 // e.g. in the case of Buildbucket, it's the build ID. 35 string external_id = 2; 36 } 37 38 // CancelStaleTryjobs cancels all Tryjobs that are intended to verify the given 39 // CL, that are now stale because a new non-trivial patchset has been uploaded. 40 // 41 // Queue: "cancel-stale-tryjobs" 42 message CancelStaleTryjobsTask { 43 // clid is the ID that identifies a CL entity. Internal to CV. 44 int64 clid = 1; 45 46 // previous_min_equiv_patchset is the patchset that stale tryjobs will be 47 // running at. 48 int32 previous_min_equiv_patchset = 2; 49 50 // current_min_equiv_patchset is the patchset at or after which the 51 // associated Tryjobs are no longer considered stale. 52 int32 current_min_equiv_patchset = 3; 53 } 54 55 // ExecuteTryjobsPayload is the payload of the long-op task that invokes 56 // the Tryjob Executor. 57 // 58 // The payload contains the event happens outside so that Tryjob Executor could 59 // react on the event. 60 // 61 // Exactly one event should be provided. Not using oneof for the sake of 62 // simplicity. 63 message ExecuteTryjobsPayload { 64 // RequirementChanged indicates the Tryjob Requirement of the Run has 65 // changed. 66 bool requirement_changed = 1; 67 // TryjobsUpdated contains IDs of all Tryjobs that have status updates. 68 repeated int64 tryjobs_updated = 2; 69 } 70 71 // ExecuteTryjobsResult is the result of Tryjob executor. 72 message ExecuteTryjobsResult { 73 // TODO(yiwzhang): define 74 }