From 39e65cbbe8c09020d6d33a2b6864de17ec58ef51 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 14:43:01 -0700 Subject: [PATCH] feat: add max_wait_duration to Scheduling (#5642) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add max_wait_duration to Scheduling PiperOrigin-RevId: 668122347 Source-Link: https://github.com/googleapis/googleapis/commit/aee11eedca934535f08b3edea46ea309d201a154 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1b66c1cd1a4d87d02df205a2629ae99069063d7e Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjFiNjZjMWNkMWE0ZDg3ZDAyZGYyMDVhMjYyOWFlOTkwNjkwNjNkN2UifQ== * feat: add max_wait_duration to Scheduling PiperOrigin-RevId: 668122422 Source-Link: https://github.com/googleapis/googleapis/commit/8b2adf3f686a77297f38d9a810d9910c8fdfca98 Source-Link: https://github.com/googleapis/googleapis-gen/commit/92a8ccf052f48727d252dc2f3e00fd98354d04f6 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjkyYThjY2YwNTJmNDg3MjdkMjUyZGMyZjNlMDBmZDk4MzU0ZDA0ZjYifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../cloud/aiplatform/v1/custom_job.proto | 7 +++ .../cloud/aiplatform/v1beta1/custom_job.proto | 7 +++ .../protos/protos.d.ts | 12 ++++ .../google-cloud-aiplatform/protos/protos.js | 56 +++++++++++++++++++ .../protos/protos.json | 14 +++++ 5 files changed, 96 insertions(+) diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/custom_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/custom_job.proto index 0cfeb63f297..fd4d146e5fe 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/custom_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/custom_job.proto @@ -394,4 +394,11 @@ message Scheduling { // job starts running. If true, overrides // `Scheduling.restart_job_on_worker_restart` to false. bool disable_retries = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This is the maximum duration that a job will wait for the + // requested resources to be provisioned if the scheduling strategy is set to + // [Strategy.DWS_FLEX_START]. + // If set to 0, the job will wait indefinitely. The default is 24 hours. + google.protobuf.Duration max_wait_duration = 6 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/custom_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/custom_job.proto index 405dd8480c3..5ad6c69f4bd 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/custom_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/custom_job.proto @@ -394,4 +394,11 @@ message Scheduling { // job starts running. If true, overrides // `Scheduling.restart_job_on_worker_restart` to false. bool disable_retries = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This is the maximum duration that a job will wait for the + // requested resources to be provisioned if the scheduling strategy is set to + // [Strategy.DWS_FLEX_START]. + // If set to 0, the job will wait indefinitely. The default is 24 hours. + google.protobuf.Duration max_wait_duration = 6 + [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-aiplatform/protos/protos.d.ts b/packages/google-cloud-aiplatform/protos/protos.d.ts index 60fa419c568..7fbdf09a27c 100644 --- a/packages/google-cloud-aiplatform/protos/protos.d.ts +++ b/packages/google-cloud-aiplatform/protos/protos.d.ts @@ -13276,6 +13276,9 @@ export namespace google { /** Scheduling disableRetries */ disableRetries?: (boolean|null); + + /** Scheduling maxWaitDuration */ + maxWaitDuration?: (google.protobuf.IDuration|null); } /** Represents a Scheduling. */ @@ -13299,6 +13302,9 @@ export namespace google { /** Scheduling disableRetries. */ public disableRetries: boolean; + /** Scheduling maxWaitDuration. */ + public maxWaitDuration?: (google.protobuf.IDuration|null); + /** * Creates a new Scheduling instance using the specified properties. * @param [properties] Properties to set @@ -136730,6 +136736,9 @@ export namespace google { /** Scheduling disableRetries */ disableRetries?: (boolean|null); + + /** Scheduling maxWaitDuration */ + maxWaitDuration?: (google.protobuf.IDuration|null); } /** Represents a Scheduling. */ @@ -136753,6 +136762,9 @@ export namespace google { /** Scheduling disableRetries. */ public disableRetries: boolean; + /** Scheduling maxWaitDuration. */ + public maxWaitDuration?: (google.protobuf.IDuration|null); + /** * Creates a new Scheduling instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-aiplatform/protos/protos.js b/packages/google-cloud-aiplatform/protos/protos.js index ab5eece88bd..88730fee6fb 100644 --- a/packages/google-cloud-aiplatform/protos/protos.js +++ b/packages/google-cloud-aiplatform/protos/protos.js @@ -35068,6 +35068,7 @@ * @property {boolean|null} [restartJobOnWorkerRestart] Scheduling restartJobOnWorkerRestart * @property {google.cloud.aiplatform.v1.Scheduling.Strategy|null} [strategy] Scheduling strategy * @property {boolean|null} [disableRetries] Scheduling disableRetries + * @property {google.protobuf.IDuration|null} [maxWaitDuration] Scheduling maxWaitDuration */ /** @@ -35117,6 +35118,14 @@ */ Scheduling.prototype.disableRetries = false; + /** + * Scheduling maxWaitDuration. + * @member {google.protobuf.IDuration|null|undefined} maxWaitDuration + * @memberof google.cloud.aiplatform.v1.Scheduling + * @instance + */ + Scheduling.prototype.maxWaitDuration = null; + /** * Creates a new Scheduling instance using the specified properties. * @function create @@ -35149,6 +35158,8 @@ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.strategy); if (message.disableRetries != null && Object.hasOwnProperty.call(message, "disableRetries")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disableRetries); + if (message.maxWaitDuration != null && Object.hasOwnProperty.call(message, "maxWaitDuration")) + $root.google.protobuf.Duration.encode(message.maxWaitDuration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -35199,6 +35210,10 @@ message.disableRetries = reader.bool(); break; } + case 6: { + message.maxWaitDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -35256,6 +35271,11 @@ if (message.disableRetries != null && message.hasOwnProperty("disableRetries")) if (typeof message.disableRetries !== "boolean") return "disableRetries: boolean expected"; + if (message.maxWaitDuration != null && message.hasOwnProperty("maxWaitDuration")) { + var error = $root.google.protobuf.Duration.verify(message.maxWaitDuration); + if (error) + return "maxWaitDuration." + error; + } return null; }; @@ -35308,6 +35328,11 @@ } if (object.disableRetries != null) message.disableRetries = Boolean(object.disableRetries); + if (object.maxWaitDuration != null) { + if (typeof object.maxWaitDuration !== "object") + throw TypeError(".google.cloud.aiplatform.v1.Scheduling.maxWaitDuration: object expected"); + message.maxWaitDuration = $root.google.protobuf.Duration.fromObject(object.maxWaitDuration); + } return message; }; @@ -35329,6 +35354,7 @@ object.restartJobOnWorkerRestart = false; object.strategy = options.enums === String ? "STRATEGY_UNSPECIFIED" : 0; object.disableRetries = false; + object.maxWaitDuration = null; } if (message.timeout != null && message.hasOwnProperty("timeout")) object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); @@ -35338,6 +35364,8 @@ object.strategy = options.enums === String ? $root.google.cloud.aiplatform.v1.Scheduling.Strategy[message.strategy] === undefined ? message.strategy : $root.google.cloud.aiplatform.v1.Scheduling.Strategy[message.strategy] : message.strategy; if (message.disableRetries != null && message.hasOwnProperty("disableRetries")) object.disableRetries = message.disableRetries; + if (message.maxWaitDuration != null && message.hasOwnProperty("maxWaitDuration")) + object.maxWaitDuration = $root.google.protobuf.Duration.toObject(message.maxWaitDuration, options); return object; }; @@ -335361,6 +335389,7 @@ * @property {boolean|null} [restartJobOnWorkerRestart] Scheduling restartJobOnWorkerRestart * @property {google.cloud.aiplatform.v1beta1.Scheduling.Strategy|null} [strategy] Scheduling strategy * @property {boolean|null} [disableRetries] Scheduling disableRetries + * @property {google.protobuf.IDuration|null} [maxWaitDuration] Scheduling maxWaitDuration */ /** @@ -335410,6 +335439,14 @@ */ Scheduling.prototype.disableRetries = false; + /** + * Scheduling maxWaitDuration. + * @member {google.protobuf.IDuration|null|undefined} maxWaitDuration + * @memberof google.cloud.aiplatform.v1beta1.Scheduling + * @instance + */ + Scheduling.prototype.maxWaitDuration = null; + /** * Creates a new Scheduling instance using the specified properties. * @function create @@ -335442,6 +335479,8 @@ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.strategy); if (message.disableRetries != null && Object.hasOwnProperty.call(message, "disableRetries")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.disableRetries); + if (message.maxWaitDuration != null && Object.hasOwnProperty.call(message, "maxWaitDuration")) + $root.google.protobuf.Duration.encode(message.maxWaitDuration, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -335492,6 +335531,10 @@ message.disableRetries = reader.bool(); break; } + case 6: { + message.maxWaitDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -335549,6 +335592,11 @@ if (message.disableRetries != null && message.hasOwnProperty("disableRetries")) if (typeof message.disableRetries !== "boolean") return "disableRetries: boolean expected"; + if (message.maxWaitDuration != null && message.hasOwnProperty("maxWaitDuration")) { + var error = $root.google.protobuf.Duration.verify(message.maxWaitDuration); + if (error) + return "maxWaitDuration." + error; + } return null; }; @@ -335601,6 +335649,11 @@ } if (object.disableRetries != null) message.disableRetries = Boolean(object.disableRetries); + if (object.maxWaitDuration != null) { + if (typeof object.maxWaitDuration !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.Scheduling.maxWaitDuration: object expected"); + message.maxWaitDuration = $root.google.protobuf.Duration.fromObject(object.maxWaitDuration); + } return message; }; @@ -335622,6 +335675,7 @@ object.restartJobOnWorkerRestart = false; object.strategy = options.enums === String ? "STRATEGY_UNSPECIFIED" : 0; object.disableRetries = false; + object.maxWaitDuration = null; } if (message.timeout != null && message.hasOwnProperty("timeout")) object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); @@ -335631,6 +335685,8 @@ object.strategy = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.Scheduling.Strategy[message.strategy] === undefined ? message.strategy : $root.google.cloud.aiplatform.v1beta1.Scheduling.Strategy[message.strategy] : message.strategy; if (message.disableRetries != null && message.hasOwnProperty("disableRetries")) object.disableRetries = message.disableRetries; + if (message.maxWaitDuration != null && message.hasOwnProperty("maxWaitDuration")) + object.maxWaitDuration = $root.google.protobuf.Duration.toObject(message.maxWaitDuration, options); return object; }; diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index 7c439c0193f..f431d2e3fca 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -3743,6 +3743,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "maxWaitDuration": { + "type": "google.protobuf.Duration", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -36556,6 +36563,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "maxWaitDuration": { + "type": "google.protobuf.Duration", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": {