go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/cv/api/v1/run.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.v1;
    18  
    19  option go_package = "go.chromium.org/luci/cv/api/v1;cvpb";
    20  
    21  // Run includes the high-level information about a CV Run.
    22  message Run {
    23    // Next tag: 4.
    24  
    25    // Status describes the status of a CV Run.
    26    enum Status {
    27      // Unspecified status.
    28      STATUS_UNSPECIFIED = 0;
    29      // Run has not started yet.
    30      //
    31      // It is either because Run Manager hasn't processed the StartEvent yet or
    32      // the RunOwner has exhausted all the quota and waiting for new quota to be
    33      // available.
    34      PENDING = 1;
    35      // Run is running.
    36      RUNNING = 2;
    37      // Run is waiting for submission.
    38      //
    39      // Run is in this status if one of the following scenarios is true:
    40      //   1. Tree is closed at the time Run attempts to submit.
    41      //   2. There is another Run in the same LUCI Project that is currently
    42      //      submitting.
    43      //   3. The submission is rate-limited according to the submit option in
    44      //      Project Config.
    45      //
    46      // This status is cancellable.
    47      WAITING_FOR_SUBMISSION = 4;
    48      // Run is submitting.
    49      //
    50      // A Run can't be cancelled while submitting. A Run may transition from
    51      // this status to either `WAITING_FOR_SUBMISSION` status or a non-cancelled
    52      // terminal status.
    53      SUBMITTING = 5;
    54  
    55      // End of non-terminal status; MUST have value less than `ENDED_MASK`.
    56  
    57      /////////////////////////////////////////////////////////////////////////////
    58      // Terminal Status
    59  
    60      // ENDED_MASK can be used as a bitmask to check if a Run has ended.
    61      // This MUST NOT be used as the status of a Run.
    62      ENDED_MASK = 64;
    63      // Run ends successfully.
    64      SUCCEEDED = 65;
    65      // Run ends unsuccessfully.
    66      FAILED = 66;
    67      // Run is cancelled.
    68      CANCELLED = 67;
    69    }
    70  
    71    // ID of the Run.
    72    //
    73    // The format of an ID is "projects/$luci-project/runs/$id", where
    74    // - luci-project is the name of the LUCI project the Run belongs to
    75    // - id is an opaque key unique in the LUCI project.
    76    string id = 1;
    77    // Status of the Run.
    78    Status status = 2;
    79    // eversion is the entity version, which is monotonically increasing.
    80    int64 eversion = 3;
    81  }