Skip to content

Commit d5cddab

Browse files
Google APIscopybara-github
authored andcommitted
feat: add a install_ops_agent field to InstancePolicyOrTemplate for Ops Agent support
--- docs: A comment for field `max_run_duration` in message `google.cloud.batch.v1alpha.TaskSpec` is changed --- docs: refine doc for the update_mask field in message `google.cloud.batch.v1alpha.UpdateJobRequest` PiperOrigin-RevId: 639906977
1 parent 06c14e2 commit d5cddab

3 files changed

Lines changed: 36 additions & 15 deletions

File tree

google/cloud/batch/v1alpha/batch.proto

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,26 @@ message DeleteJobRequest {
236236
// UpdateJob Request.
237237
message UpdateJobRequest {
238238
// Required. The Job to update.
239-
// Only fields specified in `update_mask` are updated.
239+
// Only fields specified in `updateMask` are updated.
240240
Job job = 1 [(google.api.field_behavior) = REQUIRED];
241241

242242
// Required. Mask of fields to update.
243243
//
244-
// UpdateJob request now only supports update on `task_count` field in a job's
245-
// first task group. Other fields will be ignored.
244+
// The `jobs.patch` method can only be used while a job is in the `QUEUED`,
245+
// `SCHEDULED`, or `RUNNING` state and currently only supports increasing the
246+
// value of the first `taskCount` field in the job's `taskGroups` field.
247+
// Therefore, you must set the value of `updateMask` to `taskGroups`. Any
248+
// other job fields in the update request will be ignored.
249+
//
250+
// For example, to update a job's `taskCount` to `2`, set `updateMask` to
251+
// `taskGroups` and use the following request body:
252+
// ```
253+
// {
254+
// "taskGroups":[{
255+
// "taskCount": 2
256+
// }]
257+
// }
258+
// ```
246259
google.protobuf.FieldMask update_mask = 2
247260
[(google.api.field_behavior) = REQUIRED];
248261

google/cloud/batch/v1alpha/job.proto

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,9 +486,9 @@ message AllocationPolicy {
486486
string instance_template = 2;
487487
}
488488

489-
// Set this field true if users want Batch to help fetch drivers from a
490-
// third party location and install them for GPUs specified in
491-
// policy.accelerators or instance_template on their behalf. Default is
489+
// Set this field true if you want Batch to help fetch drivers from a third
490+
// party location and install them for GPUs specified in
491+
// `policy.accelerators` or `instance_template` on your behalf. Default is
492492
// false.
493493
//
494494
// For Container-Optimized Image cases, Batch will install the
@@ -497,6 +497,10 @@ message AllocationPolicy {
497497
// non Container-Optimized Image cases, following
498498
// https://github.com/GoogleCloudPlatform/compute-gpu-installation/blob/main/linux/install_gpu_driver.py.
499499
bool install_gpu_drivers = 3;
500+
501+
// Optional. Set this field true if you want Batch to install Ops Agent on
502+
// your behalf. Default is false.
503+
bool install_ops_agent = 4 [(google.api.field_behavior) = OPTIONAL];
500504
}
501505

502506
// A network interface.

google/cloud/batch/v1alpha/task.proto

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,11 @@ message TaskExecution {
113113
// due to the following reasons, the exit code will be 50000.
114114
//
115115
// Otherwise, it can be from different sources:
116-
// - Batch known failures as
116+
// * Batch known failures:
117117
// https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
118-
// - Batch runnable execution failures: You can rely on Batch logs for further
119-
// diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs.
120-
// If there are multiple runnables failures, Batch only exposes the first
121-
// error caught for now.
118+
// * Batch runnable execution failures; you can rely on Batch logs to further
119+
// diagnose: https://cloud.google.com/batch/docs/analyze-job-using-logs. If
120+
// there are multiple runnables failures, Batch only exposes the first error.
122121
int32 exit_code = 1;
123122

124123
// Optional. The tail end of any content written to standard error by the task
@@ -360,10 +359,15 @@ message TaskSpec {
360359
// ComputeResource requirements.
361360
ComputeResource compute_resource = 3;
362361

363-
// Maximum duration the task should run.
364-
// The task will be killed and marked as FAILED if over this limit.
365-
// The valid value range for max_run_duration in seconds is [0,
366-
// 315576000000.999999999],
362+
// Maximum duration the task should run before being automatically retried
363+
// (if enabled) or automatically failed. Format the value of this field
364+
// as a time limit in seconds followed by `s`—for example, `3600s`
365+
// for 1 hour. The field accepts any value between 0 and the maximum listed
366+
// for the `Duration` field type at
367+
// https://protobuf.dev/reference/protobuf/google.protobuf/#duration; however,
368+
// the actual maximum run time for a job will be limited to the maximum run
369+
// time for a job listed at
370+
// https://cloud.google.com/batch/quotas#max-job-duration.
367371
google.protobuf.Duration max_run_duration = 4;
368372

369373
// Maximum number of retries on failures.

0 commit comments

Comments
 (0)