Skip to content
Open
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
1 change: 1 addition & 0 deletions .release-please-bulk-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"packages/google-cloud-cloudsecuritycompliance": "0.8.0",
"packages/google-cloud-commerce-consumer-procurement": "0.6.0",
"packages/google-cloud-common": "1.10.0",
"packages/google-cloud-compute": "1.48.0",
"packages/google-cloud-compute-v1beta": "0.12.0",
"packages/google-cloud-confidentialcomputing": "0.11.0",
"packages/google-cloud-config": "0.7.0",
Expand Down
1 change: 0 additions & 1 deletion .release-please-individual-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"packages/bigframes": "2.43.0",
"packages/google-cloud-bigtable": "2.39.0",
"packages/google-cloud-compute": "1.48.0",
"packages/google-cloud-firestore": "2.27.0",
"packages/google-cloud-spanner": "3.68.0",
"packages/google-crc32c": "1.8.0",
Expand Down
2 changes: 0 additions & 2 deletions librarian.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -764,8 +764,6 @@ libraries:
version: 1.48.0
apis:
- path: google/cloud/compute/v1
skip_generate: true
skip_release: true
python:
metadata_name_override: compute
default_version: v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2183,7 +2183,7 @@

def parse_version_to_tuple(version_string: str):
"""Safely converts a semantic version string to a comparable tuple of integers.
Example: "4.25.8" -> (4, 25, 8)
Example: "6.33.5" -> (6, 33, 5)
Ignores non-numeric parts and handles common version formats.
Args:
version_string: Version string in the format "x.y.z" or "x.y.z<suffix>"
Expand Down Expand Up @@ -2212,9 +2212,9 @@ def _get_version(dependency_name):
return (None, "--")

_dependency_package = "google.protobuf"
_next_supported_version = "4.25.8"
_next_supported_version_tuple = (4, 25, 8)
_recommendation = " (we recommend 6.x)"
_next_supported_version = "6.33.5"
_next_supported_version_tuple = (6, 33, 5)
_recommendation = " (we recommend 7.x)"
(_version_used, _version_used_string) = _get_version(_dependency_package)
if _version_used and _version_used < _next_supported_version_tuple:
warnings.warn(
Expand Down
12 changes: 7 additions & 5 deletions packages/google-cloud-compute/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
version = None

with open(os.path.join(package_root, "google/cloud/compute/gapic_version.py")) as fp:
version_candidates = re.findall(r"(?<=\")\d+.\d+.\d+(?=\")", fp.read())
version_candidates = re.findall(
r"(?<=\")\d+\.\d+\.\d+[^\"\s]*(?=\")",
fp.read(),
)
assert len(version_candidates) == 1
version = version_candidates[0]

Expand All @@ -39,15 +42,14 @@
release_status = "Development Status :: 5 - Production/Stable"

dependencies = [
"google-api-core[grpc] >= 2.17.1, <3.0.0",
"google-api-core[grpc] >= 2.24.2, <3.0.0",
# Exclude incompatible versions of `google-auth`
# See https://github.com/googleapis/google-cloud-python/issues/12364
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
"grpcio >= 1.59.0, < 2.0.0",
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
"proto-plus >= 1.22.3, <2.0.0",
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
"protobuf >= 4.25.8, < 8.0.0",
"proto-plus >= 1.26.1, <2.0.0",
"protobuf >= 6.33.5, < 8.0.0",
]
extras = {}
url = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-compute"
Expand Down
6 changes: 3 additions & 3 deletions packages/google-cloud-compute/testing/constraints-3.10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# pinning their versions to their lower bounds.
# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
# then this file should have google-cloud-foo==1.14.0
google-api-core==2.17.1
google-api-core==2.24.2
google-auth==2.14.1
grpcio==1.59.0
proto-plus==1.22.3
protobuf==4.25.8
proto-plus==1.26.1
protobuf==6.33.5
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ google-api-core>=2
google-auth>=2
grpcio>=1
proto-plus>=1
protobuf>=6
protobuf>=7
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ google-api-core>=2
google-auth>=2
grpcio>=1
proto-plus>=1
protobuf>=6
protobuf>=7
43 changes: 22 additions & 21 deletions packages/google-cloud-compute/tests/system/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,34 +50,35 @@ def get_unique_name(placeholder=""):

def wait_for_zonal_operation(self, operation):
client = ZoneOperationsClient()
result = client.wait(
operation=operation, zone=self.DEFAULT_ZONE, project=self.DEFAULT_PROJECT
)
if result.error:
self.fail("Zonal operation {} has errors".format(operation))
op = client.get(
operation=operation, zone=self.DEFAULT_ZONE, project=self.DEFAULT_PROJECT
)
# this is a workaround, some operations take up to 3 min, currently we cant set timeout for wait()
if op.status != Operation.Status.DONE:
client.wait(
while True:
op = client.wait(
operation=operation,
zone=self.DEFAULT_ZONE,
project=self.DEFAULT_PROJECT,
)
if op.status == Operation.Status.DONE:
if op.error:
self.fail("Zonal operation {} has errors".format(operation))
break

def wait_for_regional_operation(self, operation):
client = RegionOperationsClient()
result = client.wait(
operation=operation,
region=self.DEFAULT_REGION,
project=self.DEFAULT_PROJECT,
)
if result.error:
self.fail("Region operation {} has errors".format(operation))
while True:
op = client.wait(
operation=operation,
region=self.DEFAULT_REGION,
project=self.DEFAULT_PROJECT,
)
if op.status == Operation.Status.DONE:
if op.error:
self.fail("Region operation {} has errors".format(operation))
break

def wait_for_global_operation(self, operation):
client = GlobalOperationsClient()
result = client.wait(operation=operation, project=self.DEFAULT_PROJECT)
if result.error:
self.fail("Global operation {} has errors".format(operation))
while True:
op = client.wait(operation=operation, project=self.DEFAULT_PROJECT)
if op.status == Operation.Status.DONE:
if op.error:
self.fail("Global operation {} has errors".format(operation))
break
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ def setUp(self) -> None:
def test_auto_paging_map_response(self):
client = AcceleratorTypesClient()
request = AggregatedListAcceleratorTypesRequest(
project=self.DEFAULT_PROJECT, max_results=3
project=self.DEFAULT_PROJECT, max_results=100
)
result = client.aggregated_list(request=request)
zone_acc_types = collections.defaultdict(list)
for zone, types in result:
# Limit the number of items retrieved to avoid hitting the "Read requests per minute"
# quota limit when testing with a small max_results.
for zone, types in enumerate(result):
zone_acc_types[zone].extend(at.name for at in types.accelerator_types)
default_zone = "zones/" + self.DEFAULT_ZONE
self.assertIn("nvidia-tesla-t4", zone_acc_types[default_zone])
12 changes: 12 additions & 0 deletions release-please-bulk-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,18 @@
"google/cloud/common/gapic_version.py"
]
},
"packages/google-cloud-compute": {
"component": "google-cloud-compute",
"extra-files": [
"google/cloud/compute/gapic_version.py",
"google/cloud/compute_v1/gapic_version.py",
{
"jsonpath": "$.clientLibrary.version",
"path": "samples/generated_samples/snippet_metadata_google.cloud.compute.v1.json",
"type": "json"
}
]
},
"packages/google-cloud-compute-v1beta": {
"component": "google-cloud-compute-v1beta",
"extra-files": [
Expand Down
12 changes: 0 additions & 12 deletions release-please-individual-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,6 @@
}
]
},
"packages/google-cloud-compute": {
"component": "google-cloud-compute",
"extra-files": [
"google/cloud/compute/gapic_version.py",
"google/cloud/compute_v1/gapic_version.py",
{
"jsonpath": "$.clientLibrary.version",
"path": "samples/generated_samples/snippet_metadata_google.cloud.compute.v1.json",
"type": "json"
}
]
},
"packages/google-cloud-firestore": {
"component": "google-cloud-firestore",
"extra-files": [
Expand Down
Loading