go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/resultdb/proto/bq/text_artifact_row.proto (about) 1 // Copyright 2024 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 21 option go_package = "go.chromium.org/luci/resultdb/proto/bq;resultpb"; 22 23 // TextArtifactRow represents a row in a BigQuery table `luci-resultdb.internal.text_artifacts`. 24 message TextArtifactRow { 25 // The LUCI project that the artifact belongs to (e.g. chromium). 26 string project = 1; 27 28 // The LUCI Realm the the artifact exists under. 29 // Only contain the sub-realm (e.g. "try", instead of "chromium:try). 30 // The project is stored in the project field. 31 string realm = 2; 32 33 // The invocation ID of the parent invocation. 34 string invocation_id = 3; 35 36 // The test that the artifact belongs to. 37 // It will be empty if the artifact is an invocation-level artifact. 38 string test_id = 4; 39 40 // The result that the artifact belongs to. 41 // It will be empty if the artifact is an invocation-level artifact. 42 string result_id = 5; 43 44 // Id of the artifact. 45 // Refer to luci.resultdb.v1.Artifact.artifact_id for details. 46 string artifact_id = 6; 47 48 // The number of shards needed to store this artifact. 49 int32 num_shards = 7; 50 51 // Id of the artifact shard. 52 // Row size limit is 10MB according to 53 // https://cloud.google.com/bigquery/quotas#write-api-limits. 54 // The content itself will have a smaller limit because we will 55 // have other data in the row and overhead. 56 // If the size of the artifact content is larger than the limit, the data will be 57 // sharded. 58 // 59 // When sharding, we try to keep the content size as close to the 60 // limit as possible, but we will also prefer sharding at line-break 61 // or white-space characters if such characters exist near the sharding 62 // position (within 1KB). Sharding will never break a multi-byte Unicode 63 // character. 64 // 65 // shard_id is monotonically increasing and starts at 0. 66 int32 shard_id = 8; 67 68 // Optional. Content type of the artifact (e.g. text/plain). 69 string content_type = 9; 70 71 // Artifact shard content. 72 // Encoded as UTF-8. 73 string content = 10; 74 75 // Size of the artifact content in bytes. 76 // This is the sum of shard_content_size of all shards of the artifact. 77 int32 artifact_content_size = 11; 78 79 // Size of the shard content in bytes. 80 int32 shard_content_size = 12; 81 82 // Partition_time is used to partition the table. 83 // It is the time when the exported invocation was created in Spanner. 84 // It is NOT the time when the row is inserted into BigQuery table. 85 google.protobuf.Timestamp partition_time = 13; 86 87 // String of the format <artifact_id>:<shard_id>. 88 // This is for the purpose of clustering. 89 string artifact_shard = 14; 90 } 91