Skip to content

Commit e3a6b17

Browse files
docs: [google-cloud-batch] clarify tasks success criteria for background runnable (#13023)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 665192663 Source-Link: googleapis/googleapis@07ede94 Source-Link: googleapis/googleapis-gen@d88a093 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiJkODhhMDkzYjQwMGUxYmExYjdjMmQ2NjZjZWYyZGU5NDE1MmJiMjEyIn0= BEGIN_NESTED_COMMIT docs: [google-cloud-batch] clarify tasks success criteria for background runnable PiperOrigin-RevId: 665192495 Source-Link: googleapis/googleapis@d7f3478 Source-Link: googleapis/googleapis-gen@66d372d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiI2NmQzNzJkN2M3ODhiYzkxYjIyMTY2ZWRhNjMyZTIxMGFjZjk4NjZkIn0= END_NESTED_COMMIT --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 3014fab commit e3a6b17

File tree

7 files changed

+59
-43
lines changed

7 files changed

+59
-43
lines changed

packages/google-cloud-batch/google/cloud/batch/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.17.25" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-batch/google/cloud/batch_v1/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.17.25" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

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

+27-19
Original file line numberDiff line numberDiff line change
@@ -265,16 +265,26 @@ class Runnable(proto.Message):
265265
to understand the logs. If not provided the
266266
index of the runnable will be used for outputs.
267267
ignore_exit_status (bool):
268-
Normally, a non-zero exit status causes the
269-
Task to fail. This flag allows execution of
270-
other Runnables to continue instead.
268+
Normally, a runnable that returns a non-zero exit status
269+
fails and causes the task to fail. However, you can set this
270+
field to ``true`` to allow the task to continue executing
271+
its other runnables even if this runnable fails.
271272
background (bool):
272-
This flag allows a Runnable to continue
273-
running in the background while the Task
274-
executes subsequent Runnables. This is useful to
275-
provide services to other Runnables (or to
276-
provide debugging support tools like SSH
277-
servers).
273+
Normally, a runnable that doesn't exit causes its task to
274+
fail. However, you can set this field to ``true`` to
275+
configure a background runnable. Background runnables are
276+
allowed continue running in the background while the task
277+
executes subsequent runnables. For example, background
278+
runnables are useful for providing services to other
279+
runnables or providing debugging-support tools like SSH
280+
servers.
281+
282+
Specifically, background runnables are killed automatically
283+
(if they have not already exited) a short time after all
284+
foreground runnables have completed. Even though this is
285+
likely to result in a non-zero exit status for the
286+
background runnable, these automatic kills are not treated
287+
as task failures.
278288
always_run (bool):
279289
By default, after a Runnable fails, no further Runnable are
280290
executed. This flag indicates that this Runnable must be run
@@ -567,16 +577,14 @@ class TaskSpec(proto.Message):
567577
scripts, executable containers, and/or barriers) for each
568578
task in this task group to run. Each task runs this list of
569579
runnables in order. For a task to succeed, all of its script
570-
and container runnables each must either exit with a zero
571-
status or enable the ``ignore_exit_status`` subfield and
572-
exit with any status.
573-
574-
Background runnables are killed automatically (if they have
575-
not already exited) a short time after all foreground
576-
runnables have completed. Even though this is likely to
577-
result in a non-zero exit status for the background
578-
runnable, these automatic kills are not treated as Task
579-
failures.
580+
and container runnables each must meet at least one of the
581+
following conditions:
582+
583+
- The runnable exited with a zero status.
584+
- The runnable didn't finish, but you enabled its
585+
``background`` subfield.
586+
- The runnable exited with a non-zero status, but you
587+
enabled its ``ignore_exit_status`` subfield.
580588
compute_resource (google.cloud.batch_v1.types.ComputeResource):
581589
ComputeResource requirements.
582590
max_run_duration (google.protobuf.duration_pb2.Duration):

packages/google-cloud-batch/google/cloud/batch_v1alpha/gapic_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "0.17.25" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

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

+27-19
Original file line numberDiff line numberDiff line change
@@ -305,16 +305,26 @@ class Runnable(proto.Message):
305305
to understand the logs. If not provided the
306306
index of the runnable will be used for outputs.
307307
ignore_exit_status (bool):
308-
Normally, a non-zero exit status causes the
309-
Task to fail. This flag allows execution of
310-
other Runnables to continue instead.
308+
Normally, a runnable that returns a non-zero exit status
309+
fails and causes the task to fail. However, you can set this
310+
field to ``true`` to allow the task to continue executing
311+
its other runnables even if this runnable fails.
311312
background (bool):
312-
This flag allows a Runnable to continue
313-
running in the background while the Task
314-
executes subsequent Runnables. This is useful to
315-
provide services to other Runnables (or to
316-
provide debugging support tools like SSH
317-
servers).
313+
Normally, a runnable that doesn't exit causes its task to
314+
fail. However, you can set this field to ``true`` to
315+
configure a background runnable. Background runnables are
316+
allowed continue running in the background while the task
317+
executes subsequent runnables. For example, background
318+
runnables are useful for providing services to other
319+
runnables or providing debugging-support tools like SSH
320+
servers.
321+
322+
Specifically, background runnables are killed automatically
323+
(if they have not already exited) a short time after all
324+
foreground runnables have completed. Even though this is
325+
likely to result in a non-zero exit status for the
326+
background runnable, these automatic kills are not treated
327+
as task failures.
318328
always_run (bool):
319329
By default, after a Runnable fails, no further Runnable are
320330
executed. This flag indicates that this Runnable must be run
@@ -607,16 +617,14 @@ class TaskSpec(proto.Message):
607617
scripts, executable containers, and/or barriers) for each
608618
task in this task group to run. Each task runs this list of
609619
runnables in order. For a task to succeed, all of its script
610-
and container runnables each must either exit with a zero
611-
status or enable the ``ignore_exit_status`` subfield and
612-
exit with any status.
613-
614-
Background runnables are killed automatically (if they have
615-
not already exited) a short time after all foreground
616-
runnables have completed. Even though this is likely to
617-
result in a non-zero exit status for the background
618-
runnable, these automatic kills are not treated as Task
619-
failures.
620+
and container runnables each must meet at least one of the
621+
following conditions:
622+
623+
- The runnable exited with a zero status.
624+
- The runnable didn't finish, but you enabled its
625+
``background`` subfield.
626+
- The runnable exited with a non-zero status, but you
627+
enabled its ``ignore_exit_status`` subfield.
620628
compute_resource (google.cloud.batch_v1alpha.types.ComputeResource):
621629
ComputeResource requirements.
622630
max_run_duration (google.protobuf.duration_pb2.Duration):

packages/google-cloud-batch/samples/generated_samples/snippet_metadata_google.cloud.batch.v1.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-batch",
11-
"version": "0.17.25"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-batch/samples/generated_samples/snippet_metadata_google.cloud.batch.v1alpha.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-batch",
11-
"version": "0.17.25"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)