go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/cv/internal/run/eventpb/submission.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.run.eventpb;
    18  
    19  option go_package = "go.chromium.org/luci/cv/internal/run/eventpb;eventpb";
    20  
    21  import "google/protobuf/timestamp.proto";
    22  
    23  
    24  message SubmissionCompleted {
    25    // Result of this submission.
    26    SubmissionResult result = 1;
    27    google.protobuf.Timestamp queue_release_timestamp = 5;
    28  
    29    message CLSubmissionFailure {
    30      int64 clid = 1; // Required
    31      string message = 2; // Required
    32    }
    33  
    34    message CLSubmissionFailures {
    35      repeated CLSubmissionFailure failures = 1;
    36    }
    37  
    38    oneof failure_reason {
    39      // Submission deadline is exceeded. Must be permanent failure.
    40      bool timeout = 3;
    41      // CLs that fail to submit. Could be transient or permanent.
    42      //
    43      // As of June 2021, CLs are submitted serially and submitter returns
    44      // immediately upon failure so `cl_failures` will have only one entry.
    45      // However, submitter may report multiple CL submission failures in the
    46      // future (e.g. CV supports parallel CL submission or CV submits a CL
    47      // stack in one RPC).
    48      CLSubmissionFailures cl_failures = 4;
    49    }
    50  }
    51  
    52  enum SubmissionResult {
    53    SUBMISSION_RESULT_UNSPECIFIED = 0;
    54    // All CLs have been submitted successfully.
    55    SUCCEEDED = 1;
    56    // Encountered transient failure.
    57    //
    58    // RM should retry if the deadline hasn't been exceeded.
    59    FAILED_TRANSIENT = 2;
    60    // Encountered permanent failure.
    61    //
    62    // For example, lack of submit permission or experienced merge conflict.
    63    FAILED_PERMANENT = 3;
    64  }