Skip to content

Commit 9d642f9

Browse files
1 parent ae391ea commit 9d642f9

File tree

100 files changed

+2307
-23689
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+2307
-23689
lines changed

‎google/cloud/errorreporting_v1beta1/services/error_group_service/client.py‎

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -455,36 +455,6 @@ def _get_universe_domain(
455455
raise ValueError("Universe Domain cannot be an empty string.")
456456
return universe_domain
457457

458-
@staticmethod
459-
def _compare_universes(
460-
client_universe: str, credentials: ga_credentials.Credentials
461-
) -> bool:
462-
"""Returns True iff the universe domains used by the client and credentials match.
463-
464-
Args:
465-
client_universe (str): The universe domain configured via the client options.
466-
credentials (ga_credentials.Credentials): The credentials being used in the client.
467-
468-
Returns:
469-
bool: True iff client_universe matches the universe in credentials.
470-
471-
Raises:
472-
ValueError: when client_universe does not match the universe in credentials.
473-
"""
474-
475-
default_universe = ErrorGroupServiceClient._DEFAULT_UNIVERSE
476-
credentials_universe = getattr(credentials, "universe_domain", default_universe)
477-
478-
if client_universe != credentials_universe:
479-
raise ValueError(
480-
"The configured universe domain "
481-
f"({client_universe}) does not match the universe domain "
482-
f"found in the credentials ({credentials_universe}). "
483-
"If you haven't configured the universe domain explicitly, "
484-
f"`{default_universe}` is the default."
485-
)
486-
return True
487-
488458
def _validate_universe_domain(self):
489459
"""Validates client's and credentials' universe domains are consistent.
490460
@@ -494,13 +464,9 @@ def _validate_universe_domain(self):
494464
Raises:
495465
ValueError: If the configured universe domain is not valid.
496466
"""
497-
self._is_universe_domain_valid = (
498-
self._is_universe_domain_valid
499-
or ErrorGroupServiceClient._compare_universes(
500-
self.universe_domain, self.transport._credentials
501-
)
502-
)
503-
return self._is_universe_domain_valid
467+
468+
# NOTE (b/349488459): universe validation is disabled until further notice.
469+
return True
504470

505471
@property
506472
def api_endpoint(self):

owl-bot-staging/v1beta1/google/cloud/errorreporting_v1beta1/services/error_group_service/transports/README.rst renamed to google/cloud/errorreporting_v1beta1/services/error_group_service/transports/README.rst

File renamed without changes.

‎google/cloud/errorreporting_v1beta1/services/error_group_service/transports/grpc_asyncio.py‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
import inspect
1617
import warnings
1718
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
1819

@@ -228,6 +229,9 @@ def __init__(
228229
)
229230

230231
# Wrap messages. This must be done after self._grpc_channel exists
232+
self._wrap_with_kind = (
233+
"kind" in inspect.signature(gapic_v1.method_async.wrap_method).parameters
234+
)
231235
self._prep_wrapped_messages(client_info)
232236

233237
@property
@@ -298,20 +302,29 @@ def update_group(
298302
def _prep_wrapped_messages(self, client_info):
299303
"""Precompute the wrapped methods, overriding the base class method to use async wrappers."""
300304
self._wrapped_methods = {
301-
self.get_group: gapic_v1.method_async.wrap_method(
305+
self.get_group: self._wrap_method(
302306
self.get_group,
303307
default_timeout=None,
304308
client_info=client_info,
305309
),
306-
self.update_group: gapic_v1.method_async.wrap_method(
310+
self.update_group: self._wrap_method(
307311
self.update_group,
308312
default_timeout=None,
309313
client_info=client_info,
310314
),
311315
}
312316

317+
def _wrap_method(self, func, *args, **kwargs):
318+
if self._wrap_with_kind: # pragma: NO COVER
319+
kwargs["kind"] = self.kind
320+
return gapic_v1.method_async.wrap_method(func, *args, **kwargs)
321+
313322
def close(self):
314323
return self.grpc_channel.close()
315324

325+
@property
326+
def kind(self) -> str:
327+
return "grpc_asyncio"
328+
316329

317330
__all__ = ("ErrorGroupServiceGrpcAsyncIOTransport",)

0 commit comments

Comments
 (0)