blob: 442bb2b821187b9c93179df075a85eb34cd551ca [file] [log] [blame]
// 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.tryjob;
option go_package = "go.chromium.org/luci/cv/internal/tryjob;tryjob";
// UpdateTryjobTask checks the status of a Tryjob and updates and saves the
// Datastore entity, and notifies Runs which care about this Tryjob.
//
// It does NOT involve deciding next actions to take based on changes in Tryjob
// state; e.g. it doesn't involve triggering retries or ending the Run; the
// Tryjob Executor is responsible for this, see also ExecuteTryjobsPayload.
//
// Queue: "tryjob-update".
message UpdateTryjobTask {
// id is the Tryjob entity datastore ID. Internal to CV.
int64 id = 1;
// external_id is the ID that identifies the Tryjob in the backend.
// e.g. in the case of Buildbucket, it's the build ID.
string external_id = 2;
}
// CancelStaleTryjobs cancels all Tryjobs that are intended to verify the given
// CL, that are now stale because a new non-trivial patchset has been uploaded.
//
// Queue: "cancel-stale-tryjobs"
message CancelStaleTryjobsTask {
// clid is the ID that identifies a CL entity. Internal to CV.
int64 clid = 1;
// previous_min_equiv_patchset is the patchset that stale tryjobs will be
// running at.
int32 previous_min_equiv_patchset = 2;
// current_min_equiv_patchset is the patchset at or after which the
// associated Tryjobs are no longer considered stale.
int32 current_min_equiv_patchset = 3;
}
// ExecuteTryjobsPayload is the payload of the long-op task that invokes
// the Tryjob Executor.
//
// The payload contains the event happens outside so that Tryjob Executor could
// react on the event.
//
// Exactly one event should be provided. Not using oneof for the sake of
// simplicity.
message ExecuteTryjobsPayload {
// RequirementChanged indicates the Tryjob Requirement of the Run has
// changed.
bool requirement_changed = 1;
// TryjobsUpdated contains IDs of all Tryjobs that have status updates.
repeated int64 tryjobs_updated = 2;
}
// ExecuteTryjobsResult is the result of Tryjob executor.
message ExecuteTryjobsResult {
// TODO(yiwzhang): define
}