[resultdb] Update luci-go proto to match the latest in resultdb.
I noticed that resultdb has added test_metadata.proto in https://crrev.com/c/2472852
and I'd like to update our copy to match the latest version.
Bug: 62282
Change-Id: I717a32d6034b00ba2f5dbc333905035050757dec
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/luci-go/+/453614
Reviewed-by: Marc-Antoine Ruel <maruel@google.com>
diff --git a/resultdb/proto/v1/BUILD.gn b/resultdb/proto/v1/BUILD.gn
index e72596d..7caf709 100644
--- a/resultdb/proto/v1/BUILD.gn
+++ b/resultdb/proto/v1/BUILD.gn
@@ -7,6 +7,7 @@
_protos = [
"common",
+ "test_metadata",
"test_result",
]
diff --git a/resultdb/proto/v1/test_metadata.proto b/resultdb/proto/v1/test_metadata.proto
new file mode 100644
index 0000000..9018588
--- /dev/null
+++ b/resultdb/proto/v1/test_metadata.proto
@@ -0,0 +1,50 @@
+// Copyright 2020 The LUCI Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package luci.resultdb.v1;
+
+option go_package = "go.chromium.org/luci/resultdb/proto/v1;resultpb";
+
+// Information about a test.
+message TestMetadata {
+ // The original test name.
+ string name = 1;
+
+ // Where the test is defined, e.g. the file name.
+ // location.repo MUST be specified.
+ TestLocation location = 2;
+}
+
+// Location of the test definition.
+message TestLocation {
+ // Gitiles URL as the identifier for a repo.
+ // Format for Gitiles URL: https://<host>/<project>
+ // For example "https://chromium.googlesource.com/chromium/src"
+ // Must not end with ".git".
+ // SHOULD be specified.
+ string repo = 1;
+
+ // Name of the file where the test is defined.
+ // For files in a repository, must start with "//"
+ // Example: "//components/payments/core/payment_request_data_util_unittest.cc"
+ // Max length: 512.
+ // MUST not use backslashes.
+ // Required.
+ string file_name = 2;
+
+ // One-based line number where the test is defined.
+ int32 line = 3;
+}
diff --git a/resultdb/proto/v1/test_result.proto b/resultdb/proto/v1/test_result.proto
index edcbcb5..e32009a 100644
--- a/resultdb/proto/v1/test_result.proto
+++ b/resultdb/proto/v1/test_result.proto
@@ -20,6 +20,7 @@
import "google/protobuf/timestamp.proto";
import "resultdb/proto/v1/common.proto";
+import "resultdb/proto/v1/test_metadata.proto";
option go_package = "go.chromium.org/luci/resultdb/proto/v1;resultpb";
@@ -102,26 +103,15 @@
repeated StringPair tags = 10;
// Where the test is defined, e.g. the file name.
+ // Deprecated. In favor of test_metadata.
TestLocation test_location = 11;
// Hash of the variant.
// hex(sha256(sorted(''.join('%s:%s\n' for k, v in variant.items())))).
string variant_hash = 12;
-}
-// Location of the test definition.
-message TestLocation {
- reserved 1; // We might want to add repo URL later.
-
- // Name of the file where the test is defined.
- // For files in a repository, must start with "//"
- // Example: "//components/payments/core/payment_request_data_util_unittest.cc"
- // Max length: 512.
- // SHOULD not use backslashes.
- string file_name = 2;
-
- // One-based line number where the test is defined.
- int32 line = 3;
+ // Information about the test at the time of its execution.
+ TestMetadata test_metadata = 13;
}
// Machine-readable status of a test result.
diff --git a/resultdb/sink/proto/v1/test_result.proto b/resultdb/sink/proto/v1/test_result.proto
index 9e1e22b..10ef1ac 100644
--- a/resultdb/sink/proto/v1/test_result.proto
+++ b/resultdb/sink/proto/v1/test_result.proto
@@ -21,6 +21,7 @@
import "google/protobuf/timestamp.proto";
import "resultdb/proto/v1/common.proto";
+import "resultdb/proto/v1/test_metadata.proto";
import "resultdb/proto/v1/test_result.proto";
option go_package = "go.chromium.org/luci/resultdb/sink/proto/v1;sinkpb";
@@ -60,7 +61,11 @@
map<string, Artifact> artifacts = 9;
// Equivalent of luci.resultdb.v1.TestResult.test_location.
+ // Deprecated, use test_metadata instead.
luci.resultdb.v1.TestLocation test_location = 10;
+
+ // Equivalent of luci.resultdb.v1.TestResult.test_metadata.
+ luci.resultdb.v1.TestMetadata test_metadata = 11;
}
// A local equivalent of luci.resultdb.Artifact message