go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/bisection/proto/v1/botupdates.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 "go.chromium.org/luci/bisection/proto/v1/common.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  // BotUpdates service contains APIs called from bots, used to update
    25  // the progress on an analysis.
    26  service BotUpdates {
    27    // RPC called from bots to update the compile analysis progress.
    28    rpc UpdateAnalysisProgress(UpdateAnalysisProgressRequest)
    29        returns (UpdateAnalysisProgressResponse);
    30    // RPC called from bots to update test analysis progress.
    31    rpc UpdateTestAnalysisProgress(UpdateTestAnalysisProgressRequest)
    32        returns (UpdateTestAnalysisProgressResponse);
    33  }
    34  
    35  // RPC called from bots to update the analysis progress.
    36  message UpdateAnalysisProgressRequest {
    37    // The analysis that the bot ran.
    38    int64 analysis_id = 1;
    39    // Bot ID.
    40    string bot_id = 2;
    41    // BuildbucketID of the rerun build.
    42    // We use this to determine which rerun build to map back.
    43    int64 bbid = 3;
    44    // The revision that the bot ran.
    45    buildbucket.v2.GitilesCommit gitiles_commit = 4;
    46    // Result of the rerun.
    47    luci.bisection.v1.RerunResult rerun_result = 5;
    48  }
    49  
    50  message UpdateAnalysisProgressResponse {
    51    // The next revision for the bot to run.
    52    // This is because we can compile faster when the same bot runs
    53    // multiple revisions.
    54    // If this is not set, then there is no further revision to run.
    55    // The bot can finish and be released.
    56    buildbucket.v2.GitilesCommit next_revision_to_run = 1;
    57  }
    58  
    59  message UpdateTestAnalysisProgressRequest {
    60    // BuildbucketID of the rerun build.
    61    int64 bbid = 1;
    62    // Bot ID.
    63    string bot_id = 2;
    64    // Contains the results of the tests that were run in the rerun.
    65    // Only the results of the requested tests (in tests_to_run properties of the recipe)
    66    // will be included. The non-requested test results will not be included.
    67    repeated TestResult results = 3;
    68    // Indicate whether the recipe has finished running tests and is sending back test results.
    69    // This flag does not care about the test results, it only care about the tests
    70    // were run and the test results being sent to LUCI Bisection.
    71    // In cases of infra failure, or something went wrong (e.g. compile failure),
    72    // tests may not get run. In such cases, this should be set to false.
    73    // When this is set to false, LUCI Bisection will mark the rerun as INFRA_FAILURE.
    74    bool run_succeeded = 4;
    75  }
    76  
    77  message TestResult {
    78    // Test ID of the test.
    79    string test_id = 1;
    80    // Variant hash of the test.
    81    string variant_hash = 2;
    82    // Whether the result is expected or not.
    83    bool is_expected = 3;
    84    // ResultDB status, e.g. PASSED, FAILED...
    85    TestResultStatus status = 4;
    86  }
    87  
    88  message UpdateTestAnalysisProgressResponse {
    89    // Nothing here for the moment.
    90  }