Skip to content

Commit 00ed8aa

Browse files
Google APIscopybara-github
authored andcommitted
docs: Refine usage scope for fields task_execution and task_state in StatusEvent
PiperOrigin-RevId: 659685089
1 parent db79b1a commit 00ed8aa

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

google/cloud/batch/v1/batch_v1_grpc_service_config.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
{ "service": "google.cloud.batch.v1.BatchService", "method": "ListJobs" },
55
{ "service": "google.cloud.batch.v1.BatchService", "method": "ListTasks" },
66
{ "service": "google.cloud.batch.v1.BatchService", "method": "ListResourceAllowances" },
7+
{ "service": "google.cloud.batch.v1.BatchService", "method": "ListNodePools" },
78
{ "service": "google.cloud.batch.v1.BatchService", "method": "GetJob" },
89
{ "service": "google.cloud.batch.v1.BatchService", "method": "GetTask" },
9-
{ "service": "google.cloud.batch.v1.BatchService", "method": "GetResourceAllowance" }
10+
{ "service": "google.cloud.batch.v1.BatchService", "method": "GetResourceAllowance" },
11+
{ "service": "google.cloud.batch.v1.BatchService", "method": "GetNodePool" }
1012
],
1113
"timeout": "60s",
1214
"retryPolicy": {
@@ -26,7 +28,9 @@
2628
{ "service": "google.cloud.batch.v1.BatchService", "method": "CreateResourceAllowance" },
2729
{ "service": "google.cloud.batch.v1.BatchService", "method": "DeleteResourceAllowance" },
2830
{ "service": "google.cloud.batch.v1.BatchService", "method": "UpdateResourceAllowance"},
29-
{ "service": "google.cloud.batch.v1.BatchService", "method": "CancelTasks"}
31+
{ "service": "google.cloud.batch.v1.BatchService", "method": "CancelTasks"},
32+
{ "service": "google.cloud.batch.v1.BatchService", "method": "CreateNodePool" },
33+
{ "service": "google.cloud.batch.v1.BatchService", "method": "DeleteNodePool" }
3034
],
3135
"timeout": "60s"
3236
}]

google/cloud/batch/v1/task.proto

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ message ComputeResource {
8181
int64 boot_disk_mib = 4;
8282
}
8383

84-
// Status event
84+
// Status event.
8585
message StatusEvent {
8686
// Type of the event.
8787
string type = 3;
@@ -92,10 +92,13 @@ message StatusEvent {
9292
// The time this event occurred.
9393
google.protobuf.Timestamp event_time = 2;
9494

95-
// Task Execution
95+
// Task Execution.
96+
// This field is only defined for task-level status events where the task
97+
// fails.
9698
TaskExecution task_execution = 4;
9799

98-
// Task State
100+
// Task State.
101+
// This field is only defined for task-level status events.
99102
TaskStatus.State task_state = 5;
100103
}
101104

@@ -116,7 +119,7 @@ message TaskExecution {
116119
int32 exit_code = 1;
117120
}
118121

119-
// Status of a task
122+
// Status of a task.
120123
message TaskStatus {
121124
// Task states.
122125
enum State {
@@ -142,7 +145,7 @@ message TaskStatus {
142145
UNEXECUTED = 6;
143146
}
144147

145-
// Task state
148+
// Task state.
146149
State state = 1;
147150

148151
// Detailed info about why the state is reached.

0 commit comments

Comments
 (0)