go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/analysis/internal/tasks/taskspb/tasks.proto (about)

     1  // Copyright 2022 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.analysis.internal.tasks;
    18  
    19  import "google/protobuf/timestamp.proto";
    20  import "go.chromium.org/luci/analysis/internal/ingestion/control/proto/control.proto";
    21  
    22  option go_package = "go.chromium.org/luci/analysis/internal/tasks/taskspb";
    23  
    24  // Payload of IngestTestResults task.
    25  message IngestTestResults {
    26    reserved 1, 2, 4 to 7;
    27  
    28    // Timestamp representing the start of the data retention period
    29    // for the ingested test results. In case of multiple builds
    30    // ingested for one CV run, the partition_time used for all
    31    // builds must be the same.
    32    google.protobuf.Timestamp partition_time = 3;
    33  
    34    // The build that is being ingested.
    35    luci.analysis.internal.ingestion.control.BuildResult build = 8;
    36  
    37    // Context about the presubmit run the build was a part of. Only
    38    // populated if the build is a presubmit run.
    39    luci.analysis.internal.ingestion.control.PresubmitResult presubmit_run = 9;
    40  
    41    // The page token value to use when calling QueryTestVariants.
    42    // For the first task, this should be "". For subsequent tasks,
    43    // this is the next_page_token value returned by the last call.
    44    string page_token = 10;
    45  
    46    // The task number of test results task. 0 for the first
    47    // task, 1 for the second task, and so on. Used to avoid creating
    48    // duplicate tasks.
    49    int64 task_index = 11;
    50  }
    51  
    52  
    53  // Payload of the ReclusterChunks task.
    54  message ReclusterChunks {
    55    // The number of the reclustering shard being processed by this task.
    56    // A shard corresponds to a project + Chunk ID keyspace fraction that
    57    // is being re-clustered.
    58    // Shards are numbered sequentially, starting at one.
    59    int64 shard_number = 6;
    60  
    61    // The LUCI Project containing test results to be re-clustered.
    62    string project = 1;
    63  
    64    // The attempt time for which this task is. This should be cross-referenced
    65    // with the ReclusteringRuns table to identify the reclustering parameters.
    66    // This is also the soft deadline for the task.
    67    google.protobuf.Timestamp attempt_time = 2;
    68  
    69    // The exclusive lower bound defining the range of Chunk IDs to
    70    // be re-clustered. To define the table start, use the empty string ("").
    71    string start_chunk_id = 3;
    72  
    73    // The inclusive upper bound defining the range of Chunk IDs to
    74    // be re-clustered. To define the table end use "ff" x 16, i.e.
    75    // "ffffffffffffffffffffffffffffffff".
    76    string end_chunk_id = 4;
    77  
    78    // The version of algorithms to re-cluster to. If the worker executing the
    79    // task is not running at least this version of algorithms, it is an error.
    80    int64 algorithms_version = 7;
    81  
    82    // The version of rules to recluster to.
    83    google.protobuf.Timestamp rules_version = 8;
    84  
    85    // The version of project configuration to recluster to.
    86    google.protobuf.Timestamp config_version = 9;
    87  
    88    // State to be passed from one execution of the task to the next.
    89    // To fit with autoscaling, each task aims to execute only for a short time
    90    // before enqueuing another task to act as its continuation.
    91    // Must be populated on all tasks, even on the initial task.
    92    ReclusterChunkState state = 5;
    93  }
    94  
    95  // ReclusterChunkState captures state passed from one execution of a
    96  // ReclusterChunks task to the next.
    97  message ReclusterChunkState {
    98    // The exclusive lower bound of Chunk IDs processed to date.
    99    string current_chunk_id = 1;
   100  
   101    // The next time a progress report should be made.
   102    google.protobuf.Timestamp next_report_due = 2;
   103  }
   104  
   105  // Payload of the JoinBuild task.
   106  message JoinBuild {
   107    // Buildbucket build ID, unique per Buildbucket instance.
   108    int64 id = 1;
   109  
   110    // Buildbucket host, e.g. "cr-buildbucket.appspot.com".
   111    string host = 2;
   112  
   113    // The LUCI Project to which the build belongs.
   114    string project = 3;
   115  }
   116  
   117  // Payload of the UpdateBugs task. Prior to running this task,
   118  // the cluster_summaries table should have been updated from the
   119  // contents of the clustered_failures table.
   120  message UpdateBugs {
   121    // The LUCI Project to update bugs for.
   122    string project = 1;
   123  
   124    // The reclustering attempt minute that reflects the reclustering
   125    // state of the failures summarized by the cluster_summaries table.
   126    //
   127    // Explanation:
   128    // Bug management relies upon knowing when reclustering
   129    // is ongoing for rules and algorithms to inhibit erroneous bug updates
   130    // for those rules / algorithms as cluster metrics may be invalid.
   131    //
   132    // The re-clustering progress tracked in ReclusteringRuns table tracks
   133    // the progress applying re-clustering to the clustered_failures
   134    // table (not the cluster_summaries table).
   135    // As there is a delay between when clustered_failures table
   136    // is updated and when cluster_summaries is updated, we cannot
   137    // use the latest reclustering run but need to read the run
   138    // that was current when the clustered_failures table was
   139    // summarized into the cluster_summaries table.
   140    //
   141    // This will be the run that was current when the BigQuery
   142    // job to recompute cluster_summaries table from the
   143    // clustered_failures table started.
   144    google.protobuf.Timestamp reclustering_attempt_minute = 2;
   145  
   146    // The time the task should be completed by to avoid overruning
   147    // the next bug update task.
   148    google.protobuf.Timestamp deadline = 3;
   149  }