Skip to content

Commit 47ab1c3

Browse files
feat: [tpu] Add MultisliceNode (#4308)
- [ ] Regenerate this pull request now. --- feat: Enable Force on DeleteQueuedResource PiperOrigin-RevId: 536935689 Source-Link: https://togithub.com/googleapis/googleapis/commit/5649269b4e6d024f45287e1610fb479cf4e726a8 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/9562345a095887618b945a5a7b671a2ad8a8536a Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXRwdS8uT3dsQm90LnlhbWwiLCJoIjoiOTU2MjM0NWEwOTU4ODc2MThiOTQ1YTVhN2I2NzFhMmFkOGE4NTM2YSJ9
1 parent 89c2be8 commit 47ab1c3

7 files changed

Lines changed: 98 additions & 1 deletion

File tree

packages/google-cloud-tpu/protos/google/cloud/tpu/v2alpha1/cloud_tpu.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,9 @@ message Node {
525525

526526
// Shielded Instance options.
527527
ShieldedInstanceConfig shielded_instance_config = 45;
528+
529+
// Output only. Whether the Node belongs to a Multislice group.
530+
bool multislice_node = 47 [(google.api.field_behavior) = OUTPUT_ONLY];
528531
}
529532

530533
// A QueuedResource represents a request for resources that will be placed
@@ -912,6 +915,13 @@ message DeleteQueuedResourceRequest {
912915

913916
// Idempotent request UUID.
914917
string request_id = 2;
918+
919+
// If set to true, all running nodes belonging to this queued resource will
920+
// be deleted first and then the queued resource will be deleted.
921+
// Otherwise (i.e. force=false), the queued resource will only be deleted if
922+
// its nodes have already been deleted or the queued resource is in the
923+
// ACCEPTED, FAILED, or SUSPENDED state.
924+
bool force = 3;
915925
}
916926

917927
// The per-product per-project service identity for Cloud TPU service.

packages/google-cloud-tpu/protos/protos.d.ts

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-tpu/protos/protos.js

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-tpu/protos/protos.json

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-tpu/samples/generated/v2alpha1/snippet_metadata.google.cloud.tpu.v2alpha1.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@
470470
"segments": [
471471
{
472472
"start": 25,
473-
"end": 58,
473+
"end": 66,
474474
"type": "FULL"
475475
}
476476
],
@@ -486,6 +486,10 @@
486486
{
487487
"name": "request_id",
488488
"type": "TYPE_STRING"
489+
},
490+
{
491+
"name": "force",
492+
"type": "TYPE_BOOL"
489493
}
490494
],
491495
"resultType": ".google.longrunning.Operation",

packages/google-cloud-tpu/samples/generated/v2alpha1/tpu.delete_queued_resource.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ function main(name) {
3636
* Idempotent request UUID.
3737
*/
3838
// const requestId = 'abc123'
39+
/**
40+
* If set to true, all running nodes belonging to this queued resource will
41+
* be deleted first and then the queued resource will be deleted.
42+
* Otherwise (i.e. force=false), the queued resource will only be deleted if
43+
* its nodes have already been deleted or the queued resource is in the
44+
* ACCEPTED, FAILED, or SUSPENDED state.
45+
*/
46+
// const force = true
3947

4048
// Imports the Tpu library
4149
const {TpuClient} = require('@google-cloud/tpu').v2alpha1;

packages/google-cloud-tpu/src/v2alpha1/tpu_client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,6 +1936,12 @@ export class TpuClient {
19361936
* Required. The resource name.
19371937
* @param {string} request.requestId
19381938
* Idempotent request UUID.
1939+
* @param {boolean} request.force
1940+
* If set to true, all running nodes belonging to this queued resource will
1941+
* be deleted first and then the queued resource will be deleted.
1942+
* Otherwise (i.e. force=false), the queued resource will only be deleted if
1943+
* its nodes have already been deleted or the queued resource is in the
1944+
* ACCEPTED, FAILED, or SUSPENDED state.
19391945
* @param {object} [options]
19401946
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
19411947
* @returns {Promise} - The promise which resolves to an array.

0 commit comments

Comments
 (0)