@@ -176,32 +176,36 @@ message TaskResourceUsage {
176176message Runnable {
177177 // Container runnable.
178178 message Container {
179- // The URI to pull the container image from.
179+ // Required. The URI to pull the container image from.
180180 string image_uri = 1 ;
181181
182- // Overrides the `CMD` specified in the container. If there is an ENTRYPOINT
183- // (either in the container image or with the entrypoint field below) then
184- // commands are appended as arguments to the ENTRYPOINT.
182+ // Required for some container images. Overrides the `CMD` specified in the
183+ // container. If there is an `ENTRYPOINT` (either in the container image or
184+ // with the `entrypoint` field below) then these commands are appended as
185+ // arguments to the `ENTRYPOINT`.
185186 repeated string commands = 2 ;
186187
187- // Overrides the `ENTRYPOINT` specified in the container.
188+ // Required for some container images. Overrides the `ENTRYPOINT` specified
189+ // in the container.
188190 string entrypoint = 3 ;
189191
190192 // Volumes to mount (bind mount) from the host machine files or directories
191- // into the container, formatted to match docker run's --volume option,
192- // e.g. /foo:/bar, or /foo:/bar:ro
193+ // into the container, formatted to match ` --volume` option for the
194+ // `docker run` command—for example, ` /foo:/bar` or ` /foo:/bar:ro`.
193195 //
194196 // If the `TaskSpec.Volumes` field is specified but this field is not, Batch
195197 // will mount each volume from the host machine to the container with the
196198 // same mount path by default. In this case, the default mount option for
197- // containers will be read-only (ro ) for existing persistent disks and
198- // read-write (rw ) for other volume types, regardless of the original mount
199- // options specified in `TaskSpec.Volumes`. If you need different mount
200- // settings, you can explicitly configure them in this field.
199+ // containers will be read-only (`ro` ) for existing persistent disks and
200+ // read-write (`rw` ) for other volume types, regardless of the original
201+ // mount options specified in `TaskSpec.Volumes`. If you need different
202+ // mount settings, you can explicitly configure them in this field.
201203 repeated string volumes = 7 ;
202204
203- // Arbitrary additional options to include in the "docker run" command when
204- // running this container, e.g. "--network host".
205+ // Required for some container images. Arbitrary additional options to
206+ // include in the `docker run` command when running this container—for
207+ // example, `--network host`. For the `--volume` option, use the `volumes`
208+ // field for the container.
205209 string options = 8 ;
206210
207211 // If set to true, external network access to and from container will be
@@ -267,37 +271,41 @@ message Runnable {
267271
268272 // Script runnable.
269273 message Script {
274+ // Required. The source code for this script runnable.
270275 oneof command {
271- // Script file path on the host VM.
276+ // The path to a script file that is accessible from the host VM(s) .
272277 //
273- // To specify an interpreter, please add a `#!<interpreter>`(also known as
274- // [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
275- // first line of the file.(For example, to execute the script using bash,
276- // `#!/bin/bash` should be the first line of the file. To execute the
277- // script using`Python3`, ` #!/usr/ bin/env python3` should be the first
278- // line of the file.) Otherwise, the file will by default be executed by
279- // `/bin/sh` .
278+ // Unless the script file supports the default `#!/bin/sh` shell
279+ // interpreter, you must specify an interpreter by including a
280+ // [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the
281+ // first line of the file. For example, to execute the script using bash,
282+ // include ` #!/bin/bash` as the first line of the file. Alternatively,
283+ // to execute the script using Python3, include `#!/usr/bin/env python3`
284+ // as the first line of the file .
280285 string path = 1 ;
281286
282- // Shell script text.
287+ // The text for a script .
283288 //
284- // To specify an interpreter, please add a `#!<interpreter>\n` at the
285- // beginning of the text.(For example, to execute the script using bash,
286- // `#!/bin/bash\n` should be added. To execute the script using`Python3`,
287- // `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
288- // by default be executed by `/bin/sh`.
289+ // Unless the script text supports the default `#!/bin/sh` shell
290+ // interpreter, you must specify an interpreter by including a
291+ // [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the
292+ // beginning of the text. For example, to execute the script using bash,
293+ // include `#!/bin/bash\n` at the beginning of the text. Alternatively,
294+ // to execute the script using Python3, include `#!/usr/bin/env python3\n`
295+ // at the beginning of the text.
289296 string text = 2 ;
290297 }
291298 }
292299
293- // Barrier runnable blocks until all tasks in a taskgroup reach it.
300+ // A barrier runnable automatically blocks the execution of subsequent
301+ // runnables until all the tasks in the task group reach the barrier.
294302 message Barrier {
295303 // Barriers are identified by their index in runnable list.
296304 // Names are not required, but if present should be an identifier.
297305 string name = 1 ;
298306 }
299307
300- // The script or container to run .
308+ // Required. The script, container, or barrier for this runnable to execute .
301309 oneof executable {
302310 // Container runnable.
303311 Container container = 1 ;
@@ -347,10 +355,12 @@ message Runnable {
347355
348356// Spec of a task
349357message TaskSpec {
350- // The sequence of scripts or containers to run for this Task. Each Task using
351- // this TaskSpec executes its list of runnables in order. The Task succeeds if
352- // all of its runnables either exit with a zero status or any that exit with a
353- // non-zero status have the ignore_exit_status flag.
358+ // Required. The sequence of one or more runnables (executable scripts,
359+ // executable containers, and/or barriers) for each task in this task group to
360+ // run. Each task runs this list of runnables in order. For a task to succeed,
361+ // all of its script and container runnables each must either exit with a zero
362+ // status or enable the `ignore_exit_status` subfield and exit with any
363+ // status.
354364 //
355365 // Background runnables are killed automatically (if they have not already
356366 // exited) a short time after all foreground runnables have completed. Even
0 commit comments