| // Copyright 2019 The LUCI Authors. All rights reserved. |
| // Use of this source code is governed under the Apache License, Version 2.0 |
| // that can be found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| package recipe_engine; |
| |
| import "go.chromium.org/luci/buildbucket/proto/common.proto"; |
| |
| // Legacy result message to model the result of recipe execution. |
| // TODO(yiwzhang): Delete this message as well as Failure after recipe engine |
| // is purely on build.proto |
| message Result { |
| oneof oneof_result { |
| // The json result of a recipe. Guaranteed to be a JSON 'object' (e.g. |
| // "{...}") or omitted. |
| string json_result = 1; |
| |
| // The cause of the failure of a recipe. |
| Failure failure = 2; |
| } |
| } |
| |
| message Failure { |
| // A reason readable by humans. Printed to the UI, and will be seen by users. |
| string human_reason = 1; |
| |
| message Dummy {} |
| |
| // The kitchen code only recognizes two types of failures: Infra failures and |
| // non-infra failures. It distinguishes them by the existence of the 'failure' |
| // message below, but doesn't actually care about the contents of this message |
| // (just the 'human_reason' field above). |
| // |
| // So, we only need to have a dummy message here which is set for 'regular' |
| // failures, and unset for 'infra' failures. |
| // |
| // This result.proto can't go away quickly enough :). Once the recipe engine |
| // is purely on build.proto, this result.proto file can go away. |
| // |
| // Kitchen's result parsing code: |
| // https://chromium.googlesource.com/infra/infra/+/refs/heads/master/go/src/infra/tools/kitchen/cook.go#202 |
| Dummy failure = 5; |
| } |
| |
| // The result of a recipe execution. |
| // Can contain more detailed results about what occurred in the build. |
| message RawResult { |
| // Human readable information on what occurred in the build |
| string summary_markdown = 1; |
| // The final status of the recipe execution. |
| // |
| // MUST be a terminal status. |
| buildbucket.v2.Status status = 2; |
| } |