go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/cv/internal/gerrit/poller/storage.proto (about)

     1  // Copyright 2020 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.gerrit.poller;
    18  
    19  option go_package = "go.chromium.org/luci/cv/internal/gerrit/poller;poller";
    20  
    21  import "google/protobuf/timestamp.proto";
    22  
    23  // QueryState represents execution of a single Gerrit query over time.
    24  //
    25  // Exactly one of (or_projects, common_project_prefix) must be specified.
    26  // Not using oneof to avoid wrapping or_projects in a message as oneof doesn't
    27  // support repeated fields.
    28  message QueryState {
    29    // Host is Gerrit host.
    30    string host = 1;
    31    // Enumerated Gerrit projects, e.g. ["infra/infra", "infra/luci/luci-go"].
    32    repeated string or_projects = 2;
    33    // Common Gerrit project prefix, e.g. "chromiumos/".
    34    string common_project_prefix = 3;
    35  
    36    // When the last full poll was started.
    37    google.protobuf.Timestamp last_full_time = 11;
    38    // When the last incremental poll was started.
    39    google.protobuf.Timestamp last_incr_time = 12;
    40  
    41    // Changes are changes which were last observed by the query execution.
    42    //
    43    // These are not CL IDs, but Gerrit change numbers.
    44    //
    45    // The full poll resets these.
    46    // The incremental poll adds newly discovered CLs.
    47    //
    48    // Sorted.
    49    repeated int64 changes = 13;
    50  }
    51  
    52  // QueryStates exists to reference several QueryStates as a single property in a
    53  // Datastore entity.
    54  message QueryStates {
    55    repeated QueryState states = 1;
    56  }