blob: f414d31db947a290b5db29b1994e76b6d136f883 [file] [log] [blame]
// 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.resultsink.v1;
import "go.chromium.org/luci/resultdb/proto/v1/common.proto";
import "go.chromium.org/luci/resultdb/proto/v1/test_metadata.proto";
option go_package = "go.chromium.org/luci/resultdb/sink/proto/v1;sinkpb";
// Maps from directory paths to extra fields to attach to TestResults.
// When converted to JSON format, it will look like below:
//{
// "repos": {
// "https://chromium.googlesource.com/chromium/src" : {
// "dirs": {
// ".": {
// "tags": {
// "teamEmail": "team_email@chromium.org"
// }
// },
// "foo": {
// "tags": {
// "teamEmail": "team_email@chromium.org",
// "os": "WINDOWS"
// },
// "bug_component": {
// "issue_tracker": {
// "component_id": "17171717"
// }
// }
// }
// }
// "files": {
// "./file.txt": {
// "tags": {
// "teamEmail": "other_email@chromium.org",
// "os": "WINDOWS"
// },
// "bug_component": {
// "issue_tracker": {
// "component_id": "123456"
// }
// }
// }
// }
// }
// }
//}
//
// N.B. This message is called 'LocationTags' because it was previously
// only used for tags, but this is no longer true.
message LocationTags {
// Map from directory paths in a repo to extra tags to attach to TestResults.
message Repo {
// The key is a relative dir path.
// "" means repo root and represents default for all subdirs.
// Must use forward slash as a dir separator.
map<string, Dir> dirs = 1;
// The key is a relative path to a file.
// Same rules apply as dir.
map<string, File> files = 2;
}
// Extra tags to attach to TestResults for a directory.
message Dir {
// If a key is not defined for subdir, but defined for an ancestor dir, then
// the value(s) in the ancestor is implied.
//
// A key can be repeated.
repeated luci.resultdb.v1.StringPair tags = 1;
// The issue tracker component associated with the test, if any.
// Bugs related to the test may be filed here.
// Populated to test_metadata.bug_component.
luci.resultdb.v1.BugComponent bug_component = 2;
}
// Extra tags to attach to TestResults for a file.
message File {
// A key can be repeated.
repeated luci.resultdb.v1.StringPair tags = 1;
// The issue tracker component associated with the test, if any.
// Bugs related to the test may be filed here.
// Populated to test_metadata.bug_component.
luci.resultdb.v1.BugComponent bug_component = 2;
}
// The key is a 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".
map<string, Repo> repos = 1;
}