Skip to content

Commit

Permalink
docs: [google-cloud-batch] clarify tasks success criteria for backgro…
Browse files Browse the repository at this point in the history
…und 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Aug 20, 2024
1 parent 3014fab commit e3a6b17
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.17.25" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.17.25" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
46 changes: 27 additions & 19 deletions packages/google-cloud-batch/google/cloud/batch_v1/types/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,26 @@ class Runnable(proto.Message):
to understand the logs. If not provided the
index of the runnable will be used for outputs.
ignore_exit_status (bool):
Normally, a non-zero exit status causes the
Task to fail. This flag allows execution of
other Runnables to continue instead.
Normally, a runnable that returns a non-zero exit status
fails and causes the task to fail. However, you can set this
field to ``true`` to allow the task to continue executing
its other runnables even if this runnable fails.
background (bool):
This flag allows a Runnable to continue
running in the background while the Task
executes subsequent Runnables. This is useful to
provide services to other Runnables (or to
provide debugging support tools like SSH
servers).
Normally, a runnable that doesn't exit causes its task to
fail. However, you can set this field to ``true`` to
configure a background runnable. Background runnables are
allowed continue running in the background while the task
executes subsequent runnables. For example, background
runnables are useful for providing services to other
runnables or providing debugging-support tools like SSH
servers.
Specifically, background runnables are killed automatically
(if they have not already exited) a short time after all
foreground runnables have completed. Even though this is
likely to result in a non-zero exit status for the
background runnable, these automatic kills are not treated
as task failures.
always_run (bool):
By default, after a Runnable fails, no further Runnable are
executed. This flag indicates that this Runnable must be run
Expand Down Expand Up @@ -567,16 +577,14 @@ class TaskSpec(proto.Message):
scripts, executable containers, and/or barriers) for each
task in this task group to run. Each task runs this list of
runnables in order. For a task to succeed, all of its script
and container runnables each must either exit with a zero
status or enable the ``ignore_exit_status`` subfield and
exit with any status.
Background runnables are killed automatically (if they have
not already exited) a short time after all foreground
runnables have completed. Even though this is likely to
result in a non-zero exit status for the background
runnable, these automatic kills are not treated as Task
failures.
and container runnables each must meet at least one of the
following conditions:
- The runnable exited with a zero status.
- The runnable didn't finish, but you enabled its
``background`` subfield.
- The runnable exited with a non-zero status, but you
enabled its ``ignore_exit_status`` subfield.
compute_resource (google.cloud.batch_v1.types.ComputeResource):
ComputeResource requirements.
max_run_duration (google.protobuf.duration_pb2.Duration):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.17.25" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -305,16 +305,26 @@ class Runnable(proto.Message):
to understand the logs. If not provided the
index of the runnable will be used for outputs.
ignore_exit_status (bool):
Normally, a non-zero exit status causes the
Task to fail. This flag allows execution of
other Runnables to continue instead.
Normally, a runnable that returns a non-zero exit status
fails and causes the task to fail. However, you can set this
field to ``true`` to allow the task to continue executing
its other runnables even if this runnable fails.
background (bool):
This flag allows a Runnable to continue
running in the background while the Task
executes subsequent Runnables. This is useful to
provide services to other Runnables (or to
provide debugging support tools like SSH
servers).
Normally, a runnable that doesn't exit causes its task to
fail. However, you can set this field to ``true`` to
configure a background runnable. Background runnables are
allowed continue running in the background while the task
executes subsequent runnables. For example, background
runnables are useful for providing services to other
runnables or providing debugging-support tools like SSH
servers.
Specifically, background runnables are killed automatically
(if they have not already exited) a short time after all
foreground runnables have completed. Even though this is
likely to result in a non-zero exit status for the
background runnable, these automatic kills are not treated
as task failures.
always_run (bool):
By default, after a Runnable fails, no further Runnable are
executed. This flag indicates that this Runnable must be run
Expand Down Expand Up @@ -607,16 +617,14 @@ class TaskSpec(proto.Message):
scripts, executable containers, and/or barriers) for each
task in this task group to run. Each task runs this list of
runnables in order. For a task to succeed, all of its script
and container runnables each must either exit with a zero
status or enable the ``ignore_exit_status`` subfield and
exit with any status.
Background runnables are killed automatically (if they have
not already exited) a short time after all foreground
runnables have completed. Even though this is likely to
result in a non-zero exit status for the background
runnable, these automatic kills are not treated as Task
failures.
and container runnables each must meet at least one of the
following conditions:
- The runnable exited with a zero status.
- The runnable didn't finish, but you enabled its
``background`` subfield.
- The runnable exited with a non-zero status, but you
enabled its ``ignore_exit_status`` subfield.
compute_resource (google.cloud.batch_v1alpha.types.ComputeResource):
ComputeResource requirements.
max_run_duration (google.protobuf.duration_pb2.Duration):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-batch",
"version": "0.17.25"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-batch",
"version": "0.17.25"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit e3a6b17

Please sign in to comment.