Skip to content

Commit a531af1

Browse files
feat(run): updated total duration type (#425)
Because - FE supports duration in milliseconds better than protobuf duration type This commit - updated total duration type to int in milliseconds --------- Co-authored-by: droplet-bot <[email protected]>
1 parent d33c4ba commit a531af1

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

model/model/v1alpha/model.proto

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import "google/longrunning/operations.proto";
1616
import "google/protobuf/field_mask.proto";
1717
import "google/protobuf/struct.proto";
1818
import "google/protobuf/timestamp.proto";
19-
import "google/protobuf/duration.proto";
2019
// Model definitions
2120
import "model/model/v1alpha/common.proto";
2221
import "model/model/v1alpha/model_definition.proto";
@@ -1750,8 +1749,8 @@ message ModelRun {
17501749
common.run.v1alpha.RunStatus status = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
17511750
// Run source.
17521751
common.run.v1alpha.RunSource source = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
1753-
// Run total duration.
1754-
optional google.protobuf.Duration total_duration = 5 [
1752+
// Run total duration in milliseconds.
1753+
optional int32 total_duration = 5 [
17551754
(google.api.field_behavior) = OUTPUT_ONLY,
17561755
(google.api.field_behavior) = OPTIONAL
17571756
];

model/model/v1alpha/model_public_service.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ service ModelPublicService {
876876
//
877877
// Returns a paginated list of model runs.
878878
rpc ListModelRuns(ListModelRunsRequest) returns (ListModelRunsResponse) {
879-
option (google.api.http) = {get: "/v1beta/namespaces/{namespace_id}/models/{model_id}/runs"};
879+
option (google.api.http) = {get: "/v1alpha/namespaces/{namespace_id}/models/{model_id}/runs"};
880880
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {tags: "Trigger"};
881881
}
882882
}

openapiv2/model/service.swagger.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2463,7 +2463,7 @@ paths:
24632463
tags:
24642464
- Trigger (Deprecated)
24652465
deprecated: true
2466-
/v1beta/namespaces/{namespaceId}/models/{modelId}/runs:
2466+
/v1alpha/namespaces/{namespaceId}/models/{modelId}/runs:
24672467
get:
24682468
summary: List model runs
24692469
description: Returns a paginated list of model runs.
@@ -3906,8 +3906,9 @@ definitions:
39063906
allOf:
39073907
- $ref: '#/definitions/v1alphaRunSource'
39083908
totalDuration:
3909-
type: string
3910-
description: Run total duration.
3909+
type: integer
3910+
format: int32
3911+
description: Run total duration in milliseconds.
39113912
readOnly: true
39123913
endTime:
39133914
type: string

openapiv2/vdp/service.swagger.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5286,8 +5286,9 @@ definitions:
52865286
allOf:
52875287
- $ref: '#/definitions/v1alphaRunStatus'
52885288
totalDuration:
5289-
type: string
5290-
description: Time taken to execute the component.
5289+
type: integer
5290+
format: int32
5291+
description: Time taken to execute the component in milliseconds.
52915292
readOnly: true
52925293
startTime:
52935294
type: string
@@ -6477,8 +6478,9 @@ definitions:
64776478
allOf:
64786479
- $ref: '#/definitions/v1alphaRunSource'
64796480
totalDuration:
6480-
type: string
6481-
description: Time taken to complete the run.
6481+
type: integer
6482+
format: int32
6483+
description: Time taken to complete the run in milliseconds.
64826484
readOnly: true
64836485
requesterId:
64846486
type: string

vdp/pipeline/v1beta/pipeline.proto

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import "google/longrunning/operations.proto";
1414
import "google/protobuf/field_mask.proto";
1515
import "google/protobuf/struct.proto";
1616
import "google/protobuf/timestamp.proto";
17-
import "google/protobuf/duration.proto";
1817
// OpenAPI definition
1918
import "protoc-gen-openapiv2/options/annotations.proto";
2019
// VDP definitions
@@ -2034,8 +2033,8 @@ message PipelineRun {
20342033
// Origin of the run.
20352034
common.run.v1alpha.RunSource source = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
20362035

2037-
// Time taken to complete the run.
2038-
optional google.protobuf.Duration total_duration = 6 [
2036+
// Time taken to complete the run in milliseconds.
2037+
optional int32 total_duration = 6 [
20392038
(google.api.field_behavior) = OUTPUT_ONLY,
20402039
(google.api.field_behavior) = OPTIONAL
20412040
];
@@ -2084,8 +2083,8 @@ message ComponentRun {
20842083
// Completion status of the component.
20852084
common.run.v1alpha.RunStatus status = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
20862085

2087-
// Time taken to execute the component.
2088-
optional google.protobuf.Duration total_duration = 4 [
2086+
// Time taken to execute the component in milliseconds.
2087+
optional int32 total_duration = 4 [
20892088
(google.api.field_behavior) = OUTPUT_ONLY,
20902089
(google.api.field_behavior) = OPTIONAL
20912090
];

0 commit comments

Comments
 (0)