Skip to content

Commit f149fb8

Browse files
docs: [google-cloud-batch] Refine description for field task_execution (#12693)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 633367898 Source-Link: googleapis/googleapis@7e73d48 Source-Link: googleapis/googleapis-gen@7a9547f Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiI3YTk1NDdmYmEwNjdmYTNiNDU3ZmI5YWEyOTY4NmNiNWI2MDhkOTMwIn0= BEGIN_NESTED_COMMIT docs: [google-cloud-batch] Refine description for field `task_execution` PiperOrigin-RevId: 633294486 Source-Link: googleapis/googleapis@d9fe642 Source-Link: googleapis/googleapis-gen@fd49345 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiJmZDQ5MzQ1OTI2Y2FhMDNmYTJhMjUyMTRkODNlMDZiM2JjMzU3NTA5In0= END_NESTED_COMMIT --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent f66440d commit f149fb8

2 files changed

Lines changed: 32 additions & 6 deletions

File tree

  • packages/google-cloud-batch/google/cloud

packages/google-cloud-batch/google/cloud/batch_v1/types/task.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,22 @@ class TaskExecution(proto.Message):
155155
156156
Attributes:
157157
exit_code (int):
158-
When task is completed as the status of
159-
FAILED or SUCCEEDED, exit code is for one task
160-
execution result, default is 0 as success.
158+
The exit code of a finished task.
159+
160+
If the task succeeded, the exit code will be 0.
161+
If the task failed but not due to the following
162+
reasons, the exit code will be 50000.
163+
164+
Otherwise, it can be from different sources:
165+
166+
- Batch known failures as
167+
https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
168+
- Batch runnable execution failures: You can
169+
rely on Batch logs for further diagnose:
170+
https://cloud.google.com/batch/docs/analyze-job-using-logs.
171+
If there are multiple runnables failures,
172+
Batch only exposes the first error caught for
173+
now.
161174
"""
162175

163176
exit_code: int = proto.Field(

packages/google-cloud-batch/google/cloud/batch_v1alpha/types/task.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,22 @@ class TaskExecution(proto.Message):
164164
165165
Attributes:
166166
exit_code (int):
167-
When task is completed as the status of
168-
FAILED or SUCCEEDED, exit code is for one task
169-
execution result, default is 0 as success.
167+
The exit code of a finished task.
168+
169+
If the task succeeded, the exit code will be 0.
170+
If the task failed but not due to the following
171+
reasons, the exit code will be 50000.
172+
173+
Otherwise, it can be from different sources:
174+
175+
- Batch known failures as
176+
https://cloud.google.com/batch/docs/troubleshooting#reserved-exit-codes.
177+
- Batch runnable execution failures: You can
178+
rely on Batch logs for further diagnose:
179+
https://cloud.google.com/batch/docs/analyze-job-using-logs.
180+
If there are multiple runnables failures,
181+
Batch only exposes the first error caught for
182+
now.
170183
stderr_snippet (str):
171184
Optional. The tail end of any content written
172185
to standard error by the task execution. This

0 commit comments

Comments
 (0)