Skip to content

Commit

Permalink
docs: update batch PD interface support (#11760)
Browse files Browse the repository at this point in the history
BEGIN_COMMIT_OVERRIDE
docs: update batch PD interface support
END_COMMIT_OVERRIDE

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 568443956

Source-Link:
googleapis/googleapis@645178b

Source-Link:
googleapis/googleapis-gen@cd6b2a8
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiJjZDZiMmE4NDg1YTVlN2M4NTJkNGRiYmJjMDQzMDBkMGEwNmU4NDg4In0=

BEGIN_NESTED_COMMIT
docs: update batch PD interface support
PiperOrigin-RevId: 568434456

Source-Link:
googleapis/googleapis@298d5a5

Source-Link:
googleapis/googleapis-gen@734d0ff
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJhdGNoLy5Pd2xCb3QueWFtbCIsImgiOiI3MzRkMGZmZTE0NWRlYmYxMTlhZmY5YTBiNmNmNTEzMjk2MmVjZmYxIn0=
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] committed Sep 26, 2023
1 parent 4332e54 commit a300b07
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 45 deletions.
4 changes: 2 additions & 2 deletions packages/google-cloud-batch/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,12 @@ Running System Tests
$ nox -s system

# Run a single system test
$ nox -s system- -- -k <name of test>
$ nox -s system-3.11 -- -k <name of test>


.. note::

System tests are only configured to run under Python.
System tests are only configured to run under Python 3.8, 3.9, 3.10 and 3.11.
For expediency, we do not run them in older versions of Python 3.

This alone will not run the tests. You'll need to change some local
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.0" # {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.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore

Expand Down Expand Up @@ -633,6 +633,7 @@ async def sample_list_jobs():
Returns:
google.cloud.batch_v1.services.batch_service.pagers.ListJobsAsyncPager:
ListJob Response.
Iterating over this object will yield
results and resolve additional pages
automatically.
Expand Down Expand Up @@ -862,6 +863,7 @@ async def sample_list_tasks():
Returns:
google.cloud.batch_v1.services.batch_service.pagers.ListTasksAsyncPager:
ListTasks Response.
Iterating over this object will yield
results and resolve additional pages
automatically.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore

Expand Down Expand Up @@ -901,6 +901,7 @@ def sample_list_jobs():
Returns:
google.cloud.batch_v1.services.batch_service.pagers.ListJobsPager:
ListJob Response.
Iterating over this object will yield
results and resolve additional pages
automatically.
Expand Down Expand Up @@ -1112,6 +1113,7 @@ def sample_list_tasks():
Returns:
google.cloud.batch_v1.services.batch_service.pagers.ListTasksPager:
ListTasks Response.
Iterating over this object will yield
results and resolve additional pages
automatically.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
from google.auth.transport.grpc import SslCredentials # type: ignore
from google.auth.transport.requests import AuthorizedSession # type: ignore
from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.protobuf import json_format
import grpc # type: ignore
from requests import __version__ as requests_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class CreateJobRequest(proto.Message):
know to ignore the request if it has already
been completed. The server will guarantee that
for at least 60 minutes since the first request.
For example, consider a situation where you make
an initial request and the request times out. If
you make the request again with the same request
Expand All @@ -75,6 +76,7 @@ class CreateJobRequest(proto.Message):
so, will ignore the second request. This
prevents clients from accidentally creating
duplicate commitments.
The request ID must be a valid UUID with the
exception that zero UUID is not supported
(00000000-0000-0000-0000-000000000000).
Expand Down Expand Up @@ -128,6 +130,7 @@ class DeleteJobRequest(proto.Message):
know to ignore the request if it has already
been completed. The server will guarantee that
for at least 60 minutes after the first request.
For example, consider a situation where you make
an initial request and the request times out. If
you make the request again with the same request
Expand All @@ -136,6 +139,7 @@ class DeleteJobRequest(proto.Message):
so, will ignore the second request. This
prevents clients from accidentally creating
duplicate commitments.
The request ID must be a valid UUID with the
exception that zero UUID is not supported
(00000000-0000-0000-0000-000000000000).
Expand Down
10 changes: 6 additions & 4 deletions packages/google-cloud-batch/google/cloud/batch_v1/types/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ class ProvisioningModel(proto.Enum):
SPOT VM.
PREEMPTIBLE (3):
Preemptible VM (PVM).
Above SPOT VM is the preferable model for
preemptible VM instances: the old preemptible VM
model (indicated by this field) is the older
Expand Down Expand Up @@ -522,10 +523,11 @@ class Disk(proto.Message):
disk size 30 GB, you can only use this field to make the
disk larger or equal to 30 GB.
disk_interface (str):
Local SSDs are available through both "SCSI"
and "NVMe" interfaces. If not indicated, "NVMe"
will be the default one for local ssds. We only
support "SCSI" for persistent disks now.
Local SSDs are available through both "SCSI" and "NVMe"
interfaces. If not indicated, "NVMe" will be the default one
for local ssds. This field is ignored for persistent disks
as the interface is chosen automatically. See
https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface.
"""

image: str = proto.Field(
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.0" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore

Expand Down Expand Up @@ -633,6 +633,7 @@ async def sample_list_jobs():
Returns:
google.cloud.batch_v1alpha.services.batch_service.pagers.ListJobsAsyncPager:
ListJob Response.
Iterating over this object will yield
results and resolve additional pages
automatically.
Expand Down Expand Up @@ -862,6 +863,7 @@ async def sample_list_tasks():
Returns:
google.cloud.batch_v1alpha.services.batch_service.pagers.ListTasksAsyncPager:
ListTasks Response.
Iterating over this object will yield
results and resolve additional pages
automatically.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from google.api_core import operation # type: ignore
from google.api_core import operation_async # type: ignore
from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore

Expand Down Expand Up @@ -901,6 +901,7 @@ def sample_list_jobs():
Returns:
google.cloud.batch_v1alpha.services.batch_service.pagers.ListJobsPager:
ListJob Response.
Iterating over this object will yield
results and resolve additional pages
automatically.
Expand Down Expand Up @@ -1112,6 +1113,7 @@ def sample_list_tasks():
Returns:
google.cloud.batch_v1alpha.services.batch_service.pagers.ListTasksPager:
ListTasks Response.
Iterating over this object will yield
results and resolve additional pages
automatically.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
from google.auth.transport.grpc import SslCredentials # type: ignore
from google.auth.transport.requests import AuthorizedSession # type: ignore
from google.cloud.location import locations_pb2 # type: ignore
from google.longrunning import operations_pb2
from google.protobuf import json_format
import grpc # type: ignore
from requests import __version__ as requests_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class CreateJobRequest(proto.Message):
know to ignore the request if it has already
been completed. The server will guarantee that
for at least 60 minutes since the first request.
For example, consider a situation where you make
an initial request and the request times out. If
you make the request again with the same request
Expand All @@ -75,6 +76,7 @@ class CreateJobRequest(proto.Message):
so, will ignore the second request. This
prevents clients from accidentally creating
duplicate commitments.
The request ID must be a valid UUID with the
exception that zero UUID is not supported
(00000000-0000-0000-0000-000000000000).
Expand Down Expand Up @@ -128,6 +130,7 @@ class DeleteJobRequest(proto.Message):
know to ignore the request if it has already
been completed. The server will guarantee that
for at least 60 minutes after the first request.
For example, consider a situation where you make
an initial request and the request times out. If
you make the request again with the same request
Expand All @@ -136,6 +139,7 @@ class DeleteJobRequest(proto.Message):
so, will ignore the second request. This
prevents clients from accidentally creating
duplicate commitments.
The request ID must be a valid UUID with the
exception that zero UUID is not supported
(00000000-0000-0000-0000-000000000000).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ class ProvisioningModel(proto.Enum):
SPOT VM.
PREEMPTIBLE (3):
Preemptible VM (PVM).
Above SPOT VM is the preferable model for
preemptible VM instances: the old preemptible VM
model (indicated by this field) is the older
Expand Down Expand Up @@ -566,6 +567,7 @@ class LocationPolicy(proto.Message):
"us-west1". An error is expected in this case.
denied_locations (MutableSequence[str]):
A list of denied location names.
Not yet implemented.
"""

Expand Down Expand Up @@ -641,10 +643,11 @@ class Disk(proto.Message):
disk size 30 GB, you can only use this field to make the
disk larger or equal to 30 GB.
disk_interface (str):
Local SSDs are available through both "SCSI"
and "NVMe" interfaces. If not indicated, "NVMe"
will be the default one for local ssds. We only
support "SCSI" for persistent disks now.
Local SSDs are available through both "SCSI" and "NVMe"
interfaces. If not indicated, "NVMe" will be the default one
for local ssds. This field is ignored for persistent disks
as the interface is chosen automatically. See
https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface.
"""

image: str = proto.Field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class ComputeResource(proto.Message):
``memoryMib`` to ``4096`` or less.
gpu_count (int):
The GPU count.
Not yet implemented.
boot_disk_mib (int):
Extra boot disk size in MiB for each task.
Expand Down
23 changes: 1 addition & 22 deletions packages/google-cloud-batch/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
UNIT_TEST_EXTRAS = []
UNIT_TEST_EXTRAS_BY_PYTHON = {}

SYSTEM_TEST_PYTHON_VERSIONS = []
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"]
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
"mock",
"pytest",
Expand Down Expand Up @@ -405,24 +405,3 @@ def prerelease_deps(session):
session.run("python", "-c", "import google.auth; print(google.auth.__version__)")

session.run("py.test", "tests/unit")

system_test_path = os.path.join("tests", "system.py")
system_test_folder_path = os.path.join("tests", "system")

# Only run system tests if found.
if os.path.exists(system_test_path):
session.run(
"py.test",
"--verbose",
f"--junitxml=system_{session.python}_sponge_log.xml",
system_test_path,
*session.posargs,
)
if os.path.exists(system_test_folder_path):
session.run(
"py.test",
"--verbose",
f"--junitxml=system_{session.python}_sponge_log.xml",
system_test_folder_path,
*session.posargs,
)
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.0"
"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.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from google.auth import credentials as ga_credentials
from google.auth.exceptions import MutualTLSChannelError
from google.cloud.location import locations_pb2
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from google.oauth2 import service_account
from google.protobuf import duration_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from google.auth import credentials as ga_credentials
from google.auth.exceptions import MutualTLSChannelError
from google.cloud.location import locations_pb2
from google.longrunning import operations_pb2
from google.longrunning import operations_pb2 # type: ignore
from google.oauth2 import service_account
from google.protobuf import duration_pb2 # type: ignore
from google.protobuf import empty_pb2 # type: ignore
Expand Down

0 comments on commit a300b07

Please sign in to comment.