| // Copyright 2017 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| package tricium; |
| |
| option go_package = "infra/tricium/api/v1;tricium"; |
| |
| import "infra/tricium/api/v1/data.proto"; |
| import "infra/tricium/api/v1/platform.proto"; |
| |
| // Tricium analyzer definition. |
| message Function { |
| // Originally, there were two types of functions; isolators and analyzers. |
| // For analyzer functions, the output must be of type Data.Results. After |
| // transition to recipe-based analyzers only, all functions should be analyzers |
| // and input type is ignored. |
| enum Type { |
| NONE = 0; |
| ISOLATOR = 1 [deprecated=true]; |
| ANALYZER = 2; |
| } |
| |
| // The type of this function. |
| // |
| // This field is required, but should always be ANALYZER. |
| Type type = 1; |
| |
| // The name of the analyzer. |
| // |
| // The name must be unique among Tricium functions within a Tricium instance. |
| // The name is expected to be CamelCase; no spaces, underscores or dashes are |
| // allowed. |
| // |
| // This field is required. |
| string name = 2; |
| |
| // Data needed by this analyzer. |
| // |
| // After migration to recipe-based analyzers, this should always be |
| // GIT_FILE_DETAILS. |
| Data.Type needs = 3; |
| |
| // Data provided by this analyzer. |
| // |
| // This field is required. |
| // After migration to recipe-based analyzers, this should always be |
| // RESULTS. |
| Data.Type provides = 4; |
| |
| // Path filters for this analyzer. |
| // |
| // Defined as a glob. The path filters only apply to the last part of the |
| // path. |
| repeated string path_filters = 5; // Default: "*" |
| |
| // Email address of the owner of this analyzer. Used for bug filing. |
| // |
| // This field is required. |
| string owner = 6; |
| |
| // Monorail bug component for bug filing. |
| // |
| // This field is required. |
| string monorail_component = 7; |
| |
| reserved 8; |
| |
| // Function implementations. |
| // |
| // Originally the idea was that an analyzer may run on many different platforms |
| // and the comments from different platforms may be merged. |
| // |
| // This was not done in practice, so the number of impls should always be one. |
| repeated Impl impls = 9; |
| } |
| |
| // Analyzer implementation. |
| // |
| // Implementation must be recipe-based; command-based (legacy) analyzers |
| // are no longer supported. |
| message Impl { |
| // Data-dependency details specific to this implementation. |
| // |
| // This particular value of this field isn't significant, because |
| // the platform is determined by the builder. |
| Platform.Name needs_for_platform = 1; |
| Platform.Name provides_for_platform = 2; |
| |
| // The platform to run this implementation on. |
| // |
| // This particular value of this field isn't significant, because |
| // the platform is determined by the builder. |
| Platform.Name runtime_platform = 3; |
| |
| reserved 4; |
| |
| oneof impl { |
| // Recipe for recipe-based implementation. |
| Recipe recipe = 5; |
| } |
| |
| reserved 6; |
| |
| // Deadline for execution of corresponding workers. |
| // |
| // Note that this deadline includes the launch of a swarming task for the |
| // corresponding worker, and collection of results from that worker. |
| // Deadline should be given in seconds. |
| int32 deadline = 7; |
| } |
| |
| // Specification of a recipe for a recipe-based analyzer. |
| message Recipe { |
| reserved 1, 2, 3, 4; |
| |
| // Project ID, e.g. "chromium". |
| string project = 5; |
| |
| // Bucket name, e.g. "try". |
| string bucket = 6; |
| |
| // Builder name, e.g. "linux-rel". |
| string builder = 7; |
| } |