Skip to content

Commit 140d86f

Browse files
authored
feat: regenerate google-cloud-compute (#17576)
Fixes b/527882156
1 parent 39b252f commit 140d86f

12 files changed

Lines changed: 52 additions & 51 deletions

.release-please-bulk-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"packages/google-cloud-cloudsecuritycompliance": "0.8.0",
7878
"packages/google-cloud-commerce-consumer-procurement": "0.6.0",
7979
"packages/google-cloud-common": "1.10.0",
80+
"packages/google-cloud-compute": "1.48.0",
8081
"packages/google-cloud-compute-v1beta": "0.12.0",
8182
"packages/google-cloud-confidentialcomputing": "0.11.0",
8283
"packages/google-cloud-config": "0.7.0",

.release-please-individual-manifest.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"packages/bigframes": "2.43.0",
33
"packages/google-cloud-bigtable": "2.39.0",
4-
"packages/google-cloud-compute": "1.48.0",
54
"packages/google-cloud-firestore": "2.27.0",
65
"packages/google-crc32c": "1.8.0",
76
"packages/pandas-gbq": "0.35.0",

librarian.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -764,8 +764,6 @@ libraries:
764764
version: 1.48.0
765765
apis:
766766
- path: google/cloud/compute/v1
767-
skip_generate: true
768-
skip_release: true
769767
python:
770768
metadata_name_override: compute
771769
default_version: v1

packages/google-cloud-compute/google/cloud/compute_v1/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2183,7 +2183,7 @@
21832183

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

22142214
_dependency_package = "google.protobuf"
2215-
_next_supported_version = "4.25.8"
2216-
_next_supported_version_tuple = (4, 25, 8)
2217-
_recommendation = " (we recommend 6.x)"
2215+
_next_supported_version = "6.33.5"
2216+
_next_supported_version_tuple = (6, 33, 5)
2217+
_recommendation = " (we recommend 7.x)"
22182218
(_version_used, _version_used_string) = _get_version(_dependency_package)
22192219
if _version_used and _version_used < _next_supported_version_tuple:
22202220
warnings.warn(

packages/google-cloud-compute/setup.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
version = None
3030

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

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

4144
dependencies = [
42-
"google-api-core[grpc] >= 2.17.1, <3.0.0",
45+
"google-api-core[grpc] >= 2.24.2, <3.0.0",
4346
# Exclude incompatible versions of `google-auth`
4447
# See https://github.com/googleapis/google-cloud-python/issues/12364
4548
"google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0",
4649
"grpcio >= 1.59.0, < 2.0.0",
4750
"grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'",
48-
"proto-plus >= 1.22.3, <2.0.0",
49-
"proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'",
50-
"protobuf >= 4.25.8, < 8.0.0",
51+
"proto-plus >= 1.26.1, <2.0.0",
52+
"protobuf >= 6.33.5, < 8.0.0",
5153
]
5254
extras = {}
5355
url = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-compute"

packages/google-cloud-compute/testing/constraints-3.10.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# pinning their versions to their lower bounds.
55
# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
66
# then this file should have google-cloud-foo==1.14.0
7-
google-api-core==2.17.1
7+
google-api-core==2.24.2
88
google-auth==2.14.1
99
grpcio==1.59.0
10-
proto-plus==1.22.3
11-
protobuf==4.25.8
10+
proto-plus==1.26.1
11+
protobuf==6.33.5

packages/google-cloud-compute/testing/constraints-3.13.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ google-api-core>=2
99
google-auth>=2
1010
grpcio>=1
1111
proto-plus>=1
12-
protobuf>=6
12+
protobuf>=7

packages/google-cloud-compute/testing/constraints-3.14.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ google-api-core>=2
99
google-auth>=2
1010
grpcio>=1
1111
proto-plus>=1
12-
protobuf>=6
12+
protobuf>=7

packages/google-cloud-compute/tests/system/base.py

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,34 +50,35 @@ def get_unique_name(placeholder=""):
5050

5151
def wait_for_zonal_operation(self, operation):
5252
client = ZoneOperationsClient()
53-
result = client.wait(
54-
operation=operation, zone=self.DEFAULT_ZONE, project=self.DEFAULT_PROJECT
55-
)
56-
if result.error:
57-
self.fail("Zonal operation {} has errors".format(operation))
58-
op = client.get(
59-
operation=operation, zone=self.DEFAULT_ZONE, project=self.DEFAULT_PROJECT
60-
)
61-
# this is a workaround, some operations take up to 3 min, currently we cant set timeout for wait()
62-
if op.status != Operation.Status.DONE:
63-
client.wait(
53+
while True:
54+
op = client.wait(
6455
operation=operation,
6556
zone=self.DEFAULT_ZONE,
6657
project=self.DEFAULT_PROJECT,
6758
)
59+
if op.status == Operation.Status.DONE:
60+
if op.error:
61+
self.fail("Zonal operation {} has errors".format(operation))
62+
break
6863

6964
def wait_for_regional_operation(self, operation):
7065
client = RegionOperationsClient()
71-
result = client.wait(
72-
operation=operation,
73-
region=self.DEFAULT_REGION,
74-
project=self.DEFAULT_PROJECT,
75-
)
76-
if result.error:
77-
self.fail("Region operation {} has errors".format(operation))
66+
while True:
67+
op = client.wait(
68+
operation=operation,
69+
region=self.DEFAULT_REGION,
70+
project=self.DEFAULT_PROJECT,
71+
)
72+
if op.status == Operation.Status.DONE:
73+
if op.error:
74+
self.fail("Region operation {} has errors".format(operation))
75+
break
7876

7977
def wait_for_global_operation(self, operation):
8078
client = GlobalOperationsClient()
81-
result = client.wait(operation=operation, project=self.DEFAULT_PROJECT)
82-
if result.error:
83-
self.fail("Global operation {} has errors".format(operation))
79+
while True:
80+
op = client.wait(operation=operation, project=self.DEFAULT_PROJECT)
81+
if op.status == Operation.Status.DONE:
82+
if op.error:
83+
self.fail("Global operation {} has errors".format(operation))
84+
break

packages/google-cloud-compute/tests/system/test_pagination.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def setUp(self) -> None:
8181
def test_auto_paging_map_response(self):
8282
client = AcceleratorTypesClient()
8383
request = AggregatedListAcceleratorTypesRequest(
84-
project=self.DEFAULT_PROJECT, max_results=3
84+
project=self.DEFAULT_PROJECT, max_results=100
8585
)
8686
result = client.aggregated_list(request=request)
8787
zone_acc_types = collections.defaultdict(list)

0 commit comments

Comments
 (0)