• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2022 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.test.api;
8
9option go_package = "go.chromium.org/chromiumos/config/go/test/api";
10
11import "chromiumos/longrunning/operations.proto";
12import "google/protobuf/any.proto";
13import "chromiumos/storage_path.proto";
14import "chromiumos/test/api/cros_test_cli.proto";
15
16// Generic publishing interface for CFT. Intended to be interchangeable across
17// services
18service GenericPublishService {
19  // Publish publishes test results to a specific endpoint.
20  // It is intended to be a generic publish grpc that may be
21  // used by all endpoints.
22  rpc Publish(PublishRequest)
23      returns (longrunning.Operation) {
24    option (longrunning.operation_info) = {
25      response_type: "PublishResponse",
26      metadata_type: "PublishMetadata"
27    };
28  }
29}
30
31// NEXT_TAG: 6
32message PublishRequest {
33  // Local path to tests artifact directory
34  StoragePath artifact_dir_path = 1;
35
36  // Test responses from cros-test
37  CrosTestResponse test_response = 2;
38
39  // Retry count. Default is 0 where no retry will be done.
40  int32 retry_count = 3;
41
42  // Endpoint specific metadata
43  google.protobuf.Any metadata = 4;
44
45  // Flag to indicate whether tests are run via 3d.
46  bool is_3d_run = 5;
47}
48
49message PublishResponse {
50  // Status of the publish operation
51  enum Status {
52    // Unspecified.  Invalid state.
53    STATUS_UNSPECIFIED = 0;
54    // Success
55    STATUS_SUCCESS = 1;
56    // Invalid Request
57    STATUS_INVALID_REQUEST = 2;
58    // Failure
59    STATUS_FAILURE = 3;
60  }
61  // Status of the publish operation
62  Status status = 1;
63
64  // Any kind of message that the service wants to respond with.
65  // In case of failure, this will hold the error message.
66  string message = 2;
67
68  // Endpoint specific metadata
69  google.protobuf.Any metadata = 3;
70}
71