go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/bisection/proto/v1/common.proto (about)

     1  // Copyright 2023 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 luci.bisection.v1;
    18  
    19  import "google/protobuf/timestamp.proto";
    20  import "go.chromium.org/luci/buildbucket/proto/common.proto";
    21  
    22  option go_package = "go.chromium.org/luci/bisection/proto/v1;bisectionpb";
    23  
    24  // AnalysisStatus represents the result status of an analysis.
    25  enum AnalysisStatus {
    26    ANALYSIS_STATUS_UNSPECIFIED = 0;
    27    // The analysis has been created, but not yet started.
    28    // We don't have this status in code. It's here for backward-compatability.
    29    CREATED = 1;
    30    // The analysis is running, but results have not been finalised.
    31    RUNNING = 2;
    32    // The analysis has finished and found (and verified) the culprit.
    33    FOUND = 3;
    34    // The analysis has finished but no culprit/suspect has been found.
    35    NOTFOUND = 4;
    36    // The analysis resulted in an error.
    37    ERROR = 5;
    38    // The analysis found some suspects, either from heuristic or nth-section.
    39    SUSPECTFOUND = 6;
    40    // The analysis is unsupported (unsupported project, test...).
    41    UNSUPPORTED = 7;
    42    // The analysis was disabled (e.g. from config).
    43    DISABLED = 8;
    44    // This status is to mark for the case when an analysis was created,
    45    // but was not sent to bisector, because we couldn't get sufficient data
    46    // to proceed.
    47    // One example is if we cannot get the commit ID for the regression range
    48    // because the commit was too old.
    49    INSUFFICENTDATA = 9;
    50  }
    51  
    52  enum RerunStatus {
    53    RERUN_STATUS_UNSPECIFIED = 0;
    54    // The rerun is in progress.
    55    // It may be scheduled or started, but not finished yet.
    56    RERUN_STATUS_IN_PROGRESS = 1;
    57    // For compile failure, it means the rerun succeeded.
    58    // For deterministic test failure, it means that the primary test failure
    59    // got expected result.
    60    RERUN_STATUS_PASSED = 2;
    61    // For compile failure, it means the compile was unsuccessful.
    62    // For deterministic test failure, it means that the primary test failure
    63    // got unexpected result.
    64    RERUN_STATUS_FAILED = 3;
    65    // The rerun ended with infra failure.
    66    // It means we will not know which direction to continue the bisection.
    67    // This case usually mean that the bisection will not be able to
    68    // find culprit.
    69    RERUN_STATUS_INFRA_FAILED = 4;
    70    // The rerun was canceled.
    71    RERUN_STATUS_CANCELED = 5;
    72    // Only used for test failure rerun.
    73    // The rerun ended, but the primary test failure was not run.
    74    // It usually means that we won't be able to continue the bisection.
    75    RERUN_STATUS_TEST_SKIPPED = 6;
    76  }
    77  
    78  // RerunResult contains the result of one rerun.
    79  // It is for the bots to update result back to LUCI Bisection.
    80  message RerunResult {
    81    // Status of the rerun.
    82    RerunStatus rerun_status = 1;
    83    // Error message, in case of FAILED or INFRA_FAILED status.
    84    string error_message = 2;
    85  }
    86  
    87  // SingleRerun contains information about a single rerun.
    88  // The same bot may be reused for multiple rerun (to speed up compilation time).
    89  message SingleRerun {
    90    // Timestamp for the created time of the rerun.
    91    google.protobuf.Timestamp start_time = 1;
    92    // Timestamp for the last updated time of the rerun.
    93    google.protobuf.Timestamp last_updated_time = 2;
    94    // Timestamp for the end time of the rerun.
    95    google.protobuf.Timestamp end_time = 3;
    96    // Buildbucket ID of the rerun build.
    97    int64 bbid = 4;
    98    // Task ID of the rerun.
    99    string task_id = 5;
   100    // ID of the bot.
   101    string bot_id = 6;
   102    // Result of the rerun.
   103    RerunResult rerun_result = 7;
   104    // Gitiles commit to do the rerun with.
   105    buildbucket.v2.GitilesCommit commit = 8;
   106    // Index of the commit to rerun within the blamelist, if this is an
   107    // nth-section rerun. We need to use a string instead of an int here because
   108    // 0 is a possible valid value but would get lost due to the "omitempty" flag
   109    // in the generated proto.
   110    string index = 9;
   111    // Type of rerun: either "Culprit Verification" or "NthSection".
   112    string type = 10;
   113  }
   114  
   115  message SuspectVerificationDetails {
   116    // The status of the suspect verification.
   117    string status = 1;
   118    // The verification rerun build for the suspect commit.
   119    SingleRerun suspect_rerun = 2;
   120    // The verification rerun build for the parent commit of the suspect.
   121    SingleRerun parent_rerun = 3;
   122  }
   123  
   124  // Variant represents a way of running a test case.
   125  //
   126  // The same test case can be executed in different ways, for example on
   127  // different OS, GPUs, with different compile options or runtime flags.
   128  message Variant {
   129    // The definition of the variant. Each key-value pair represents a
   130    // parameter describing how the test was run (e.g. OS, GPU, etc.).
   131    map<string, string> def = 1;
   132  }
   133  
   134  // Represents a reference in a source control system.
   135  message SourceRef {
   136    // The source control system used.
   137    // Only gitiles is supported at this moment. If other systems need to be
   138    // supported in future (e.g. non-gitiles git, subversion, google storage
   139    // buckets), they can be added here
   140    oneof system {
   141      // A branch in gitiles repository.
   142      GitilesRef gitiles = 1;
   143    }
   144  }
   145  
   146  // Represents a branch in a gitiles repository.
   147  message GitilesRef {
   148    // The gitiles host, e.g. "chromium.googlesource.com".
   149    string host = 1;
   150  
   151    // The project on the gitiles host, e.g. "chromium/src".
   152    string project = 2;
   153  
   154    // Commit ref, e.g. "refs/heads/main" from which the commit was fetched.
   155    // Not the branch name, use "refs/heads/branch"
   156    string ref = 3;
   157  }
   158  
   159  // Represents dimensions requested to buildbucket.
   160  message Dimensions {
   161    // List of dimensions, ordered by key ascendingly.
   162    repeated Dimension dimensions = 1;
   163  }
   164  
   165  // Represent one dimension requested to buildbucket.
   166  message Dimension {
   167    // Key, e.g. "os".
   168    string key = 1;
   169    // Value, e.g. "Ubuntu".
   170    string value = 2;
   171  }
   172  
   173  // Status of a test result.
   174  // It is a mirror of luci.resultdb.v1.TestStatus, but the right to evolve
   175  // it independently is reserved.
   176  enum TestResultStatus {
   177    // Status was not specified.
   178    // Not to be used in actual test results; serves as a default value for an
   179    // unset field.
   180    TEST_RESULT_STATUS_UNSPECIFIED = 0;
   181  
   182    // The test case has passed.
   183    PASS = 1;
   184  
   185    // The test case has failed.
   186    // Suggests that the code under test is incorrect, but it is also possible
   187    // that the test is incorrect or it is a flake.
   188    FAIL = 2;
   189  
   190    // The test case has crashed during execution.
   191    // The outcome is inconclusive: the code under test might or might not be
   192    // correct, but the test+code is incorrect.
   193    CRASH = 3;
   194  
   195    // The test case has started, but was aborted before finishing.
   196    // A common reason: timeout.
   197    ABORT = 4;
   198  
   199    // The test case did not execute.
   200    // Examples:
   201    // - The execution of the collection of test cases, such as a test
   202    //   binary, was aborted prematurely and execution of some test cases was
   203    //   skipped.
   204    // - The test harness configuration specified that the test case MUST be
   205    //   skipped.
   206    SKIP = 5;
   207  }
   208  
   209  // AnalysisType specifies type of the analysis.
   210  enum AnalysisType {
   211    ANALYSIS_TYPE_UNSPECIFIED = 0;
   212    // Compile analysis type.
   213    COMPILE_FAILURE_ANALYSIS = 1;
   214    // Test analysis type.
   215    TEST_FAILURE_ANALYSIS = 2;
   216  }
   217  
   218  enum SuspectVerificationStatus {
   219    SUSPECT_VERIFICATION_STATUS_UNSPECIFIED = 0;
   220    UNVERIFIED = 1;
   221    VERIFICATION_SCHEDULED = 2;
   222    UNDER_VERIFICATION = 3;
   223    CONFIRMED_CULPRIT = 4;
   224    VINDICATED = 5;
   225    VERIFICATION_ERROR = 6;
   226    VERIFICATION_CANCELED = 7;
   227  }
   228  
   229  // Status of a test verdict.
   230  // It is a mirror of luci.resultdb.v1.TestVariantStatus.
   231  enum TestVerdictStatus {
   232    // a test verdict must not have this status.
   233    // This is only used when filtering verdicts.
   234    TEST_VERDICT_STATUS_UNSPECIFIED = 0;
   235    // The test verdict has no exonerations, and all results are unexpected.
   236    UNEXPECTED = 10;
   237    // The test verdict has no exonerations, and all results are unexpectedly skipped.
   238    UNEXPECTEDLY_SKIPPED = 20;
   239    // The test verdict has no exonerations, and has both expected and unexpected
   240    // results.
   241    FLAKY = 30;
   242    // The test verdict has one or more test exonerations.
   243    EXONERATED = 40;
   244    // The test verdict has no exonerations, and all results are expected.
   245    EXPECTED = 50;
   246  }