common.proto 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. // Copyright 2021 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. syntax = "proto3";
  15. package google.devtools.resultstore.v2;
  16. import "google/protobuf/duration.proto";
  17. import "google/protobuf/timestamp.proto";
  18. option go_package = "google.golang.org/genproto/googleapis/devtools/resultstore/v2;resultstore";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "CommonProto";
  21. option java_package = "com.google.devtools.resultstore.v2";
  22. // Describes the status of a resource in both enum and string form.
  23. // Only use description when conveying additional info not captured in the enum
  24. // name.
  25. message StatusAttributes {
  26. // Enum representation of the status.
  27. Status status = 1;
  28. // A longer description about the status.
  29. string description = 2;
  30. }
  31. // A generic key-value property definition.
  32. message Property {
  33. // The key.
  34. string key = 1;
  35. // The value.
  36. string value = 2;
  37. }
  38. // The timing of a particular Invocation, Action, etc. The start_time is
  39. // specified, stop time can be calculated by adding duration to start_time.
  40. message Timing {
  41. // The time the resource started running. This is in UTC Epoch time.
  42. google.protobuf.Timestamp start_time = 1;
  43. // The duration for which the resource ran.
  44. google.protobuf.Duration duration = 2;
  45. }
  46. // Represents a dependency of a resource on another resource. This can be used
  47. // to define a graph or a workflow paradigm through resources.
  48. message Dependency {
  49. // The resource depended upon. It may be a Target, ConfiguredTarget, or
  50. // Action.
  51. oneof resource {
  52. // The name of a target. Its format must be:
  53. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}
  54. // This must point to an target under the same invocation.
  55. string target = 1;
  56. // The name of a configured target. Its format must be:
  57. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)}
  58. // This must point to an configured target under the same invocation.
  59. string configured_target = 2;
  60. // The name of an action. Its format must be:
  61. // invocations/${INVOCATION_ID}/targets/${url_encode(TARGET_ID)}/configuredTargets/${url_encode(CONFIG_ID)}/actions/${url_encode(ACTION_ID)}
  62. // This must point to an action under the same invocation.
  63. string action = 3;
  64. }
  65. // A label describing this dependency.
  66. // The label "Root Cause" is handled specially. It is used to point to the
  67. // exact resource that caused a resource to fail.
  68. string label = 4;
  69. }
  70. // These correspond to the prefix of the rule name. Eg cc_test has language CC.
  71. enum Language {
  72. // Language unspecified or not listed here.
  73. LANGUAGE_UNSPECIFIED = 0;
  74. // Not related to any particular language
  75. NONE = 1;
  76. // Android
  77. ANDROID = 2;
  78. // ActionScript (Flash)
  79. AS = 3;
  80. // C++ or C
  81. CC = 4;
  82. // Cascading-Style-Sheets
  83. CSS = 5;
  84. // Dart
  85. DART = 6;
  86. // Go
  87. GO = 7;
  88. // Google-Web-Toolkit
  89. GWT = 8;
  90. // Haskell
  91. HASKELL = 9;
  92. // Java
  93. JAVA = 10;
  94. // Javascript
  95. JS = 11;
  96. // Lisp
  97. LISP = 12;
  98. // Objective-C
  99. OBJC = 13;
  100. // Python
  101. PY = 14;
  102. // Shell (Typically Bash)
  103. SH = 15;
  104. // Swift
  105. SWIFT = 16;
  106. // Typescript
  107. TS = 18;
  108. // Webtesting
  109. WEB = 19;
  110. // Scala
  111. SCALA = 20;
  112. // Protocol Buffer
  113. PROTO = 21;
  114. // Extensible Markup Language
  115. XML = 22;
  116. }
  117. // Status of a resource.
  118. enum Status {
  119. // The implicit default enum value. Should never be set.
  120. STATUS_UNSPECIFIED = 0;
  121. // Displays as "Building". Means the target is compiling, linking, etc.
  122. BUILDING = 1;
  123. // Displays as "Built". Means the target was built successfully.
  124. // If testing was requested, it should never reach this status: it should go
  125. // straight from BUILDING to TESTING.
  126. BUILT = 2;
  127. // Displays as "Broken". Means build failure such as compile error.
  128. FAILED_TO_BUILD = 3;
  129. // Displays as "Testing". Means the test is running.
  130. TESTING = 4;
  131. // Displays as "Passed". Means the test was run and passed.
  132. PASSED = 5;
  133. // Displays as "Failed". Means the test was run and failed.
  134. FAILED = 6;
  135. // Displays as "Timed out". Means the test didn't finish in time.
  136. TIMED_OUT = 7;
  137. // Displays as "Cancelled". Means the build or test was cancelled.
  138. // E.g. User hit control-C.
  139. CANCELLED = 8;
  140. // Displays as "Tool Failed". Means the build or test had internal tool
  141. // failure.
  142. TOOL_FAILED = 9;
  143. // Displays as "Incomplete". Means the build or test did not complete. This
  144. // might happen when a build breakage or test failure causes the tool to stop
  145. // trying to build anything more or run any more tests, with the default
  146. // bazel --nokeep_going option or the --notest_keep_going option.
  147. INCOMPLETE = 10;
  148. // Displays as "Flaky". Means the aggregate status contains some runs that
  149. // were successful, and some that were not.
  150. FLAKY = 11;
  151. // Displays as "Unknown". Means the tool uploading to the server died
  152. // mid-upload or does not know the state.
  153. UNKNOWN = 12;
  154. // Displays as "Skipped". Means building and testing were skipped.
  155. // (E.g. Restricted to a different configuration.)
  156. SKIPPED = 13;
  157. }
  158. // Indicates the upload status of the invocation, whether it is
  159. // post-processing, or immutable, etc.
  160. enum UploadStatus {
  161. // The implicit default enum value. Should never be set.
  162. UPLOAD_STATUS_UNSPECIFIED = 0;
  163. // The invocation is still uploading to the ResultStore.
  164. UPLOADING = 1;
  165. // The invocation upload is complete. The ResultStore is still post-processing
  166. // the invocation.
  167. POST_PROCESSING = 2;
  168. // All post-processing is complete, and the invocation is now immutable.
  169. IMMUTABLE = 3;
  170. }