Skip to content

Commit 49494bd

Browse files
authored
chore(model): update public deploy/undeploy to change desire state only (#194)
Because - adopt changes in `model-backend` that public deploy/undeploy only change the desire state of the model This commit - update public deploy/undeploy response to be `model`
1 parent 0ba22d8 commit 49494bd

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

model/model/v1alpha/model.proto

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,9 @@ message DeployModelRequest {
336336

337337
// DeployModelResponse represents a response for a deployed model
338338
message DeployModelResponse {
339-
// Deploy operation message
340-
google.longrunning.Operation operation = 1;
339+
// Deployed model's id
340+
// Format: models/{model}
341+
string model_id = 1;
341342
}
342343

343344
// UndeployModelRequest represents a request to undeploy a model to offline
@@ -353,8 +354,9 @@ message UndeployModelRequest {
353354

354355
// UndeployModelResponse represents a response for a undeployed model
355356
message UndeployModelResponse {
356-
// Undeploy operation message
357-
google.longrunning.Operation operation = 1;
357+
// Undeployed model's id
358+
// Format: models/{model}
359+
string model_id = 1;
358360
}
359361

360362
// GetModelCardRequest represents a request to query a model's README card

openapiv2/openapiv2.swagger.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4621,9 +4621,11 @@ definitions:
46214621
v1alphaDeployModelResponse:
46224622
type: object
46234623
properties:
4624-
operation:
4625-
$ref: '#/definitions/googlelongrunningOperation'
4626-
title: Deploy operation message
4624+
model_id:
4625+
type: string
4626+
title: |-
4627+
Deployed model's id
4628+
Format: models/{model}
46274629
title: DeployModelResponse represents a response for a deployed model
46284630
v1alphaDetectionInput:
46294631
type: object
@@ -6994,9 +6996,11 @@ definitions:
69946996
v1alphaUndeployModelResponse:
69956997
type: object
69966998
properties:
6997-
operation:
6998-
$ref: '#/definitions/googlelongrunningOperation'
6999-
title: Undeploy operation message
6999+
model_id:
7000+
type: string
7001+
title: |-
7002+
Undeployed model's id
7003+
Format: models/{model}
70007004
title: UndeployModelResponse represents a response for a undeployed model
70017005
v1alphaUnpublishModelResponse:
70027006
type: object

0 commit comments

Comments
 (0)