1// Copyright 2023 Google LLC 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 15syntax = "proto3"; 16 17package google.devtools.resultstore.v2; 18 19import "google/api/resource.proto"; 20import "google/devtools/resultstore/v2/common.proto"; 21import "google/devtools/resultstore/v2/file.proto"; 22import "google/protobuf/duration.proto"; 23 24option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore"; 25option java_multiple_files = true; 26option java_outer_classname = "ConfiguredTargetProto"; 27option java_package = "com.google.devtools.resultstore.v2"; 28 29// Each ConfiguredTarget represents data for a given configuration of a given 30// target in a given Invocation. 31// Every ConfiguredTarget should have at least one Action as a child resource 32// before the invocation is finalized. Refer to the Action's documentation for 33// more info on this. 34message ConfiguredTarget { 35 option (google.api.resource) = { 36 type: "resultstore.googleapis.com/ConfiguredTarget" 37 pattern: "invocations/{invocation}/targets/{target}/configuredTargets/{configured_target}" 38 }; 39 40 // The resource ID components that identify the ConfiguredTarget. 41 message Id { 42 // The Invocation ID. 43 string invocation_id = 1; 44 45 // The Target ID. 46 string target_id = 2; 47 48 // The Configuration ID. 49 string configuration_id = 3; 50 } 51 52 // The resource name. Its format must be: 53 // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)} 54 // where ${CONFIG_ID} must match the ID of an existing Configuration under 55 // this Invocation. 56 string name = 1; 57 58 // The resource ID components that identify the ConfiguredTarget. They must 59 // match the resource name after proper encoding. 60 Id id = 2; 61 62 // The aggregate status for this configuration of this target. If testing 63 // was not requested, set this to the build status (e.g. BUILT or 64 // FAILED_TO_BUILD). 65 StatusAttributes status_attributes = 3; 66 67 // Captures the start time and duration of this configured target. 68 Timing timing = 4; 69 70 // Test specific attributes for this ConfiguredTarget. 71 ConfiguredTestAttributes test_attributes = 6; 72 73 // Arbitrary name-value pairs. 74 // This is implemented as a multi-map. Multiple properties are allowed with 75 // the same key. Properties will be returned in lexicographical order by key. 76 repeated Property properties = 7; 77 78 // A list of file references for configured target level files. 79 // The file IDs must be unique within this list. Duplicate file IDs will 80 // result in an error. Files will be returned in lexicographical order by ID. 81 repeated File files = 8; 82} 83 84// Attributes that apply only to test actions under this configured target. 85message ConfiguredTestAttributes { 86 // Total number of test runs. For example, in bazel this is specified with 87 // --runs_per_test. Zero if runs_per_test is not used. 88 int32 total_run_count = 2; 89 90 // Total number of test shards. Zero if shard count was not specified. 91 int32 total_shard_count = 3; 92 93 // How long test is allowed to run. 94 google.protobuf.Duration timeout_duration = 5; 95} 96