Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 syntax = "proto3"; | 5 syntax = "proto3"; |
| 6 | 6 |
| 7 import "google/protobuf/duration.proto"; | 7 import "google/protobuf/duration.proto"; |
| 8 | 8 |
| 9 import "github.com/luci/luci-go/dm/api/distributor/swarming/v1/cipd.proto"; | |
| 9 import "github.com/luci/luci-go/dm/api/distributor/swarming/v1/isolate_ref.proto "; | 10 import "github.com/luci/luci-go/dm/api/distributor/swarming/v1/isolate_ref.proto "; |
| 10 | 11 |
| 11 package swarmingV1; | 12 package swarmingV1; |
| 12 | 13 |
| 13 // Parameters represents the set of swarming parameters that the Swarming v1 | 14 // Parameters represents the set of swarming parameters that the Swarming v1 |
| 14 // distributor can interpret for use with a Swarming v1 compatible service. | 15 // distributor can interpret for use with a Swarming v1 compatible service. |
| 15 message Parameters { | 16 message Parameters { |
| 16 // These parameters affect how the Executions for this Quest are scheduled. | 17 // These parameters affect how the Executions for this Quest are scheduled. |
| 17 message Scheduling { | 18 message Scheduling { |
| 18 // Priority adjusts the scheduling preference for Executions. The higher the | 19 // Priority adjusts the scheduling preference for Executions. The higher the |
| 19 // priority number, the longer it will take to schedule, and vice versa (ala | 20 // priority number, the longer it will take to schedule, and vice versa (ala |
| 20 // `nice`). | 21 // `nice`). |
| 21 // | 22 // |
| 22 // A value of 0 (default) corresponds to a default priority (currently 100). | 23 // A value of 0 (default) corresponds to a default priority (currently 100). |
| 23 // Other values correspond directly to the swarming task Priority. | 24 // Other values correspond directly to the swarming task Priority. |
| 24 // | 25 // |
| 25 // THIS MEANS THAT PRIORITY 0 IS NOT PERMITTED HERE! If you want 0, use | 26 // THIS MEANS THAT PRIORITY 0 IS NOT PERMITTED HERE! If you want 0, use |
| 26 // 1 instead. | 27 // 1 instead. |
| 27 // | 28 // |
| 28 // This must be <= 255. | 29 // This must be <= 255. |
| 29 uint32 priority = 1; | 30 uint32 priority = 1; |
| 30 | 31 |
| 31 // These specifiy the profile of the machine to use for Execuions of this | 32 // These specifiy the profile of the machine to use for Execuions of this |
| 32 // quest. These can indicate OS, number of cores, amount of ram, GPU type, | 33 // quest. These can indicate OS, number of cores, amount of ram, GPU type, |
| 33 // pool, etc. See the swarming service instance for available dimensions. | 34 // pool, etc. See the swarming service instance for available dimensions. |
| 34 map<string, string> dimensions = 2; | 35 map<string, string> dimensions = 2; |
| 35 | 36 |
| 37 // These dimensions will be snapshotted from the first execution of each | |
| 38 // attempt, and will be subsequently re-used for all following executions of | |
| 39 // that attempt. | |
| 40 // | |
| 41 // The most-specific value for these dimensions will be taken for tasks | |
| 42 // where a given dimension has multiple values. | |
| 43 repeated string snapshot_dimensions = 3; | |
| 44 | |
| 36 // This indicates the maximum amount of time that an Execution may run | 45 // This indicates the maximum amount of time that an Execution may run |
| 37 // without emitting IO on stdout/err. 0 means 'no timeout'. | 46 // without emitting IO on stdout/err. 0 means 'no timeout'. |
| 38 google.protobuf.Duration io_timeout = 3; | 47 google.protobuf.Duration io_timeout = 4; |
|
Vadim Sh.
2016/09/26 23:16:06
you are changing tags. Are you sure this stuff is
iannucci
2016/09/27 01:23:56
so far? yes, I'm sure it's never used in binary fo
| |
| 39 } | 48 } |
| 40 Scheduling scheduling = 1; | 49 Scheduling scheduling = 1; |
| 41 | 50 |
| 42 message Meta { | 51 message Meta { |
| 43 // The 'human readable' name prefix for Executions of this quest. DM will | 52 // The 'human readable' name prefix for Executions of this quest. DM will |
| 44 // automatically prepend this to the execution ID. So if this was "cool | 53 // automatically prepend this to the execution ID. So if this was "cool |
| 45 // job", the swarming task name would be | 54 // job", the swarming task name would be |
| 46 // "cool job / <quest_ID>|<attempt>|<execution>" | 55 // "cool job / <quest_ID>|<attempt>|<execution>" |
| 47 string name_prefix = 1; | 56 string name_prefix = 1; |
| 48 } | 57 } |
| 49 Meta meta = 2; | 58 Meta meta = 2; |
| 50 | 59 |
| 51 message Job { | 60 message Job { |
| 52 message Inputs { | 61 message Inputs { |
| 53 // 0 or more isolated IDs that will be 'included' together into the final | 62 // 0 or more isolated IDs that will be 'included' together into the final |
| 54 // job .isolated sent to swarming. | 63 // job .isolated sent to swarming. |
| 55 // | 64 // |
| 56 // The "server" value must either be omitted, or equal the isolate server | 65 // The "server" value must either be omitted, or equal the isolate server |
| 57 // defined by this distributor's config (the `isolate.host` field, | 66 // defined by this distributor's config (the `isolate.host` field, |
| 58 // prepended with "https://"). | 67 // prepended with "https://"). |
| 59 repeated swarmingV1.IsolatedRef isolated = 1; | 68 repeated swarmingV1.IsolatedRef isolated = 1; |
| 60 | 69 |
| 61 message CipdPackage { | 70 // CIPD packages to use for the job. These specs may contain templated |
| 62 string name = 1; | 71 // parameters for package names or non-instance_ids for the package |
| 63 string path = 2; | 72 // versions. The first successful execution for each attempt will |
| 64 string version = 3; | 73 // resolve+snapshot all package names and versions. These package names |
| 65 } | 74 // and versions will be used for all subsequent executions of that |
| 66 // 0 or more cipd packages for the job. | 75 // attempt. |
| 67 repeated CipdPackage packages = 2; | 76 swarmingV1.CipdSpec cipd = 2; |
| 68 | |
| 69 // Server to use for cipd packages. Required (though it may be specified | |
| 70 // by the quest's designated distributor config). This must be | |
| 71 // scheme://<hostname>, e.g. "https://example.appspot.com". The only | |
| 72 // supported schemes are http and https. | |
| 73 string cipd_server = 3; | |
| 74 } | 77 } |
| 75 Inputs inputs = 1; | 78 Inputs inputs = 1; |
| 76 | 79 |
| 77 // This is the "argv" to run with this job. This includes substitution | 80 // This is the "argv" to run with this job. This includes substitution |
| 78 // paramters defined by swarming's run_isolated.py script: | 81 // paramters defined by swarming's run_isolated.py script: |
| 79 // https://github.com/luci/luci-py/blob/master/client/run_isolated.py | 82 // https://github.com/luci/luci-py/blob/master/client/run_isolated.py |
| 80 // | 83 // |
| 81 // Additionally, DM provides the following substitutions: | 84 // Additionally, DM provides the following substitutions: |
| 82 // ${DM.PREVIOUS.EXECUTION.STATE:PATH} - the path to a JSONPB encoding of | 85 // ${DM.PREVIOUS.EXECUTION.STATE:PATH} - the path to a JSONPB encoding of |
| 83 // the swarming_v1.Result from the previous Execution of this Attempt. | 86 // the swarming_v1.Result from the previous Execution of this Attempt. |
| 84 // ${DM.QUEST.DATA.DESC:PATH} - the path to the | 87 // ${DM.QUEST.DATA.DESC:PATH} - the path to the |
| 85 // dm.Quest.Data.Desc JSONPB for the quest that this execution is part | 88 // dm.Quest.Data.Desc JSONPB for the quest that this execution is part |
| 86 // of. | 89 // of. |
| 87 // ${DM.EXECUTION.AUTH:PATH} - the path to the JSONPB of a | 90 // ${DM.EXECUTION.AUTH:PATH} - the path to the JSONPB of a |
| 88 // dm.Execution.Auth for the current execution. Consuming this file is | 91 // dm.Execution.Auth for the current execution. Consuming this file is |
| 89 // currently required to interact with DM, making this substitution | 92 // currently required to interact with DM, making this substitution |
| 90 // parameter a requirement. | 93 // parameter a requirement. |
| 91 // ${DM.HOST} - the hostname to use to access DM's pRPC API. | 94 // ${DM.HOST} - the hostname to use to access DM's pRPC API. |
| 92 // | 95 // |
| 93 // Command MUST be specified; specifying a command in any of the isolated | 96 // Command MUST be specified; specifying a command in any of the isolated |
| 94 // inputs WILL NOT DO ANYTHING. | 97 // inputs WILL NOT DO ANYTHING. |
| 95 repeated string command = 2; | 98 repeated string command = 2; |
| 96 | 99 |
| 97 // Environment variables for the executions. | 100 // Environment variables for the executions. |
| 98 map<string, string> env = 4; | 101 map<string, string> env = 4; |
| 99 } | 102 } |
| 100 Job job = 3; | 103 Job job = 3; |
| 101 } | 104 } |
| OLD | NEW |