google-cloud-dataform 0.5.12__tar.gz → 0.5.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_cloud_dataform-0.5.12/google_cloud_dataform.egg-info → google_cloud_dataform-0.5.13}/PKG-INFO +1 -1
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform/gapic_version.py +1 -1
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/gapic_version.py +1 -1
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/services/dataform/client.py +3 -37
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13/google_cloud_dataform.egg-info}/PKG-INFO +1 -1
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/tests/unit/gapic/dataform_v1beta1/test_dataform.py +0 -80
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/LICENSE +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/MANIFEST.in +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/README.rst +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform/__init__.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform/py.typed +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/__init__.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/gapic_metadata.json +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/py.typed +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/services/__init__.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/services/dataform/__init__.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/services/dataform/async_client.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/services/dataform/pagers.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/services/dataform/transports/__init__.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/services/dataform/transports/base.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/services/dataform/transports/grpc.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/services/dataform/transports/grpc_asyncio.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/services/dataform/transports/rest.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/services/dataform/transports/rest_base.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/types/__init__.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/types/dataform.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google_cloud_dataform.egg-info/SOURCES.txt +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google_cloud_dataform.egg-info/dependency_links.txt +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google_cloud_dataform.egg-info/not-zip-safe +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google_cloud_dataform.egg-info/requires.txt +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google_cloud_dataform.egg-info/top_level.txt +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/setup.cfg +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/setup.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/tests/__init__.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/tests/unit/__init__.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/tests/unit/gapic/__init__.py +0 -0
- {google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/tests/unit/gapic/dataform_v1beta1/__init__.py +0 -0
|
@@ -611,36 +611,6 @@ class DataformClient(metaclass=DataformClientMeta):
|
|
|
611
611
|
raise ValueError("Universe Domain cannot be an empty string.")
|
|
612
612
|
return universe_domain
|
|
613
613
|
|
|
614
|
-
@staticmethod
|
|
615
|
-
def _compare_universes(
|
|
616
|
-
client_universe: str, credentials: ga_credentials.Credentials
|
|
617
|
-
) -> bool:
|
|
618
|
-
"""Returns True iff the universe domains used by the client and credentials match.
|
|
619
|
-
|
|
620
|
-
Args:
|
|
621
|
-
client_universe (str): The universe domain configured via the client options.
|
|
622
|
-
credentials (ga_credentials.Credentials): The credentials being used in the client.
|
|
623
|
-
|
|
624
|
-
Returns:
|
|
625
|
-
bool: True iff client_universe matches the universe in credentials.
|
|
626
|
-
|
|
627
|
-
Raises:
|
|
628
|
-
ValueError: when client_universe does not match the universe in credentials.
|
|
629
|
-
"""
|
|
630
|
-
|
|
631
|
-
default_universe = DataformClient._DEFAULT_UNIVERSE
|
|
632
|
-
credentials_universe = getattr(credentials, "universe_domain", default_universe)
|
|
633
|
-
|
|
634
|
-
if client_universe != credentials_universe:
|
|
635
|
-
raise ValueError(
|
|
636
|
-
"The configured universe domain "
|
|
637
|
-
f"({client_universe}) does not match the universe domain "
|
|
638
|
-
f"found in the credentials ({credentials_universe}). "
|
|
639
|
-
"If you haven't configured the universe domain explicitly, "
|
|
640
|
-
f"`{default_universe}` is the default."
|
|
641
|
-
)
|
|
642
|
-
return True
|
|
643
|
-
|
|
644
614
|
def _validate_universe_domain(self):
|
|
645
615
|
"""Validates client's and credentials' universe domains are consistent.
|
|
646
616
|
|
|
@@ -650,13 +620,9 @@ class DataformClient(metaclass=DataformClientMeta):
|
|
|
650
620
|
Raises:
|
|
651
621
|
ValueError: If the configured universe domain is not valid.
|
|
652
622
|
"""
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
self.universe_domain, self.transport._credentials
|
|
657
|
-
)
|
|
658
|
-
)
|
|
659
|
-
return self._is_universe_domain_valid
|
|
623
|
+
|
|
624
|
+
# NOTE (b/349488459): universe validation is disabled until further notice.
|
|
625
|
+
return True
|
|
660
626
|
|
|
661
627
|
@property
|
|
662
628
|
def api_endpoint(self):
|
|
@@ -299,86 +299,6 @@ def test__get_universe_domain():
|
|
|
299
299
|
assert str(excinfo.value) == "Universe Domain cannot be an empty string."
|
|
300
300
|
|
|
301
301
|
|
|
302
|
-
@pytest.mark.parametrize(
|
|
303
|
-
"client_class,transport_class,transport_name",
|
|
304
|
-
[
|
|
305
|
-
(DataformClient, transports.DataformGrpcTransport, "grpc"),
|
|
306
|
-
(DataformClient, transports.DataformRestTransport, "rest"),
|
|
307
|
-
],
|
|
308
|
-
)
|
|
309
|
-
def test__validate_universe_domain(client_class, transport_class, transport_name):
|
|
310
|
-
client = client_class(
|
|
311
|
-
transport=transport_class(credentials=ga_credentials.AnonymousCredentials())
|
|
312
|
-
)
|
|
313
|
-
assert client._validate_universe_domain() == True
|
|
314
|
-
|
|
315
|
-
# Test the case when universe is already validated.
|
|
316
|
-
assert client._validate_universe_domain() == True
|
|
317
|
-
|
|
318
|
-
if transport_name == "grpc":
|
|
319
|
-
# Test the case where credentials are provided by the
|
|
320
|
-
# `local_channel_credentials`. The default universes in both match.
|
|
321
|
-
channel = grpc.secure_channel(
|
|
322
|
-
"http://localhost/", grpc.local_channel_credentials()
|
|
323
|
-
)
|
|
324
|
-
client = client_class(transport=transport_class(channel=channel))
|
|
325
|
-
assert client._validate_universe_domain() == True
|
|
326
|
-
|
|
327
|
-
# Test the case where credentials do not exist: e.g. a transport is provided
|
|
328
|
-
# with no credentials. Validation should still succeed because there is no
|
|
329
|
-
# mismatch with non-existent credentials.
|
|
330
|
-
channel = grpc.secure_channel(
|
|
331
|
-
"http://localhost/", grpc.local_channel_credentials()
|
|
332
|
-
)
|
|
333
|
-
transport = transport_class(channel=channel)
|
|
334
|
-
transport._credentials = None
|
|
335
|
-
client = client_class(transport=transport)
|
|
336
|
-
assert client._validate_universe_domain() == True
|
|
337
|
-
|
|
338
|
-
# TODO: This is needed to cater for older versions of google-auth
|
|
339
|
-
# Make this test unconditional once the minimum supported version of
|
|
340
|
-
# google-auth becomes 2.23.0 or higher.
|
|
341
|
-
google_auth_major, google_auth_minor = [
|
|
342
|
-
int(part) for part in google.auth.__version__.split(".")[0:2]
|
|
343
|
-
]
|
|
344
|
-
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
|
|
345
|
-
credentials = ga_credentials.AnonymousCredentials()
|
|
346
|
-
credentials._universe_domain = "foo.com"
|
|
347
|
-
# Test the case when there is a universe mismatch from the credentials.
|
|
348
|
-
client = client_class(transport=transport_class(credentials=credentials))
|
|
349
|
-
with pytest.raises(ValueError) as excinfo:
|
|
350
|
-
client._validate_universe_domain()
|
|
351
|
-
assert (
|
|
352
|
-
str(excinfo.value)
|
|
353
|
-
== "The configured universe domain (googleapis.com) does not match the universe domain found in the credentials (foo.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default."
|
|
354
|
-
)
|
|
355
|
-
|
|
356
|
-
# Test the case when there is a universe mismatch from the client.
|
|
357
|
-
#
|
|
358
|
-
# TODO: Make this test unconditional once the minimum supported version of
|
|
359
|
-
# google-api-core becomes 2.15.0 or higher.
|
|
360
|
-
api_core_major, api_core_minor = [
|
|
361
|
-
int(part) for part in api_core_version.__version__.split(".")[0:2]
|
|
362
|
-
]
|
|
363
|
-
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
|
|
364
|
-
client = client_class(
|
|
365
|
-
client_options={"universe_domain": "bar.com"},
|
|
366
|
-
transport=transport_class(
|
|
367
|
-
credentials=ga_credentials.AnonymousCredentials(),
|
|
368
|
-
),
|
|
369
|
-
)
|
|
370
|
-
with pytest.raises(ValueError) as excinfo:
|
|
371
|
-
client._validate_universe_domain()
|
|
372
|
-
assert (
|
|
373
|
-
str(excinfo.value)
|
|
374
|
-
== "The configured universe domain (bar.com) does not match the universe domain found in the credentials (googleapis.com). If you haven't configured the universe domain explicitly, `googleapis.com` is the default."
|
|
375
|
-
)
|
|
376
|
-
|
|
377
|
-
# Test that ValueError is raised if universe_domain is provided via client options and credentials is None
|
|
378
|
-
with pytest.raises(ValueError):
|
|
379
|
-
client._compare_universes("foo.bar", None)
|
|
380
|
-
|
|
381
|
-
|
|
382
302
|
@pytest.mark.parametrize(
|
|
383
303
|
"client_class,transport_name",
|
|
384
304
|
[
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform/__init__.py
RENAMED
|
File without changes
|
{google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{google_cloud_dataform-0.5.12 → google_cloud_dataform-0.5.13}/google/cloud/dataform_v1beta1/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|