• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5syntax = "proto3";
6
7package chromiumos.config.api.test.rtd.v1;
8
9option go_package = "go.chromium.org/chromiumos/config/go/api/test/rtd/v1;rtd";
10
11import "chromiumos/config/api/test/results/v2/result.proto";
12
13// Configuration data needed by clients of ProgressSink.
14message ProgressSinkClientConfig {
15  // Local TCP port to be used by the Remote Test Driver to communicate with
16  // InvocationProgressSink service.
17  int32 port = 1;
18}
19
20// A service implemented by Remote Test Servers, used to report progress from a
21// Remote Test Driver invocation.
22//
23// A simple implementation of Remote Test Driver may report progress at the
24// end of the invocation for all requests together. Real implementations SHOULD
25// report incremental progress during the invocation.
26//
27// A progress sink service instance is tied to a single Invocation. There MUST
28// always be a single Remote Test Driver invocation inside a Remote Test Server.
29// If a Test Lab Environment desires to share a ProgressSink instance across
30// various Remote Test Servers, a way to dinstinguish the different Remote Test
31// Driver clients must be determined, which is not supported directly by the
32// following API.
33service ProgressSink {
34  // A Remote Test Driver invocation MUST call ReportResult exactly once per
35  // request.
36  rpc ReportResult(ReportResultRequest) returns (ReportResultResponse);
37
38  // A log stream from the Remote Test Driver invocation.
39  //
40  // Each call to this method MUST stream logs for a single invocation request
41  // and log file. Data for the same file may be split over multiple ReportLog
42  // calls. Data received from concurrent methods calls for the same log file
43  // may be interleved arbitrarily.
44  rpc ReportLog(stream ReportLogRequest) returns (ReportLogResponse);
45
46  // Archive test artifacts to non-ephemeral storage.
47  //
48  // Different Test Lab Environments may use very different non-ephemeral
49  // storage technologies. Remote Test Servers MUST archive the artifacts to
50  // final storage synchronously and return an error if the archival fails.
51  //
52  // Note: Remote Test Drivers SHOULD use ReportLog() to report logs.
53  // ArchiveArtifact() SHOULD be used to report structured or binary data only.
54  //
55  // Remote Test Server may limit the size of artifacts that may be offloaded
56  // per request and may fail further requests with RESOURCE_EXHAUSTED.
57  rpc ArchiveArtifact(ArchiveArtifactRequest) returns (ArchiveArtifactResponse);
58}
59
60message ReportResultRequest {
61  // The request to report results for, identified by the
62  // Invocation.Request.name field.
63  string request = 1;
64
65  // Result to report.
66  chromiumos.config.api.test.results.v2.Result result = 2;
67}
68
69message ReportResultResponse {
70  // If set, the invocation SHOULD immediately terminate, skipping remaining
71  // requests.
72  bool terminate = 1;
73}
74
75message ReportLogRequest {
76  // Name of the log sink.
77  //
78  // name may be interpreted as a local file path or part of a URL. name MUST be
79  // a valid resource name per https://aip.dev/122 and MUST be a valid POSIX
80  // file path.
81  string name = 1;
82
83  // The request to report logs for, identified by the
84  // Invocation.Request.name field.
85  string request = 2;
86
87  // Uninterpreted chunk of log-data.
88  bytes data = 3;
89}
90
91message ReportLogResponse {}
92
93message ArchiveArtifactRequest {
94  // Name for the archived artifact.
95  //
96  // name may be interpreted as a local file path or part of a URL. name MUST be
97  // a valid resource name per https://aip.dev/122 and MUST be a valid POSIX
98  // file path.
99  //
100  // name MUST be unique across all artifacts archived from a single invocation
101  // request.
102  string name = 1;
103
104  // The request to archive artifacts for, identified by the
105  // Invocation.Request.name field.
106  string request = 2;
107
108  // Absolute path to a file or directory to archive.
109  string local_path = 3;
110}
111
112message ArchiveArtifactResponse {}
113