Skip to content

Commit 9067360

Browse files
Google APIscopybara-github
authored andcommitted
docs: Batch CentOS images and HPC CentOS images are EOS
docs: Clarify required fields for Runnable.Container docs: Clarify required oneof fields for Runnable.Script docs: Clarify TaskSpec requires one or more runnables PiperOrigin-RevId: 662559250
1 parent 96facec commit 9067360

2 files changed

Lines changed: 43 additions & 35 deletions

File tree

google/cloud/batch/v1/job.proto

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,7 @@ message AllocationPolicy {
293293
// The following image values are supported for a boot disk:
294294
//
295295
// * `batch-debian`: use Batch Debian images.
296-
// * `batch-centos`: use Batch CentOS images.
297296
// * `batch-cos`: use Batch Container-Optimized images.
298-
// * `batch-hpc-centos`: use Batch HPC CentOS images.
299297
// * `batch-hpc-rocky`: use Batch HPC Rocky Linux images.
300298
string image = 4;
301299

google/cloud/batch/v1/task.proto

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -157,32 +157,36 @@ message TaskStatus {
157157
message Runnable {
158158
// Container runnable.
159159
message Container {
160-
// The URI to pull the container image from.
160+
// Required. The URI to pull the container image from.
161161
string image_uri = 1;
162162

163-
// Overrides the `CMD` specified in the container. If there is an ENTRYPOINT
164-
// (either in the container image or with the entrypoint field below) then
165-
// commands are appended as arguments to the ENTRYPOINT.
163+
// Required for some container images. Overrides the `CMD` specified in the
164+
// container. If there is an `ENTRYPOINT` (either in the container image or
165+
// with the `entrypoint` field below) then these commands are appended as
166+
// arguments to the `ENTRYPOINT`.
166167
repeated string commands = 2;
167168

168-
// Overrides the `ENTRYPOINT` specified in the container.
169+
// Required for some container images. Overrides the `ENTRYPOINT` specified
170+
// in the container.
169171
string entrypoint = 3;
170172

171173
// Volumes to mount (bind mount) from the host machine files or directories
172-
// into the container, formatted to match docker run's --volume option,
173-
// e.g. /foo:/bar, or /foo:/bar:ro
174+
// into the container, formatted to match `--volume` option for the
175+
// `docker run` command—for example, `/foo:/bar` or `/foo:/bar:ro`.
174176
//
175177
// If the `TaskSpec.Volumes` field is specified but this field is not, Batch
176178
// will mount each volume from the host machine to the container with the
177179
// same mount path by default. In this case, the default mount option for
178-
// containers will be read-only (ro) for existing persistent disks and
179-
// read-write (rw) for other volume types, regardless of the original mount
180-
// options specified in `TaskSpec.Volumes`. If you need different mount
181-
// settings, you can explicitly configure them in this field.
180+
// containers will be read-only (`ro`) for existing persistent disks and
181+
// read-write (`rw`) for other volume types, regardless of the original
182+
// mount options specified in `TaskSpec.Volumes`. If you need different
183+
// mount settings, you can explicitly configure them in this field.
182184
repeated string volumes = 7;
183185

184-
// Arbitrary additional options to include in the "docker run" command when
185-
// running this container, e.g. "--network host".
186+
// Required for some container images. Arbitrary additional options to
187+
// include in the `docker run` command when running this container—for
188+
// example, `--network host`. For the `--volume` option, use the `volumes`
189+
// field for the container.
186190
string options = 8;
187191

188192
// If set to true, external network access to and from container will be
@@ -248,37 +252,41 @@ message Runnable {
248252

249253
// Script runnable.
250254
message Script {
255+
// Required. The source code for this script runnable.
251256
oneof command {
252-
// Script file path on the host VM.
257+
// The path to a script file that is accessible from the host VM(s).
253258
//
254-
// To specify an interpreter, please add a `#!<interpreter>`(also known as
255-
// [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix))) as the
256-
// first line of the file.(For example, to execute the script using bash,
257-
// `#!/bin/bash` should be the first line of the file. To execute the
258-
// script using`Python3`, `#!/usr/bin/env python3` should be the first
259-
// line of the file.) Otherwise, the file will by default be executed by
260-
// `/bin/sh`.
259+
// Unless the script file supports the default `#!/bin/sh` shell
260+
// interpreter, you must specify an interpreter by including a
261+
// [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) as the
262+
// first line of the file. For example, to execute the script using bash,
263+
// include `#!/bin/bash` as the first line of the file. Alternatively,
264+
// to execute the script using Python3, include `#!/usr/bin/env python3`
265+
// as the first line of the file.
261266
string path = 1;
262267

263-
// Shell script text.
268+
// The text for a script.
264269
//
265-
// To specify an interpreter, please add a `#!<interpreter>\n` at the
266-
// beginning of the text.(For example, to execute the script using bash,
267-
// `#!/bin/bash\n` should be added. To execute the script using`Python3`,
268-
// `#!/usr/bin/env python3\n` should be added.) Otherwise, the script will
269-
// by default be executed by `/bin/sh`.
270+
// Unless the script text supports the default `#!/bin/sh` shell
271+
// interpreter, you must specify an interpreter by including a
272+
// [shebang line](https://en.wikipedia.org/wiki/Shebang_(Unix) at the
273+
// beginning of the text. For example, to execute the script using bash,
274+
// include `#!/bin/bash\n` at the beginning of the text. Alternatively,
275+
// to execute the script using Python3, include `#!/usr/bin/env python3\n`
276+
// at the beginning of the text.
270277
string text = 2;
271278
}
272279
}
273280

274-
// Barrier runnable blocks until all tasks in a taskgroup reach it.
281+
// A barrier runnable automatically blocks the execution of subsequent
282+
// runnables until all the tasks in the task group reach the barrier.
275283
message Barrier {
276284
// Barriers are identified by their index in runnable list.
277285
// Names are not required, but if present should be an identifier.
278286
string name = 1;
279287
}
280288

281-
// The script or container to run.
289+
// Required. The script, container, or barrier for this runnable to execute.
282290
oneof executable {
283291
// Container runnable.
284292
Container container = 1;
@@ -328,10 +336,12 @@ message Runnable {
328336

329337
// Spec of a task
330338
message TaskSpec {
331-
// The sequence of scripts or containers to run for this Task. Each Task using
332-
// this TaskSpec executes its list of runnables in order. The Task succeeds if
333-
// all of its runnables either exit with a zero status or any that exit with a
334-
// non-zero status have the ignore_exit_status flag.
339+
// Required. The sequence of one or more runnables (executable scripts,
340+
// executable containers, and/or barriers) for each task in this task group to
341+
// run. Each task runs this list of runnables in order. For a task to succeed,
342+
// all of its script and container runnables each must either exit with a zero
343+
// status or enable the `ignore_exit_status` subfield and exit with any
344+
// status.
335345
//
336346
// Background runnables are killed automatically (if they have not already
337347
// exited) a short time after all foreground runnables have completed. Even

0 commit comments

Comments
 (0)