Skip to content

Commit c064d38

Browse files
authored
fix: use google-api-core==2.7.2 (#1276)
* fix: use google-api-core==2.7.2 * update golden files
1 parent b8f3d4c commit c064d38

File tree

11 files changed

+145
-57
lines changed

11 files changed

+145
-57
lines changed

packages/gapic-generator/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
click==8.1.2
2-
google-api-core==2.7.1
2+
google-api-core==2.7.2
33
googleapis-common-protos==1.56.0
44
jinja2==3.1.1
55
MarkupSafe==2.1.1

packages/gapic-generator/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,8 @@ def sample_batch_get_assets_history():
460460
self._client._transport.batch_get_assets_history,
461461
default_retry=retries.Retry(
462462
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
463-
core_exceptions.GoogleAPICallError,
463+
core_exceptions.DeadlineExceeded,
464+
core_exceptions.ServiceUnavailable,
464465
),
465466
deadline=60.0,
466467
),
@@ -678,7 +679,8 @@ def sample_get_feed():
678679
self._client._transport.get_feed,
679680
default_retry=retries.Retry(
680681
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
681-
core_exceptions.GoogleAPICallError,
682+
core_exceptions.DeadlineExceeded,
683+
core_exceptions.ServiceUnavailable,
682684
),
683685
deadline=60.0,
684686
),
@@ -780,7 +782,8 @@ def sample_list_feeds():
780782
self._client._transport.list_feeds,
781783
default_retry=retries.Retry(
782784
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
783-
core_exceptions.GoogleAPICallError,
785+
core_exceptions.DeadlineExceeded,
786+
core_exceptions.ServiceUnavailable,
784787
),
785788
deadline=60.0,
786789
),
@@ -976,7 +979,8 @@ def sample_delete_feed():
976979
self._client._transport.delete_feed,
977980
default_retry=retries.Retry(
978981
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
979-
core_exceptions.GoogleAPICallError,
982+
core_exceptions.DeadlineExceeded,
983+
core_exceptions.ServiceUnavailable,
980984
),
981985
deadline=60.0,
982986
),
@@ -1170,7 +1174,8 @@ def sample_search_all_resources():
11701174
self._client._transport.search_all_resources,
11711175
default_retry=retries.Retry(
11721176
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
1173-
core_exceptions.GoogleAPICallError,
1177+
core_exceptions.DeadlineExceeded,
1178+
core_exceptions.ServiceUnavailable,
11741179
),
11751180
deadline=15.0,
11761181
),
@@ -1355,7 +1360,8 @@ def sample_search_all_iam_policies():
13551360
self._client._transport.search_all_iam_policies,
13561361
default_retry=retries.Retry(
13571362
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
1358-
core_exceptions.GoogleAPICallError,
1363+
core_exceptions.DeadlineExceeded,
1364+
core_exceptions.ServiceUnavailable,
13591365
),
13601366
deadline=15.0,
13611367
),
@@ -1448,7 +1454,7 @@ def sample_analyze_iam_policy():
14481454
self._client._transport.analyze_iam_policy,
14491455
default_retry=retries.Retry(
14501456
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
1451-
core_exceptions.GoogleAPICallError,
1457+
core_exceptions.ServiceUnavailable,
14521458
),
14531459
deadline=300.0,
14541460
),

packages/gapic-generator/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/base.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ def _prep_wrapped_messages(self, client_info):
132132
self.batch_get_assets_history,
133133
default_retry=retries.Retry(
134134
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
135-
core_exceptions.GoogleAPICallError,
135+
core_exceptions.DeadlineExceeded,
136+
core_exceptions.ServiceUnavailable,
136137
),
137138
deadline=60.0,
138139
),
@@ -148,7 +149,8 @@ def _prep_wrapped_messages(self, client_info):
148149
self.get_feed,
149150
default_retry=retries.Retry(
150151
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
151-
core_exceptions.GoogleAPICallError,
152+
core_exceptions.DeadlineExceeded,
153+
core_exceptions.ServiceUnavailable,
152154
),
153155
deadline=60.0,
154156
),
@@ -159,7 +161,8 @@ def _prep_wrapped_messages(self, client_info):
159161
self.list_feeds,
160162
default_retry=retries.Retry(
161163
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
162-
core_exceptions.GoogleAPICallError,
164+
core_exceptions.DeadlineExceeded,
165+
core_exceptions.ServiceUnavailable,
163166
),
164167
deadline=60.0,
165168
),
@@ -175,7 +178,8 @@ def _prep_wrapped_messages(self, client_info):
175178
self.delete_feed,
176179
default_retry=retries.Retry(
177180
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
178-
core_exceptions.GoogleAPICallError,
181+
core_exceptions.DeadlineExceeded,
182+
core_exceptions.ServiceUnavailable,
179183
),
180184
deadline=60.0,
181185
),
@@ -186,7 +190,8 @@ def _prep_wrapped_messages(self, client_info):
186190
self.search_all_resources,
187191
default_retry=retries.Retry(
188192
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
189-
core_exceptions.GoogleAPICallError,
193+
core_exceptions.DeadlineExceeded,
194+
core_exceptions.ServiceUnavailable,
190195
),
191196
deadline=15.0,
192197
),
@@ -197,7 +202,8 @@ def _prep_wrapped_messages(self, client_info):
197202
self.search_all_iam_policies,
198203
default_retry=retries.Retry(
199204
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
200-
core_exceptions.GoogleAPICallError,
205+
core_exceptions.DeadlineExceeded,
206+
core_exceptions.ServiceUnavailable,
201207
),
202208
deadline=15.0,
203209
),
@@ -208,7 +214,7 @@ def _prep_wrapped_messages(self, client_info):
208214
self.analyze_iam_policy,
209215
default_retry=retries.Retry(
210216
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
211-
core_exceptions.GoogleAPICallError,
217+
core_exceptions.ServiceUnavailable,
212218
),
213219
deadline=300.0,
214220
),

packages/gapic-generator/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ def sample_generate_access_token():
319319
self._client._transport.generate_access_token,
320320
default_retry=retries.Retry(
321321
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
322-
core_exceptions.GoogleAPICallError,
322+
core_exceptions.DeadlineExceeded,
323+
core_exceptions.ServiceUnavailable,
323324
),
324325
deadline=60.0,
325326
),
@@ -465,7 +466,8 @@ def sample_generate_id_token():
465466
self._client._transport.generate_id_token,
466467
default_retry=retries.Retry(
467468
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
468-
core_exceptions.GoogleAPICallError,
469+
core_exceptions.DeadlineExceeded,
470+
core_exceptions.ServiceUnavailable,
469471
),
470472
deadline=60.0,
471473
),
@@ -597,7 +599,8 @@ def sample_sign_blob():
597599
self._client._transport.sign_blob,
598600
default_retry=retries.Retry(
599601
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
600-
core_exceptions.GoogleAPICallError,
602+
core_exceptions.DeadlineExceeded,
603+
core_exceptions.ServiceUnavailable,
601604
),
602605
deadline=60.0,
603606
),
@@ -732,7 +735,8 @@ def sample_sign_jwt():
732735
self._client._transport.sign_jwt,
733736
default_retry=retries.Retry(
734737
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
735-
core_exceptions.GoogleAPICallError,
738+
core_exceptions.DeadlineExceeded,
739+
core_exceptions.ServiceUnavailable,
736740
),
737741
deadline=60.0,
738742
),

packages/gapic-generator/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/base.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def _prep_wrapped_messages(self, client_info):
119119
self.generate_access_token,
120120
default_retry=retries.Retry(
121121
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
122-
core_exceptions.GoogleAPICallError,
122+
core_exceptions.DeadlineExceeded,
123+
core_exceptions.ServiceUnavailable,
123124
),
124125
deadline=60.0,
125126
),
@@ -130,7 +131,8 @@ def _prep_wrapped_messages(self, client_info):
130131
self.generate_id_token,
131132
default_retry=retries.Retry(
132133
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
133-
core_exceptions.GoogleAPICallError,
134+
core_exceptions.DeadlineExceeded,
135+
core_exceptions.ServiceUnavailable,
134136
),
135137
deadline=60.0,
136138
),
@@ -141,7 +143,8 @@ def _prep_wrapped_messages(self, client_info):
141143
self.sign_blob,
142144
default_retry=retries.Retry(
143145
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
144-
core_exceptions.GoogleAPICallError,
146+
core_exceptions.DeadlineExceeded,
147+
core_exceptions.ServiceUnavailable,
145148
),
146149
deadline=60.0,
147150
),
@@ -152,7 +155,8 @@ def _prep_wrapped_messages(self, client_info):
152155
self.sign_jwt,
153156
default_retry=retries.Retry(
154157
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
155-
core_exceptions.GoogleAPICallError,
158+
core_exceptions.DeadlineExceeded,
159+
core_exceptions.ServiceUnavailable,
156160
),
157161
deadline=60.0,
158162
),

packages/gapic-generator/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,9 @@ def sample_list_sinks():
11331133
self._client._transport.list_sinks,
11341134
default_retry=retries.Retry(
11351135
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
1136-
core_exceptions.GoogleAPICallError,
1136+
core_exceptions.DeadlineExceeded,
1137+
core_exceptions.InternalServerError,
1138+
core_exceptions.ServiceUnavailable,
11371139
),
11381140
deadline=60.0,
11391141
),
@@ -1256,7 +1258,9 @@ def sample_get_sink():
12561258
self._client._transport.get_sink,
12571259
default_retry=retries.Retry(
12581260
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
1259-
core_exceptions.GoogleAPICallError,
1261+
core_exceptions.DeadlineExceeded,
1262+
core_exceptions.InternalServerError,
1263+
core_exceptions.ServiceUnavailable,
12601264
),
12611265
deadline=60.0,
12621266
),
@@ -1542,7 +1546,9 @@ def sample_update_sink():
15421546
self._client._transport.update_sink,
15431547
default_retry=retries.Retry(
15441548
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
1545-
core_exceptions.GoogleAPICallError,
1549+
core_exceptions.DeadlineExceeded,
1550+
core_exceptions.InternalServerError,
1551+
core_exceptions.ServiceUnavailable,
15461552
),
15471553
deadline=60.0,
15481554
),
@@ -1642,7 +1648,9 @@ def sample_delete_sink():
16421648
self._client._transport.delete_sink,
16431649
default_retry=retries.Retry(
16441650
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
1645-
core_exceptions.GoogleAPICallError,
1651+
core_exceptions.DeadlineExceeded,
1652+
core_exceptions.InternalServerError,
1653+
core_exceptions.ServiceUnavailable,
16461654
),
16471655
deadline=60.0,
16481656
),
@@ -1748,7 +1756,9 @@ def sample_list_exclusions():
17481756
self._client._transport.list_exclusions,
17491757
default_retry=retries.Retry(
17501758
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
1751-
core_exceptions.GoogleAPICallError,
1759+
core_exceptions.DeadlineExceeded,
1760+
core_exceptions.InternalServerError,
1761+
core_exceptions.ServiceUnavailable,
17521762
),
17531763
deadline=60.0,
17541764
),
@@ -1874,7 +1884,9 @@ def sample_get_exclusion():
18741884
self._client._transport.get_exclusion,
18751885
default_retry=retries.Retry(
18761886
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
1877-
core_exceptions.GoogleAPICallError,
1887+
core_exceptions.DeadlineExceeded,
1888+
core_exceptions.InternalServerError,
1889+
core_exceptions.ServiceUnavailable,
18781890
),
18791891
deadline=60.0,
18801892
),
@@ -2250,7 +2262,9 @@ def sample_delete_exclusion():
22502262
self._client._transport.delete_exclusion,
22512263
default_retry=retries.Retry(
22522264
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
2253-
core_exceptions.GoogleAPICallError,
2265+
core_exceptions.DeadlineExceeded,
2266+
core_exceptions.InternalServerError,
2267+
core_exceptions.ServiceUnavailable,
22542268
),
22552269
deadline=60.0,
22562270
),

packages/gapic-generator/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/base.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ def _prep_wrapped_messages(self, client_info):
178178
self.list_sinks,
179179
default_retry=retries.Retry(
180180
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
181-
core_exceptions.GoogleAPICallError,
181+
core_exceptions.DeadlineExceeded,
182+
core_exceptions.InternalServerError,
183+
core_exceptions.ServiceUnavailable,
182184
),
183185
deadline=60.0,
184186
),
@@ -189,7 +191,9 @@ def _prep_wrapped_messages(self, client_info):
189191
self.get_sink,
190192
default_retry=retries.Retry(
191193
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
192-
core_exceptions.GoogleAPICallError,
194+
core_exceptions.DeadlineExceeded,
195+
core_exceptions.InternalServerError,
196+
core_exceptions.ServiceUnavailable,
193197
),
194198
deadline=60.0,
195199
),
@@ -205,7 +209,9 @@ def _prep_wrapped_messages(self, client_info):
205209
self.update_sink,
206210
default_retry=retries.Retry(
207211
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
208-
core_exceptions.GoogleAPICallError,
212+
core_exceptions.DeadlineExceeded,
213+
core_exceptions.InternalServerError,
214+
core_exceptions.ServiceUnavailable,
209215
),
210216
deadline=60.0,
211217
),
@@ -216,7 +222,9 @@ def _prep_wrapped_messages(self, client_info):
216222
self.delete_sink,
217223
default_retry=retries.Retry(
218224
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
219-
core_exceptions.GoogleAPICallError,
225+
core_exceptions.DeadlineExceeded,
226+
core_exceptions.InternalServerError,
227+
core_exceptions.ServiceUnavailable,
220228
),
221229
deadline=60.0,
222230
),
@@ -227,7 +235,9 @@ def _prep_wrapped_messages(self, client_info):
227235
self.list_exclusions,
228236
default_retry=retries.Retry(
229237
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
230-
core_exceptions.GoogleAPICallError,
238+
core_exceptions.DeadlineExceeded,
239+
core_exceptions.InternalServerError,
240+
core_exceptions.ServiceUnavailable,
231241
),
232242
deadline=60.0,
233243
),
@@ -238,7 +248,9 @@ def _prep_wrapped_messages(self, client_info):
238248
self.get_exclusion,
239249
default_retry=retries.Retry(
240250
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
241-
core_exceptions.GoogleAPICallError,
251+
core_exceptions.DeadlineExceeded,
252+
core_exceptions.InternalServerError,
253+
core_exceptions.ServiceUnavailable,
242254
),
243255
deadline=60.0,
244256
),
@@ -259,7 +271,9 @@ def _prep_wrapped_messages(self, client_info):
259271
self.delete_exclusion,
260272
default_retry=retries.Retry(
261273
initial=0.1,maximum=60.0,multiplier=1.3, predicate=retries.if_exception_type(
262-
core_exceptions.GoogleAPICallError,
274+
core_exceptions.DeadlineExceeded,
275+
core_exceptions.InternalServerError,
276+
core_exceptions.ServiceUnavailable,
263277
),
264278
deadline=60.0,
265279
),

0 commit comments

Comments
 (0)