Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.10.18" # {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.10.18" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
33 changes: 28 additions & 5 deletions packages/google-cloud-run/google/cloud/run_v2/types/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ def raw_page(self):
class Task(proto.Message):
r"""Task represents a single run of a container to completion.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes:
name (str):
Output only. The unique name of this Task.
Expand Down Expand Up @@ -252,6 +254,11 @@ class Task(proto.Message):
Output only. Reserved for future use.
node_selector (google.cloud.run_v2.types.NodeSelector):
Output only. The node selector for the task.
gpu_zonal_redundancy_disabled (bool):
Optional. Output only. True if GPU zonal
redundancy is disabled on this task.

This field is a member of `oneof`_ ``_gpu_zonal_redundancy_disabled``.
etag (str):
Output only. A system-generated fingerprint
for this version of the resource. May be used to
Expand Down Expand Up @@ -399,6 +406,11 @@ class Task(proto.Message):
number=36,
message=vendor_settings.NodeSelector,
)
gpu_zonal_redundancy_disabled: bool = proto.Field(
proto.BOOL,
number=37,
optional=True,
)
etag: str = proto.Field(
proto.STRING,
number=99,
Expand All @@ -414,11 +426,18 @@ class TaskAttemptResult(proto.Message):
If the status code is OK, then the attempt
succeeded.
exit_code (int):
Output only. The exit code of this attempt.
This may be unset if the container was unable to
exit cleanly with a code due to some other
failure.
See status field for possible failure details.
Output only. The exit code of this attempt. This may be
unset if the container was unable to exit cleanly with a
code due to some other failure. See status field for
possible failure details.

At most one of exit_code or term_signal will be set.
term_signal (int):
Output only. Termination signal of the container. This is
set to non-zero if the container is terminated by the
system.

At most one of exit_code or term_signal will be set.
"""

status: status_pb2.Status = proto.Field(
Expand All @@ -430,6 +449,10 @@ class TaskAttemptResult(proto.Message):
proto.INT32,
number=2,
)
term_signal: int = proto.Field(
proto.INT32,
number=3,
)


__all__ = tuple(sorted(__protobuf__.manifest))
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ class TaskTemplate(proto.Message):
node_selector (google.cloud.run_v2.types.NodeSelector):
Optional. The node selector for the task
template.
gpu_zonal_redundancy_disabled (bool):
Optional. True if GPU zonal redundancy is
disabled on this task template.

This field is a member of `oneof`_ ``_gpu_zonal_redundancy_disabled``.
"""

containers: MutableSequence[k8s_min.Container] = proto.RepeatedField(
Expand Down Expand Up @@ -123,6 +128,11 @@ class TaskTemplate(proto.Message):
number=11,
message=vendor_settings.NodeSelector,
)
gpu_zonal_redundancy_disabled: bool = proto.Field(
proto.BOOL,
number=12,
optional=True,
)


__all__ = tuple(sorted(__protobuf__.manifest))
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-run",
"version": "0.10.18"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6353,6 +6353,7 @@ def test_create_job_rest_call_success(request_type):
],
},
"node_selector": {"accelerator": "accelerator_value"},
"gpu_zonal_redundancy_disabled": True,
},
},
"observed_generation": 2021,
Expand Down Expand Up @@ -6960,6 +6961,7 @@ def test_update_job_rest_call_success(request_type):
],
},
"node_selector": {"accelerator": "accelerator_value"},
"gpu_zonal_redundancy_disabled": True,
},
},
"observed_generation": 2021,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,7 @@ def test_get_task(request_type, transport: str = "grpc"):
encryption_key="encryption_key_value",
log_uri="log_uri_value",
satisfies_pzs=True,
gpu_zonal_redundancy_disabled=True,
etag="etag_value",
)
response = client.get_task(request)
Expand Down Expand Up @@ -1108,6 +1109,7 @@ def test_get_task(request_type, transport: str = "grpc"):
assert response.encryption_key == "encryption_key_value"
assert response.log_uri == "log_uri_value"
assert response.satisfies_pzs is True
assert response.gpu_zonal_redundancy_disabled is True
assert response.etag == "etag_value"


Expand Down Expand Up @@ -1247,6 +1249,7 @@ async def test_get_task_async(
encryption_key="encryption_key_value",
log_uri="log_uri_value",
satisfies_pzs=True,
gpu_zonal_redundancy_disabled=True,
etag="etag_value",
)
)
Expand Down Expand Up @@ -1278,6 +1281,7 @@ async def test_get_task_async(
assert response.encryption_key == "encryption_key_value"
assert response.log_uri == "log_uri_value"
assert response.satisfies_pzs is True
assert response.gpu_zonal_redundancy_disabled is True
assert response.etag == "etag_value"


Expand Down Expand Up @@ -2569,6 +2573,7 @@ async def test_get_task_empty_call_grpc_asyncio():
encryption_key="encryption_key_value",
log_uri="log_uri_value",
satisfies_pzs=True,
gpu_zonal_redundancy_disabled=True,
etag="etag_value",
)
)
Expand Down Expand Up @@ -2678,6 +2683,7 @@ def test_get_task_rest_call_success(request_type):
encryption_key="encryption_key_value",
log_uri="log_uri_value",
satisfies_pzs=True,
gpu_zonal_redundancy_disabled=True,
etag="etag_value",
)

Expand Down Expand Up @@ -2713,6 +2719,7 @@ def test_get_task_rest_call_success(request_type):
assert response.encryption_key == "encryption_key_value"
assert response.log_uri == "log_uri_value"
assert response.satisfies_pzs is True
assert response.gpu_zonal_redundancy_disabled is True
assert response.etag == "etag_value"


Expand Down
Loading