go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/resultdb/proto/bq/artifact_row.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 luci.resultdb.bq;
    18  
    19  import "google/protobuf/timestamp.proto";
    20  import "go.chromium.org/luci/resultdb/proto/bq/common.proto";
    21  
    22  option go_package = "go.chromium.org/luci/resultdb/proto/bq;resultpb";
    23  
    24  // This proto is deprecated. This is used in the old BigQuery artifact export.
    25  // The reason we have not deleted it yet is that there still seems to be some tasks
    26  // running this exporter, so we need to check and verify those tasks.
    27  // TextArtifactRowLegacy represents a row in a BigQuery table for a text artifact.
    28  message TextArtifactRowLegacy {
    29    // Exported contains info of the exported invocation.
    30    //
    31    // Note: it's possible that this invocation is not the artifact's
    32    // immediate parent invocation, but the including invocation.
    33    // For example if the BigQuery table is for all artifacts of Chromium CI
    34    // builds, then the exported invocation is for a CI build, which includes
    35    // multiple invocations for swarming tasks within that build.
    36    InvocationRecord exported = 1;
    37  
    38    // Parent contains info of the artifact's immediate parent invocation.
    39    InvocationRecord parent = 2;
    40  
    41    // Test_id and result_id can identify the test result in the invocation
    42    // this artifact belongs to.
    43    // They will be empty if the artifact is an invocation-level artifact.
    44    string test_id = 3;
    45    string result_id = 4;
    46  
    47    // Id of the artifact.
    48    // Regex: ^[[:word:]]([[:print:]]{0,254}[[:word:]])?$
    49    //
    50    // Refer to luci.resultdb.v1.Artifact.artifact_id for details.
    51    string artifact_id = 5;
    52  
    53    // Id of the artifact shard.
    54    // Row size limit is 5MB according to
    55    // https://cloud.google.com/bigquery/quotas#streaming_inserts
    56    // If the size of the artifact content is larger than that, the data will be
    57    // sharded at the nearest previous line break ("\r\n" first, if not exist
    58    // then "\n" or "\r").
    59    // Shard_id is monotonically increasing and starts at 0.
    60    int32 shard_id = 6;
    61  
    62    // Artifact shard content.
    63    // Encoded as UTF-8. Invalid characters are replaced with the replacement
    64    // character (U+FFFD).
    65    string content = 7;
    66  
    67    // Partition_time is used to partition the table.
    68    // It is the time when exported invocation was created in Spanner.
    69    // Note: it is NOT the time when the row is inserted into BigQuery table.
    70    // https://cloud.google.com/bigquery/docs/creating-column-partitions#limitations
    71    // mentions "The partitioning column must be a top-level field."
    72    // So we keep this column here instead of adding the CreateTime to Invocation.
    73    google.protobuf.Timestamp partition_time = 8;
    74  }