From 4f859ecc63c3ddbbb859ca5f00b86c529671017e Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Mon, 31 Aug 2020 10:02:59 -0700 Subject: [PATCH 01/10] =?UTF-8?q?fixing=20version=20issue=20by=20not=20ove?= =?UTF-8?q?rwriting=20the=20version=20with=20the=20semantic=E2=80=A6=20(#1?= =?UTF-8?q?3411)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fixing version issue by not overwriting the version with the semantic version * removed VERSION imports --- .../azure-data-tables/azure/data/tables/_table_client.py | 4 +--- .../azure/data/tables/_table_service_client.py | 2 -- .../azure/data/tables/aio/_table_client_async.py | 2 -- .../azure/data/tables/aio/_table_service_client_async.py | 3 +-- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py index e55dbd0ddc4f..ab918545b351 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py @@ -27,8 +27,7 @@ from ._serialize import serialize_iso from ._deserialize import _return_headers_and_deserialized from ._error import _process_table_error -from ._version import VERSION -from ._models import TableEntityPropertiesPaged, UpdateMode +from ._models import TableEntityPropertiesPaged, UpdateMode, TableItem class TableClient(TableClientBase): @@ -59,7 +58,6 @@ def __init__( """ super(TableClient, self).__init__(account_url, table_name, credential=credential, **kwargs) self._client = AzureTable(self.url, pipeline=self._pipeline) - self._client._config.version = kwargs.get('api_version', VERSION) # pylint: disable=protected-access @classmethod def from_connection_string( diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py index 28186410fe16..3262bef182b0 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py @@ -18,7 +18,6 @@ from ._base_client import parse_connection_str, TransportWrapper from ._models import LocationMode from ._error import _process_table_error -from ._version import VERSION from ._table_client import TableClient from ._table_service_client_base import TableServiceClientBase @@ -47,7 +46,6 @@ def __init__( super(TableServiceClient, self).__init__(account_url, service='table', credential=credential, **kwargs) self._client = AzureTable(self.url, pipeline=self._pipeline) - self._client._config.version = kwargs.get('api_version', VERSION) # pylint: disable=protected-access @classmethod def from_connection_string( diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py index c8fd815d489b..74e7d637da21 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py @@ -20,7 +20,6 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async -from .. import VERSION from .._base_client import parse_connection_str from .._entity import TableEntity from .._generated.aio import AzureTable @@ -71,7 +70,6 @@ def __init__( account_url, table_name=table_name, credential=credential, loop=loop, **kwargs ) self._client = AzureTable(self.url, pipeline=self._pipeline, loop=loop) - self._client._config.version = kwargs.get('api_version', VERSION) # pylint: disable = W0212 self._loop = loop @classmethod diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py index 50c8c1570f0c..1e1d6bc8f62c 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py @@ -16,7 +16,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async -from .. import VERSION, LocationMode +from .. import LocationMode from .._base_client import parse_connection_str from .._generated.aio._azure_table_async import AzureTable from .._generated.models import TableServiceProperties, TableProperties, QueryOptions @@ -84,7 +84,6 @@ def __init__( loop=loop, **kwargs) self._client = AzureTable(url=self.url, pipeline=self._pipeline, loop=loop) # type: ignore - self._client._config.version = kwargs.get('api_version', VERSION) # pylint: disable=protected-access self._loop = loop @classmethod From 1dad9542478bb0fb6ef89fb7c72dd86d245445e1 Mon Sep 17 00:00:00 2001 From: "Adam Ling (MSFT)" Date: Mon, 31 Aug 2020 10:26:27 -0700 Subject: [PATCH 02/10] [ServiceBus] ServiceBusClient close spawned children (#13077) * close spawned children * fix mypy * update according to comments * python27 compatible --- sdk/servicebus/azure-servicebus/CHANGELOG.md | 3 + .../azure/servicebus/_servicebus_client.py | 54 +++++++++++++---- .../aio/_servicebus_client_async.py | 52 ++++++++++++---- .../tests/async_tests/test_sb_client_async.py | 60 +++++++++++++++++++ .../azure-servicebus/tests/test_sb_client.py | 45 +++++++++++++- 5 files changed, 192 insertions(+), 22 deletions(-) create mode 100644 sdk/servicebus/azure-servicebus/tests/async_tests/test_sb_client_async.py diff --git a/sdk/servicebus/azure-servicebus/CHANGELOG.md b/sdk/servicebus/azure-servicebus/CHANGELOG.md index 3556002dbdab..122d0f541f31 100644 --- a/sdk/servicebus/azure-servicebus/CHANGELOG.md +++ b/sdk/servicebus/azure-servicebus/CHANGELOG.md @@ -2,6 +2,9 @@ ## 7.0.0b6 (Unreleased) +**Breaking Changes** + +* `ServiceBusClient.close()` now closes spawned senders and receivers. ## 7.0.0b5 (2020-08-10) diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py index 28f253bdfdf2..be27075ea2de 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py @@ -2,11 +2,12 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, List, TYPE_CHECKING +import logging import uamqp -from ._base_handler import _parse_conn_str, ServiceBusSharedKeyCredential +from ._base_handler import _parse_conn_str, ServiceBusSharedKeyCredential, BaseHandler from ._servicebus_sender import ServiceBusSender from ._servicebus_receiver import ServiceBusReceiver from ._servicebus_session_receiver import ServiceBusSessionReceiver @@ -16,6 +17,8 @@ if TYPE_CHECKING: from azure.core.credentials import TokenCredential +_LOGGER = logging.getLogger(__name__) + class ServiceBusClient(object): """The ServiceBusClient class defines a high level interface for @@ -69,6 +72,7 @@ def __init__( self._auth_uri = "{}/{}".format(self._auth_uri, self._entity_name) # Internal flag for switching whether to apply connection sharing, pending fix in uamqp library self._connection_sharing = False + self._handlers = [] # type: List[BaseHandler] def __enter__(self): if self._connection_sharing: @@ -89,10 +93,22 @@ def _create_uamqp_connection(self): def close(self): # type: () -> None """ - Close down the ServiceBus client and the underlying connection. + Close down the ServiceBus client. + All spawned senders, receivers and underlying connection will be shutdown. :return: None """ + for handler in self._handlers: + try: + handler.close() + except Exception as exception: # pylint: disable=broad-except + _LOGGER.error( + "Client has met an exception when closing the handler: %r. Exception: %r.", + handler._container_id, # pylint: disable=protected-access + exception, + ) + del self._handlers[:] + if self._connection_sharing and self._connection: self._connection.destroy() @@ -157,7 +173,7 @@ def get_queue_sender(self, queue_name, **kwargs): """ # pylint: disable=protected-access - return ServiceBusSender( + handler = ServiceBusSender( fully_qualified_namespace=self.fully_qualified_namespace, queue_name=queue_name, credential=self._credential, @@ -168,6 +184,8 @@ def get_queue_sender(self, queue_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_queue_receiver(self, queue_name, **kwargs): # type: (str, Any) -> ServiceBusReceiver @@ -205,7 +223,7 @@ def get_queue_receiver(self, queue_name, **kwargs): """ # pylint: disable=protected-access - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, queue_name=queue_name, credential=self._credential, @@ -216,6 +234,8 @@ def get_queue_receiver(self, queue_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_queue_deadletter_receiver(self, queue_name, **kwargs): # type: (str, Any) -> ServiceBusReceiver @@ -265,7 +285,7 @@ def get_queue_deadletter_receiver(self, queue_name, **kwargs): queue_name=queue_name, transfer_deadletter=kwargs.get('transfer_deadletter', False) ) - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, entity_name=entity_name, credential=self._credential, @@ -277,6 +297,8 @@ def get_queue_deadletter_receiver(self, queue_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_topic_sender(self, topic_name, **kwargs): # type: (str, Any) -> ServiceBusSender @@ -300,7 +322,7 @@ def get_topic_sender(self, topic_name, **kwargs): :caption: Create a new instance of the ServiceBusSender from ServiceBusClient. """ - return ServiceBusSender( + handler = ServiceBusSender( fully_qualified_namespace=self.fully_qualified_namespace, topic_name=topic_name, credential=self._credential, @@ -311,6 +333,8 @@ def get_topic_sender(self, topic_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_subscription_receiver(self, topic_name, subscription_name, **kwargs): # type: (str, str, Any) -> ServiceBusReceiver @@ -353,7 +377,7 @@ def get_subscription_receiver(self, topic_name, subscription_name, **kwargs): """ # pylint: disable=protected-access - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, topic_name=topic_name, subscription_name=subscription_name, @@ -365,6 +389,8 @@ def get_subscription_receiver(self, topic_name, subscription_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_subscription_deadletter_receiver(self, topic_name, subscription_name, **kwargs): # type: (str, str, Any) -> ServiceBusReceiver @@ -416,7 +442,7 @@ def get_subscription_deadletter_receiver(self, topic_name, subscription_name, ** subscription_name=subscription_name, transfer_deadletter=kwargs.get('transfer_deadletter', False) ) - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, entity_name=entity_name, credential=self._credential, @@ -428,6 +454,8 @@ def get_subscription_deadletter_receiver(self, topic_name, subscription_name, ** user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_subscription_session_receiver(self, topic_name, subscription_name, session_id=None, **kwargs): # type: (str, str, str, Any) -> ServiceBusSessionReceiver @@ -473,7 +501,7 @@ def get_subscription_session_receiver(self, topic_name, subscription_name, sessi """ # pylint: disable=protected-access - return ServiceBusSessionReceiver( + handler = ServiceBusSessionReceiver( fully_qualified_namespace=self.fully_qualified_namespace, topic_name=topic_name, subscription_name=subscription_name, @@ -486,6 +514,8 @@ def get_subscription_session_receiver(self, topic_name, subscription_name, sessi user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_queue_session_receiver(self, queue_name, session_id=None, **kwargs): # type: (str, str, Any) -> ServiceBusSessionReceiver @@ -526,7 +556,7 @@ def get_queue_session_receiver(self, queue_name, session_id=None, **kwargs): """ # pylint: disable=protected-access - return ServiceBusSessionReceiver( + handler = ServiceBusSessionReceiver( fully_qualified_namespace=self.fully_qualified_namespace, queue_name=queue_name, credential=self._credential, @@ -538,3 +568,5 @@ def get_queue_session_receiver(self, queue_name, session_id=None, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_client_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_client_async.py index 67cd7bff710c..a6827a8ae91a 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_client_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_client_async.py @@ -2,12 +2,13 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING, Union +from typing import Any, List, TYPE_CHECKING +import logging import uamqp from .._base_handler import _parse_conn_str -from ._base_handler_async import ServiceBusSharedKeyCredential +from ._base_handler_async import ServiceBusSharedKeyCredential, BaseHandler from ._servicebus_sender_async import ServiceBusSender from ._servicebus_receiver_async import ServiceBusReceiver from ._servicebus_session_receiver_async import ServiceBusSessionReceiver @@ -18,6 +19,8 @@ if TYPE_CHECKING: from azure.core.credentials import TokenCredential +_LOGGER = logging.getLogger(__name__) + class ServiceBusClient(object): """The ServiceBusClient class defines a high level interface for @@ -71,6 +74,7 @@ def __init__( self._auth_uri = "{}/{}".format(self._auth_uri, self._entity_name) # Internal flag for switching whether to apply connection sharing, pending fix in uamqp library self._connection_sharing = False + self._handlers = [] # type: List[BaseHandler] async def __aenter__(self): if self._connection_sharing: @@ -133,9 +137,21 @@ async def close(self): # type: () -> None """ Close down the ServiceBus client. + All spawned senders, receivers and underlying connection will be shutdown. :return: None """ + for handler in self._handlers: + try: + await handler.close() + except Exception as exception: # pylint: disable=broad-except + _LOGGER.error( + "Client has met an exception when closing the handler: %r. Exception: %r.", + handler._container_id, # pylint: disable=protected-access + exception, + ) + del self._handlers[:] + if self._connection_sharing and self._connection: await self._connection.destroy_async() @@ -159,7 +175,7 @@ def get_queue_sender(self, queue_name, **kwargs): """ # pylint: disable=protected-access - return ServiceBusSender( + handler = ServiceBusSender( fully_qualified_namespace=self.fully_qualified_namespace, queue_name=queue_name, credential=self._credential, @@ -170,6 +186,8 @@ def get_queue_sender(self, queue_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_queue_receiver(self, queue_name, **kwargs): # type: (str, Any) -> ServiceBusReceiver @@ -206,7 +224,7 @@ def get_queue_receiver(self, queue_name, **kwargs): """ # pylint: disable=protected-access - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, queue_name=queue_name, credential=self._credential, @@ -217,6 +235,8 @@ def get_queue_receiver(self, queue_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_queue_deadletter_receiver(self, queue_name, **kwargs): # type: (str, Any) -> ServiceBusReceiver @@ -266,7 +286,7 @@ def get_queue_deadletter_receiver(self, queue_name, **kwargs): queue_name=queue_name, transfer_deadletter=kwargs.get('transfer_deadletter', False) ) - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, entity_name=entity_name, credential=self._credential, @@ -278,6 +298,8 @@ def get_queue_deadletter_receiver(self, queue_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_topic_sender(self, topic_name, **kwargs): # type: (str, Any) -> ServiceBusSender @@ -301,7 +323,7 @@ def get_topic_sender(self, topic_name, **kwargs): :caption: Create a new instance of the ServiceBusSender from ServiceBusClient. """ - return ServiceBusSender( + handler = ServiceBusSender( fully_qualified_namespace=self.fully_qualified_namespace, topic_name=topic_name, credential=self._credential, @@ -312,6 +334,8 @@ def get_topic_sender(self, topic_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_subscription_receiver(self, topic_name, subscription_name, **kwargs): # type: (str, str, Any) -> ServiceBusReceiver @@ -354,7 +378,7 @@ def get_subscription_receiver(self, topic_name, subscription_name, **kwargs): """ # pylint: disable=protected-access - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, topic_name=topic_name, subscription_name=subscription_name, @@ -366,6 +390,8 @@ def get_subscription_receiver(self, topic_name, subscription_name, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_subscription_deadletter_receiver(self, topic_name, subscription_name, **kwargs): # type: (str, str, Any) -> ServiceBusReceiver @@ -417,7 +443,7 @@ def get_subscription_deadletter_receiver(self, topic_name, subscription_name, ** subscription_name=subscription_name, transfer_deadletter=kwargs.get('transfer_deadletter', False) ) - return ServiceBusReceiver( + handler = ServiceBusReceiver( fully_qualified_namespace=self.fully_qualified_namespace, entity_name=entity_name, credential=self._credential, @@ -429,6 +455,8 @@ def get_subscription_deadletter_receiver(self, topic_name, subscription_name, ** user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_subscription_session_receiver(self, topic_name, subscription_name, session_id=None, **kwargs): # type: (str, str, str, Any) -> ServiceBusSessionReceiver @@ -474,7 +502,7 @@ def get_subscription_session_receiver(self, topic_name, subscription_name, sessi """ # pylint: disable=protected-access - return ServiceBusSessionReceiver( + handler = ServiceBusSessionReceiver( fully_qualified_namespace=self.fully_qualified_namespace, topic_name=topic_name, subscription_name=subscription_name, @@ -487,6 +515,8 @@ def get_subscription_session_receiver(self, topic_name, subscription_name, sessi user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler def get_queue_session_receiver(self, queue_name, session_id=None, **kwargs): # type: (str, str, Any) -> ServiceBusSessionReceiver @@ -526,7 +556,7 @@ def get_queue_session_receiver(self, queue_name, session_id=None, **kwargs): """ # pylint: disable=protected-access - return ServiceBusSessionReceiver( + handler = ServiceBusSessionReceiver( fully_qualified_namespace=self.fully_qualified_namespace, queue_name=queue_name, credential=self._credential, @@ -538,3 +568,5 @@ def get_queue_session_receiver(self, queue_name, session_id=None, **kwargs): user_agent=self._config.user_agent, **kwargs ) + self._handlers.append(handler) + return handler diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/test_sb_client_async.py b/sdk/servicebus/azure-servicebus/tests/async_tests/test_sb_client_async.py new file mode 100644 index 000000000000..351d1fe51a99 --- /dev/null +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/test_sb_client_async.py @@ -0,0 +1,60 @@ +#-------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + + +import logging +import pytest + +from azure.servicebus.aio import ServiceBusClient +from devtools_testutils import AzureMgmtTestCase, CachedResourceGroupPreparer +from servicebus_preparer import CachedServiceBusNamespacePreparer, CachedServiceBusQueuePreparer +from utilities import get_logger + +_logger = get_logger(logging.DEBUG) + + +class ServiceBusClientAsyncTests(AzureMgmtTestCase): + @pytest.mark.liveTest + @pytest.mark.live_test_only + @CachedResourceGroupPreparer() + @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') + @CachedServiceBusQueuePreparer(name_prefix='servicebustest', dead_lettering_on_message_expiration=True) + async def test_async_sb_client_close_spawned_handlers(self, servicebus_namespace_connection_string, servicebus_queue, **kwargs): + client = ServiceBusClient.from_connection_string(servicebus_namespace_connection_string) + + await client.close() + + # context manager + async with client: + assert len(client._handlers) == 0 + sender = client.get_queue_sender(servicebus_queue.name) + receiver = client.get_queue_receiver(servicebus_queue.name) + await sender._open() + await receiver._open() + + assert sender._handler and sender._running + assert receiver._handler and receiver._running + assert len(client._handlers) == 2 + + assert not sender._handler and not sender._running + assert not receiver._handler and not receiver._running + assert len(client._handlers) == 0 + + # close operation + sender = client.get_queue_sender(servicebus_queue.name) + receiver = client.get_queue_receiver(servicebus_queue.name) + await sender._open() + await receiver._open() + + assert sender._handler and sender._running + assert receiver._handler and receiver._running + assert len(client._handlers) == 2 + + await client.close() + + assert not sender._handler and not sender._running + assert not receiver._handler and not receiver._running + assert len(client._handlers) == 0 diff --git a/sdk/servicebus/azure-servicebus/tests/test_sb_client.py b/sdk/servicebus/azure-servicebus/tests/test_sb_client.py index 8f69482f0c4f..f9cf5fb0e306 100644 --- a/sdk/servicebus/azure-servicebus/tests/test_sb_client.py +++ b/sdk/servicebus/azure-servicebus/tests/test_sb_client.py @@ -28,7 +28,8 @@ ServiceBusTopicPreparer, ServiceBusQueuePreparer, ServiceBusNamespaceAuthorizationRulePreparer, - ServiceBusQueueAuthorizationRulePreparer + ServiceBusQueueAuthorizationRulePreparer, + CachedServiceBusQueuePreparer ) class ServiceBusClientTests(AzureMgmtTestCase): @@ -126,3 +127,45 @@ def test_sb_client_incorrect_queue_conn_str(self, servicebus_queue_authorization with pytest.raises(ServiceBusError): with client.get_queue_sender(wrong_queue.name) as sender: sender.send_messages(Message("test")) + + @pytest.mark.liveTest + @pytest.mark.live_test_only + @CachedResourceGroupPreparer() + @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') + @CachedServiceBusQueuePreparer(name_prefix='servicebustest', dead_lettering_on_message_expiration=True) + def test_sb_client_close_spawned_handlers(self, servicebus_namespace_connection_string, servicebus_queue, **kwargs): + client = ServiceBusClient.from_connection_string(servicebus_namespace_connection_string) + + client.close() + + # context manager + with client: + assert len(client._handlers) == 0 + sender = client.get_queue_sender(servicebus_queue.name) + receiver = client.get_queue_receiver(servicebus_queue.name) + sender._open() + receiver._open() + + assert sender._handler and sender._running + assert receiver._handler and receiver._running + assert len(client._handlers) == 2 + + assert not sender._handler and not sender._running + assert not receiver._handler and not receiver._running + assert len(client._handlers) == 0 + + # close operation + sender = client.get_queue_sender(servicebus_queue.name) + receiver = client.get_queue_receiver(servicebus_queue.name) + sender._open() + receiver._open() + + assert sender._handler and sender._running + assert receiver._handler and receiver._running + assert len(client._handlers) == 2 + + client.close() + + assert not sender._handler and not sender._running + assert not receiver._handler and not receiver._running + assert len(client._handlers) == 0 From f09b2e995427694ec68d0b7b7fa9a8494e109a26 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Mon, 31 Aug 2020 11:41:33 -0700 Subject: [PATCH 03/10] Switch retry (#13264) * new retry policy, now going to remove the other ones to verify everything works * working async policy now too * pylint fixes * changed from exponential to new StorageRetryPolicy * attempts to fix 415 error * syntax error * linting fixes * fixing up izzys comments * renamed to (Async)TablesRetryPolicy --- .../azure/data/tables/_base_client.py | 5 +- .../azure/data/tables/_policies.py | 84 +++++++++++++------ .../azure/data/tables/aio/_policies_async.py | 71 ++++++++++++---- .../tests/test_table_async.py | 2 +- 4 files changed, 119 insertions(+), 43 deletions(-) diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py index 36b2cb3fd59c..49eb7f5bf3f7 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_base_client.py @@ -50,7 +50,8 @@ StorageRequestHook, StorageResponseHook, StorageLoggingPolicy, - StorageHosts, ExponentialRetry, + StorageHosts, + TablesRetryPolicy, ) from ._error import _process_table_error from ._models import PartialBatchErrorException @@ -391,7 +392,7 @@ def create_configuration(**kwargs): config.headers_policy = StorageHeadersPolicy(**kwargs) config.user_agent_policy = UserAgentPolicy(sdk_moniker=SDK_MONIKER, **kwargs) # sdk_moniker="storage-{}/{}".format(kwargs.pop('storage_sdk'), VERSION), **kwargs) - config.retry_policy = kwargs.get("retry_policy") or ExponentialRetry(**kwargs) + config.retry_policy = kwargs.get("retry_policy") or TablesRetryPolicy(**kwargs) config.logging_policy = StorageLoggingPolicy(**kwargs) config.proxy_policy = ProxyPolicy(**kwargs) diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_policies.py b/sdk/tables/azure-data-tables/azure/data/tables/_policies.py index 732779f3943b..9114217bf286 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_policies.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_policies.py @@ -36,7 +36,8 @@ SansIOHTTPPolicy, NetworkTraceLoggingPolicy, HTTPPolicy, - RequestHistory + RequestHistory, + RetryPolicy ) from azure.core.exceptions import AzureError, ServiceRequestError, ServiceResponseError @@ -353,18 +354,61 @@ def on_response(self, request, response): ) -class StorageRetryPolicy(HTTPPolicy): +class TablesRetryPolicy(RetryPolicy): """ - The base class for Exponential and Linear retries containing shared code. + A base class for retry policies for the Table Client and Table Service Client """ + def __init__( + self, + initial_backoff=15, # type: int + increment_base=3, # type: int + retry_total=10, # type: int + retry_to_secondary=False, # type: bool + random_jitter_range=3, # type: int + **kwargs # type: Any + ): + """ + Build a TablesRetryPolicy object. - def __init__(self, **kwargs): - self.total_retries = kwargs.pop('retry_total', 10) + :param int initial_backoff: + The initial backoff interval, in seconds, for the first retry. + :param int increment_base: + The base, in seconds, to increment the initial_backoff by after the + first retry. + :param int retry_total: total number of retries + :param bool retry_to_secondary: + Whether the request should be retried to secondary, if able. This should + only be enabled of RA-GRS accounts are used and potentially stale data + can be handled. + :param int random_jitter_range: + A number in seconds which indicates a range to jitter/randomize for the back-off interval. + For example, a random_jitter_range of 3 results in the back-off interval x to vary between x+3 and x-3. + """ + self.initial_backoff = initial_backoff + self.increment_base = increment_base + self.random_jitter_range = random_jitter_range + self.total_retries = retry_total self.connect_retries = kwargs.pop('retry_connect', 3) self.read_retries = kwargs.pop('retry_read', 3) self.status_retries = kwargs.pop('retry_status', 3) - self.retry_to_secondary = kwargs.pop('retry_to_secondary', False) - super(StorageRetryPolicy, self).__init__() + self.retry_to_secondary = retry_to_secondary + super(TablesRetryPolicy, self).__init__(**kwargs) + + def get_backoff_time(self, settings): + """ + Calculates how long to sleep before retrying. + :param dict settings: + :keyword callable cls: A custom type or function that will be passed the direct response + :return: + An integer indicating how long to wait before retrying the request, + or None to indicate no retry should be performed. + :rtype: int or None + """ + random_generator = random.Random() + backoff = self.initial_backoff + (0 if settings['count'] == 0 else pow(self.increment_base, settings['count'])) + random_range_start = backoff - self.random_jitter_range if backoff > self.random_jitter_range else 0 + random_range_end = backoff + self.random_jitter_range + return random_generator.uniform(random_range_start, random_range_end) def _set_next_host_location(self, settings, request): # pylint: disable=no-self-use """ @@ -384,7 +428,7 @@ def _set_next_host_location(self, settings, request): # pylint: disable=no-self updated = url._replace(netloc=settings['hosts'].get(settings['mode'])) request.url = updated.geturl() - def configure_retries(self, request): # pylint: disable=no-self-use + def configure_retries(self, request): # pylint: disable=no-self-use, arguments-differ # type: (...)-> dict """ :param Any request: @@ -414,17 +458,8 @@ def configure_retries(self, request): # pylint: disable=no-self-use 'history': [] } - def get_backoff_time(self, settings, **kwargs): # pylint: disable=unused-argument,no-self-use - """ Formula for computing the current backoff. - Should be calculated by child class. - :param Any settings: - :keyword callable cls: A custom type or function that will be passed the direct response - :rtype: float - """ - return 0 - - def sleep(self, settings, transport): - # type: (...)->None + def sleep(self, settings, transport): # pylint: disable=arguments-differ + # type: (...) -> None """ :param Any settings: :param Any transport: @@ -435,7 +470,7 @@ def sleep(self, settings, transport): return transport.sleep(backoff) - def increment(self, settings, request, response=None, error=None, **kwargs): # pylint:disable=W0613 + def increment(self, settings, request, response=None, error=None, **kwargs): # pylint:disable=unused-argument, arguments-differ # type: (...)->None """Increment the retry counters. @@ -531,7 +566,7 @@ def send(self, request): return response -class ExponentialRetry(StorageRetryPolicy): +class ExponentialRetry(TablesRetryPolicy): """Exponential retry.""" def __init__(self, initial_backoff=15, increment_base=3, retry_total=3, @@ -565,10 +600,9 @@ def __init__(self, initial_backoff=15, increment_base=3, retry_total=3, super(ExponentialRetry, self).__init__( retry_total=retry_total, retry_to_secondary=retry_to_secondary, **kwargs) - def get_backoff_time(self, settings, **kwargs): + def get_backoff_time(self, settings): """ Calculates how long to sleep before retrying. - :param **kwargs: :param dict settings: :keyword callable cls: A custom type or function that will be passed the direct response :return: @@ -583,7 +617,7 @@ def get_backoff_time(self, settings, **kwargs): return random_generator.uniform(random_range_start, random_range_end) -class LinearRetry(StorageRetryPolicy): +class LinearRetry(TablesRetryPolicy): """Linear retry.""" def __init__(self, backoff=15, retry_total=3, retry_to_secondary=False, random_jitter_range=3, **kwargs): @@ -608,7 +642,7 @@ def __init__(self, backoff=15, retry_total=3, retry_to_secondary=False, random_j super(LinearRetry, self).__init__( retry_total=retry_total, retry_to_secondary=retry_to_secondary, **kwargs) - def get_backoff_time(self, settings, **kwargs): + def get_backoff_time(self, settings): """ Calculates how long to sleep before retrying. diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_policies_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_policies_async.py index 88695af888aa..fe855465a0b8 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_policies_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_policies_async.py @@ -9,10 +9,10 @@ import logging from typing import Any, TYPE_CHECKING -from azure.core.pipeline.policies import AsyncHTTPPolicy +from azure.core.pipeline.policies import AsyncHTTPPolicy, AsyncRetryPolicy from azure.core.exceptions import AzureError -from .._policies import is_retry, StorageRetryPolicy +from .._policies import is_retry, TablesRetryPolicy if TYPE_CHECKING: from azure.core.pipeline import PipelineRequest, PipelineResponse @@ -78,12 +78,56 @@ async def send(self, request): request.context['response_callback'] = response_callback return response -class AsyncStorageRetryPolicy(StorageRetryPolicy): - """ - The base class for Exponential and Linear retries containing shared code. - """ - async def sleep(self, settings, transport): # pylint: disable =W0236 +class AsyncTablesRetryPolicy(AsyncRetryPolicy, TablesRetryPolicy): + """Exponential retry.""" + + def __init__(self, initial_backoff=15, increment_base=3, retry_total=3, + retry_to_secondary=False, random_jitter_range=3, **kwargs): + ''' + Constructs an Exponential retry object. The initial_backoff is used for + the first retry. Subsequent retries are retried after initial_backoff + + increment_power^retry_count seconds. For example, by default the first retry + occurs after 15 seconds, the second after (15+3^1) = 18 seconds, and the + third after (15+3^2) = 24 seconds. + + :param int initial_backoff: + The initial backoff interval, in seconds, for the first retry. + :param int increment_base: + The base, in seconds, to increment the initial_backoff by after the + first retry. + :param int max_attempts: + The maximum number of retry attempts. + :param bool retry_to_secondary: + Whether the request should be retried to secondary, if able. This should + only be enabled of RA-GRS accounts are used and potentially stale data + can be handled. + :param int random_jitter_range: + A number in seconds which indicates a range to jitter/randomize for the back-off interval. + For example, a random_jitter_range of 3 results in the back-off interval x to vary between x+3 and x-3. + ''' + self.initial_backoff = initial_backoff + self.increment_base = increment_base + self.random_jitter_range = random_jitter_range + super(AsyncTablesRetryPolicy, self).__init__( + retry_total=retry_total, retry_to_secondary=retry_to_secondary, **kwargs) + + def get_backoff_time(self, settings): + """ + Calculates how long to sleep before retrying. + + :return: + An integer indicating how long to wait before retrying the request, + or None to indicate no retry should be performed. + :rtype: int or None + """ + random_generator = random.Random() + backoff = self.initial_backoff + (0 if settings['count'] == 0 else pow(self.increment_base, settings['count'])) + random_range_start = backoff - self.random_jitter_range if backoff > self.random_jitter_range else 0 + random_range_end = backoff + self.random_jitter_range + return random_generator.uniform(random_range_start, random_range_end) + + async def sleep(self, settings, transport): # pylint: disable=W0236, arguments-differ backoff = self.get_backoff_time(settings) if not backoff or backoff < 0: return @@ -99,7 +143,6 @@ async def send(self, request): # pylint: disable =W0236 if is_retry(response, retry_settings['mode']): retries_remaining = self.increment( retry_settings, - request=request.http_request, response=response.http_response) if retries_remaining: await retry_hook( @@ -111,8 +154,7 @@ async def send(self, request): # pylint: disable =W0236 continue break except AzureError as err: - retries_remaining = self.increment( - retry_settings, request=request.http_request, error=err) + retries_remaining = self.increment(retry_settings, error=err) if retries_remaining: await retry_hook( retry_settings, @@ -128,7 +170,7 @@ async def send(self, request): # pylint: disable =W0236 return response -class ExponentialRetry(AsyncStorageRetryPolicy): +class ExponentialRetry(AsyncTablesRetryPolicy): """Exponential retry.""" def __init__(self, initial_backoff=15, increment_base=3, retry_total=3, @@ -161,11 +203,10 @@ def __init__(self, initial_backoff=15, increment_base=3, retry_total=3, super(ExponentialRetry, self).__init__( retry_total=retry_total, retry_to_secondary=retry_to_secondary, **kwargs) - def get_backoff_time(self, settings, **kwargs): + def get_backoff_time(self, settings): """ Calculates how long to sleep before retrying. - :param **kwargs: :return: An integer indicating how long to wait before retrying the request, or None to indicate no retry should be performed. @@ -178,7 +219,7 @@ def get_backoff_time(self, settings, **kwargs): return random_generator.uniform(random_range_start, random_range_end) -class LinearRetry(AsyncStorageRetryPolicy): +class LinearRetry(AsyncTablesRetryPolicy): """Linear retry.""" def __init__(self, backoff=15, retry_total=3, retry_to_secondary=False, random_jitter_range=3, **kwargs): @@ -202,7 +243,7 @@ def __init__(self, backoff=15, retry_total=3, retry_to_secondary=False, random_j super(LinearRetry, self).__init__( retry_total=retry_total, retry_to_secondary=retry_to_secondary, **kwargs) - def get_backoff_time(self, settings, **kwargs): + def get_backoff_time(self, settings, **kwargs): # pylint: disable=unused-argument """ Calculates how long to sleep before retrying. diff --git a/sdk/tables/azure-data-tables/tests/test_table_async.py b/sdk/tables/azure-data-tables/tests/test_table_async.py index 5fa577fec1f8..a5dfeeb707f7 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_async.py +++ b/sdk/tables/azure-data-tables/tests/test_table_async.py @@ -283,7 +283,7 @@ async def test_set_table_acl_with_empty_signed_identifiers(self, resource_group, @pytest.mark.skip("pending") @GlobalStorageAccountPreparer() - async def test_set_table_acl_with_empty_signed_identifier(self, resource_group, location, storage_account, + async def test_set_table_acl_with_none_signed_identifier(self, resource_group, location, storage_account, storage_account_key): # Arrange url = self.account_url(storage_account, "table") From 05868af1967cf47596c8272ab7fe71cc339d0d0b Mon Sep 17 00:00:00 2001 From: tasherif-msft <69483382+tasherif-msft@users.noreply.github.com> Date: Mon, 31 Aug 2020 12:08:45 -0700 Subject: [PATCH 04/10] Proper encoding and decoding of source URLs - Fixes special characters in source URL issue (#13275) * Added source url encoder in order to accept special chars * Added source url encoder in order to accept special chars for async * created a private method for encoding source url * removed unused import * removed unused import * fixed method to decode then encode, fixing the case where it was already encoded. Added unit tests * added more tests * yaml for unit test * removed method * removed space * added encoding type * made changes to storage * wheel file * added async tests * removed wheel file --- .../azure/storage/blob/_blob_client.py | 21 +- .../storage/blob/aio/_blob_client_async.py | 8 +- ...block_blob_async.test_copy_blob_async.yaml | 134 +++++ ...nc.test_put_block_from_url_and_commit.yaml | 257 ++++++++++ ...ck_blob_sync_copy.test_copy_blob_sync.yaml | 248 +++++++-- ...py.test_put_block_from_url_and_commit.yaml | 382 ++++++++++++-- ..._page_blob.test_upload_pages_from_url.yaml | 476 +++++++++++++++--- .../tests/test_block_blob_async.py | 67 ++- .../tests/test_block_blob_sync_copy.py | 54 ++ .../tests/test_page_blob.py | 32 ++ 10 files changed, 1510 insertions(+), 169 deletions(-) create mode 100644 sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_copy_blob_async.yaml create mode 100644 sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_put_block_from_url_and_commit.yaml diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py index f78cf7319140..85837199921b 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py @@ -177,6 +177,19 @@ def _format_url(self, hostname): quote(self.blob_name, safe='~/'), self._query_str) + def _encode_source_url(self, source_url): + parsed_source_url = urlparse(source_url) + source_scheme = parsed_source_url.scheme + source_hostname = parsed_source_url.netloc.rstrip('/') + source_path = unquote(parsed_source_url.path) + source_query = parsed_source_url.query + return "{}://{}{}?{}".format( + source_scheme, + source_hostname, + quote(source_path, safe='~/'), + source_query + ) + @classmethod def from_blob_url(cls, blob_url, credential=None, snapshot=None, **kwargs): # type: (str, Optional[Any], Optional[Union[str, Dict[str, Any]]], Any) -> BlobClient @@ -1705,7 +1718,7 @@ def start_copy_from_url(self, source_url, metadata=None, incremental_copy=False, :caption: Copy a blob from a URL. """ options = self._start_copy_from_url_options( - source_url, + source_url=self._encode_source_url(source_url), metadata=metadata, incremental_copy=incremental_copy, **kwargs) @@ -2069,7 +2082,7 @@ def stage_block_from_url( """ options = self._stage_block_from_url_options( block_id, - source_url, + source_url=self._encode_source_url(source_url), source_offset=source_offset, source_length=source_length, source_content_md5=source_content_md5, @@ -3045,7 +3058,7 @@ def upload_pages_from_url(self, source_url, # type: str The timeout parameter is expressed in seconds. """ options = self._upload_pages_from_url_options( - source_url=source_url, + source_url=self._encode_source_url(source_url), offset=offset, length=length, source_offset=source_offset, @@ -3456,7 +3469,7 @@ def append_block_from_url(self, copy_source_url, # type: str The timeout parameter is expressed in seconds. """ options = self._append_block_from_url_options( - copy_source_url, + copy_source_url=self._encode_source_url(copy_source_url), source_offset=source_offset, source_length=source_length, **kwargs diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py index edf6e2dfc468..d88075ae87b9 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py @@ -1037,7 +1037,7 @@ async def start_copy_from_url(self, source_url, metadata=None, incremental_copy= :caption: Copy a blob from a URL. """ options = self._start_copy_from_url_options( - source_url, + source_url=self._encode_source_url(source_url), metadata=metadata, incremental_copy=incremental_copy, **kwargs) @@ -1287,7 +1287,7 @@ async def stage_block_from_url( """ options = self._stage_block_from_url_options( block_id, - source_url, + source_url=self._encode_source_url(source_url), source_offset=source_offset, source_length=source_length, source_content_md5=source_content_md5, @@ -1991,7 +1991,7 @@ async def upload_pages_from_url(self, source_url, # type: str """ options = self._upload_pages_from_url_options( - source_url=source_url, + source_url=self._encode_source_url(source_url), offset=offset, length=length, source_offset=source_offset, @@ -2250,7 +2250,7 @@ async def append_block_from_url(self, copy_source_url, # type: str The timeout parameter is expressed in seconds. """ options = self._append_block_from_url_options( - copy_source_url, + copy_source_url=self._encode_source_url(copy_source_url), source_offset=source_offset, source_length=source_length, **kwargs diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_copy_blob_async.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_copy_blob_async.yaml new file mode 100644 index 000000000000..27e1606ea252 --- /dev/null +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_copy_blob_async.yaml @@ -0,0 +1,134 @@ +interactions: +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Wed, 26 Aug 2020 05:19:30 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer70e51129?restype=container + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 26 Aug 2020 05:19:30 GMT + etag: '"0x8D8497F9C8C44A7"' + last-modified: Wed, 26 Aug 2020 05:19:30 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: '2019-12-12' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer70e51129?restype=container +- request: + body: null + headers: + Content-Length: + - '0' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Wed, 26 Aug 2020 05:19:31 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer70e51129/blob70e51129 + response: + body: + string: '' + headers: + content-length: '0' + content-md5: 1B2M2Y8AsgTpgAmY7PhCfg== + date: Wed, 26 Aug 2020 05:19:31 GMT + etag: '"0x8D8497F9CAD5065"' + last-modified: Wed, 26 Aug 2020 05:19:31 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: AAAAAAAAAAA= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-26T05:19:31.1203429Z' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer70e51129/blob70e51129 +- request: + body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Content-Length: + - '8192' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Wed, 26 Aug 2020 05:19:31 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer70e51129/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob70e51129 + response: + body: + string: '' + headers: + content-length: '0' + content-md5: IhmUBAsUKUvff7wSjmZjPA== + date: Wed, 26 Aug 2020 05:19:31 GMT + etag: '"0x8D8497F9CC0DC00"' + last-modified: Wed, 26 Aug 2020 05:19:31 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: ERTjv26IbjE= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-26T05:19:31.2484352Z' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer70e51129/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob70e51129 +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainer70e51129/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob70e51129?se=2020-08-26T06%3A19%3A31Z&sp=rt&sv=2019-12-12&sr=b&sig=5VNeVcGYJjpvt4L69m5afdCQ88Mq/DBf8zwPuuaqego%3D + x-ms-date: + - Wed, 26 Aug 2020 05:19:31 GMT + x-ms-requires-sync: + - 'True' + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer70e51129/blob70e51129 + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 26 Aug 2020 05:19:31 GMT + etag: '"0x8D8497F9CF32F7E"' + last-modified: Wed, 26 Aug 2020 05:19:31 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: ERTjv26IbjE= + x-ms-copy-id: 5715bd25-f3ce-4c0b-a7a8-c8a687ee1131 + x-ms-copy-status: success + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-26T05:19:31.5836748Z' + status: + code: 202 + message: Accepted + url: https://tamerdevtest.blob.core.windows.net/utcontainer70e51129/blob70e51129 +version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_put_block_from_url_and_commit.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_put_block_from_url_and_commit.yaml new file mode 100644 index 000000000000..4251c50562ad --- /dev/null +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_async.test_put_block_from_url_and_commit.yaml @@ -0,0 +1,257 @@ +interactions: +- request: + body: null + headers: + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Wed, 26 Aug 2020 15:45:04 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5?restype=container + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 26 Aug 2020 15:45:03 GMT + etag: '"0x8D849D70012873C"' + last-modified: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: '2019-12-12' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5?restype=container +- request: + body: null + headers: + Content-Length: + - '0' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Wed, 26 Aug 2020 15:45:04 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5 + response: + body: + string: '' + headers: + content-length: '0' + content-md5: 1B2M2Y8AsgTpgAmY7PhCfg== + date: Wed, 26 Aug 2020 15:45:04 GMT + etag: '"0x8D849D7002B2AD7"' + last-modified: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: AAAAAAAAAAA= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-26T15:45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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Content-Length: + - '8192' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Wed, 26 Aug 2020 15:45:04 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob8d1b16f5 + response: + body: + string: '' + headers: + content-length: '0' + content-md5: IhmUBAsUKUvff7wSjmZjPA== + date: Wed, 26 Aug 2020 15:45:04 GMT + etag: '"0x8D849D7003F0493"' + last-modified: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: ERTjv26IbjE= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-26T15:45:04.3851411Z' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob8d1b16f5 +- request: + body: null + headers: + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob8d1b16f5?se=2020-08-26T16%3A45%3A04Z&sp=rt&sv=2019-12-12&sr=b&sig=nSFk0qXAMw7AFRBRwYhbJ2H6BV0FEqppjDwCQhE2Wyc%3D + x-ms-date: + - Wed, 26 Aug 2020 15:45:04 GMT + x-ms-source-range: + - bytes=0-4095 + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blockid=MQ%3D%3D&comp=block + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: Ep3PX5ZZvPI= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blockid=MQ%3D%3D&comp=block +- request: + body: null + headers: + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob8d1b16f5?se=2020-08-26T16%3A45%3A04Z&sp=rt&sv=2019-12-12&sr=b&sig=nSFk0qXAMw7AFRBRwYhbJ2H6BV0FEqppjDwCQhE2Wyc%3D + x-ms-date: + - Wed, 26 Aug 2020 15:45:05 GMT + x-ms-source-range: + - bytes=4096-8191 + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blockid=Mg%3D%3D&comp=block + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: Ep3PX5ZZvPI= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blockid=Mg%3D%3D&comp=block +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Wed, 26 Aug 2020 15:45:05 GMT + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blocklisttype=all&comp=blocklist + response: + body: + string: "\uFEFFMQ==4096Mg==4096" + headers: + content-type: application/xml + date: Wed, 26 Aug 2020 15:45:04 GMT + etag: '"0x8D849D7002B2AD7"' + last-modified: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-blob-content-length: '0' + x-ms-version: '2019-12-12' + status: + code: 200 + message: OK + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blocklisttype=all&comp=blocklist +- request: + body: ' + + MQ==Mg==' + headers: + Content-Length: + - '104' + Content-Type: + - application/xml; charset=utf-8 + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Wed, 26 Aug 2020 15:45:05 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?comp=blocklist + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 26 Aug 2020 15:45:04 GMT + etag: '"0x8D849D700843076"' + last-modified: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: jBoHqXt/R3g= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2019-12-12' + x-ms-version-id: '2020-08-26T15:45:04.8394630Z' + status: + code: 201 + message: Created + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?comp=blocklist +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Wed, 26 Aug 2020 15:45:05 GMT + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blocklisttype=all&comp=blocklist + response: + body: + string: "\uFEFFMQ==4096Mg==4096" + headers: + content-type: application/xml + date: Wed, 26 Aug 2020 15:45:04 GMT + etag: '"0x8D849D700843076"' + last-modified: Wed, 26 Aug 2020 15:45:04 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-blob-content-length: '8192' + x-ms-version: '2019-12-12' + status: + code: 200 + message: OK + url: https://tamerdevtest.blob.core.windows.net/utcontainer8d1b16f5/blob8d1b16f5?blocklisttype=all&comp=blocklist +version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_copy_blob_sync.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_copy_blob_sync.yaml index 63296199260f..5570d1f0e420 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_copy_blob_sync.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_copy_blob_sync.yaml @@ -11,11 +11,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:20 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainera9621281?restype=container response: @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:43:26 GMT + - Sat, 22 Aug 2020 22:33:18 GMT etag: - - '"0x8D7597B395B9E6A"' + - '"0x8D846EB5EEB248E"' last-modified: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:19 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -53,13 +53,13 @@ interactions: If-None-Match: - '*' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:21 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainera9621281/srcbloba9621281 response: @@ -71,11 +71,11 @@ interactions: content-md5: - IhmUBAsUKUvff7wSjmZjPA== date: - - Fri, 25 Oct 2019 18:43:26 GMT + - Sat, 22 Aug 2020 22:33:19 GMT etag: - - '"0x8D7597B3964F641"' + - '"0x8D846EB5EFF16BC"' last-modified: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:19 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,10 +83,184 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:33:19.7959868Z' status: code: 201 message: Created +- request: + body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '8192' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Sat, 22 Aug 2020 22:33:21 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainera9621281/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86bloba9621281 + response: + body: + string: '' + headers: + content-length: + - '0' + content-md5: + - IhmUBAsUKUvff7wSjmZjPA== + date: + - Sat, 22 Aug 2020 22:33:19 GMT + etag: + - '"0x8D846EB5F1365B4"' + last-modified: + - Sat, 22 Aug 2020 22:33:19 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - ERTjv26IbjE= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:33:19.9290804Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainera9621281/srcbloba9621281?se=2020-08-22T23%3A33%3A21Z&sp=rt&sv=2019-12-12&sr=b&sig=yWlDAXwjK/kWC3IkFPDe8%2BNXNE7sXLcUUpmLNCeAN2k%3D + x-ms-date: + - Sat, 22 Aug 2020 22:33:21 GMT + x-ms-requires-sync: + - 'True' + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainera9621281/destbloba9621281 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Sat, 22 Aug 2020 22:33:19 GMT + etag: + - '"0x8D846EB5F40A70B"' + last-modified: + - Sat, 22 Aug 2020 22:33:20 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - ERTjv26IbjE= + x-ms-copy-id: + - b3d72599-0236-4c0b-bc8e-afc5adfd7898 + x-ms-copy-status: + - success + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:33:20.2282924Z' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 22:33:21 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainera9621281/destbloba9621281 + response: + body: + string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + accept-ranges: + - bytes + content-length: + - '8192' + content-range: + - bytes 0-8191/8192 + content-type: + - application/octet-stream + date: + - Sat, 22 Aug 2020 22:33:19 GMT + etag: + - '"0x8D846EB5F40A70B"' + last-modified: + - Sat, 22 Aug 2020 22:33:20 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-content-md5: + - IhmUBAsUKUvff7wSjmZjPA== + x-ms-blob-type: + - BlockBlob + x-ms-copy-completion-time: + - Sat, 22 Aug 2020 22:33:20 GMT + x-ms-copy-id: + - b3d72599-0236-4c0b-bc8e-afc5adfd7898 + x-ms-copy-progress: + - 8192/8192 + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainera9621281/srcbloba9621281?se=2020-08-22T23%3A33%3A21Z&sp=rt&sv=2019-12-12&sr=b + x-ms-copy-status: + - success + x-ms-creation-time: + - Sat, 22 Aug 2020 22:33:20 GMT + x-ms-is-current-version: + - 'true' + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:33:20.2282924Z' + status: + code: 206 + message: Partial Content - request: body: null headers: @@ -99,15 +273,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-copy-source: - - https://pyacrstoragec3mt3efpmwli.blob.core.windows.net/utcontainera9621281/srcbloba9621281?se=2019-10-25T19%3A43%3A27Z&sp=r&sv=2019-02-02&sr=b&sig=hlXcN9dWXC0HvyNSVzABnGDxS02q%2BU7xUe7mFnWjc3U%3D + - https://tamerdevtest.blob.core.windows.net/utcontainera9621281/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86bloba9621281?se=2020-08-22T23%3A33%3A21Z&sp=rt&sv=2019-12-12&sr=b&sig=OkT%2B1FCMdpMN4pAmakFfgc2%2BEWqGzU0fWrl/042SV1M%3D x-ms-date: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:21 GMT x-ms-requires-sync: - 'True' x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainera9621281/destbloba9621281 response: @@ -117,21 +291,23 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:19 GMT etag: - - '"0x8D7597B39D2239C"' + - '"0x8D846EB5F69E15C"' last-modified: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:33:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: - ERTjv26IbjE= x-ms-copy-id: - - b2f119a9-b94c-4f34-99d7-1101698efbd1 + - c9d62e9a-69f0-48f6-8c38-4fb834db20ab x-ms-copy-status: - success x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:33:20.4974819Z' status: code: 202 message: Accepted @@ -145,13 +321,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:33:21 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: GET uri: https://storagename.blob.core.windows.net/utcontainera9621281/destbloba9621281 response: @@ -167,11 +343,11 @@ interactions: content-type: - application/octet-stream date: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:33:19 GMT etag: - - '"0x8D7597B39D2239C"' + - '"0x8D846EB5F69E15C"' last-modified: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:33:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-content-md5: @@ -179,17 +355,19 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-copy-completion-time: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:33:20 GMT x-ms-copy-id: - - b2f119a9-b94c-4f34-99d7-1101698efbd1 + - c9d62e9a-69f0-48f6-8c38-4fb834db20ab x-ms-copy-progress: - 8192/8192 x-ms-copy-source: - - https://pyacrstoragec3mt3efpmwli.blob.core.windows.net/utcontainera9621281/srcbloba9621281?se=2019-10-25T19%3A43%3A27Z&sp=r&sv=2019-02-02&sr=b&sig=hlXcN9dWXC0HvyNSVzABnGDxS02q%2BU7xUe7mFnWjc3U%3D + - https://tamerdevtest.blob.core.windows.net/utcontainera9621281/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86bloba9621281?se=2020-08-22T23%3A33%3A21Z&sp=rt&sv=2019-12-12&sr=b x-ms-copy-status: - success x-ms-creation-time: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:33:20 GMT + x-ms-is-current-version: + - 'true' x-ms-lease-state: - available x-ms-lease-status: @@ -197,7 +375,9 @@ interactions: x-ms-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:33:20.4974819Z' status: code: 206 message: Partial Content diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_put_block_from_url_and_commit.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_put_block_from_url_and_commit.yaml index 774bdc43f532..76ec6ad22df0 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_put_block_from_url_and_commit.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob_sync_copy.test_put_block_from_url_and_commit.yaml @@ -11,11 +11,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:05:22 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae?restype=container response: @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:43:27 GMT + - Sat, 22 Aug 2020 22:05:21 GMT etag: - - '"0x8D7597B39FF894F"' + - '"0x8D846E776FF3690"' last-modified: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:05:22 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -53,13 +53,13 @@ interactions: If-None-Match: - '*' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:05:23 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/srcblobf05f18ae response: @@ -71,11 +71,11 @@ interactions: content-md5: - IhmUBAsUKUvff7wSjmZjPA== date: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:05:21 GMT etag: - - '"0x8D7597B3A468BD1"' + - '"0x8D846E77716AEDE"' last-modified: - - Fri, 25 Oct 2019 18:43:28 GMT + - Sat, 22 Aug 2020 22:05:22 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,7 +83,61 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:05:22.2290142Z' + status: + code: 201 + message: Created +- request: + body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '8192' + Content-Type: + - application/octet-stream + If-None-Match: + - '*' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Sat, 22 Aug 2020 22:05:23 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blobf05f18ae + response: + body: + string: '' + headers: + content-length: + - '0' + content-md5: + - IhmUBAsUKUvff7wSjmZjPA== + date: + - Sat, 22 Aug 2020 22:05:21 GMT + etag: + - '"0x8D846E7772E80FB"' + last-modified: + - Sat, 22 Aug 2020 22:05:22 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - ERTjv26IbjE= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:05:22.3861261Z' status: code: 201 message: Created @@ -99,15 +153,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-copy-source: - - https://pyacrstoragec3mt3efpmwli.blob.core.windows.net/utcontainerf05f18ae/srcblobf05f18ae?se=2019-10-25T19%3A43%3A29Z&sp=r&sv=2019-02-02&sr=b&sig=pmp7GJORAWc/qr7iDlbbXynQb32xBuXKE4JR6pYy7xk%3D + - https://tamerdevtest.blob.core.windows.net/utcontainerf05f18ae/srcblobf05f18ae?se=2020-08-22T23%3A05%3A23Z&sp=rt&sv=2019-12-12&sr=b&sig=ur2OzABfFKhLGRRFnrkIkZzptQwkVuRUMewNriXJw5I%3D x-ms-date: - - Fri, 25 Oct 2019 18:43:29 GMT + - Sat, 22 Aug 2020 22:05:32 GMT x-ms-source-range: - bytes=0-4095 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?blockid=MQ%3D%3D&comp=block response: @@ -117,7 +171,7 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:43:29 GMT + - Sat, 22 Aug 2020 22:05:30 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -125,7 +179,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -141,15 +195,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-copy-source: - - https://pyacrstoragec3mt3efpmwli.blob.core.windows.net/utcontainerf05f18ae/srcblobf05f18ae?se=2019-10-25T19%3A43%3A29Z&sp=r&sv=2019-02-02&sr=b&sig=pmp7GJORAWc/qr7iDlbbXynQb32xBuXKE4JR6pYy7xk%3D + - https://tamerdevtest.blob.core.windows.net/utcontainerf05f18ae/srcblobf05f18ae?se=2020-08-22T23%3A05%3A23Z&sp=rt&sv=2019-12-12&sr=b&sig=ur2OzABfFKhLGRRFnrkIkZzptQwkVuRUMewNriXJw5I%3D x-ms-date: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:14 GMT x-ms-source-range: - bytes=4096-8191 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?blockid=Mg%3D%3D&comp=block response: @@ -159,7 +213,7 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:43:29 GMT + - Sat, 22 Aug 2020 22:06:12 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -167,7 +221,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -181,11 +235,11 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:14 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: GET uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?blocklisttype=all&comp=blocklist response: @@ -196,13 +250,13 @@ interactions: content-type: - application/xml date: - - Fri, 25 Oct 2019 18:43:29 GMT + - Sat, 22 Aug 2020 22:06:12 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 200 message: OK @@ -222,11 +276,11 @@ interactions: Content-Type: - application/xml; charset=utf-8 User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:14 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?comp=blocklist response: @@ -236,11 +290,11 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:43:29 GMT + - Sat, 22 Aug 2020 22:06:12 GMT etag: - - '"0x8D7597B3AF1E953"' + - '"0x8D846E795A2164F"' last-modified: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:13 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -248,7 +302,239 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:06:13.4742607Z' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 22:06:14 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae + response: + body: + string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + accept-ranges: + - bytes + content-length: + - '8192' + content-range: + - bytes 0-8191/8192 + content-type: + - application/octet-stream + date: + - Sat, 22 Aug 2020 22:06:13 GMT + etag: + - '"0x8D846E795A2164F"' + last-modified: + - Sat, 22 Aug 2020 22:06:13 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Sat, 22 Aug 2020 22:06:13 GMT + x-ms-is-current-version: + - 'true' + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:06:13.4742607Z' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainerf05f18ae/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blobf05f18ae?se=2020-08-22T23%3A05%3A23Z&sp=rt&sv=2019-12-12&sr=b&sig=33UzXINjfLjuvsT/X5TQwCuruo1DR8xasVf49CrKU7w%3D + x-ms-date: + - Sat, 22 Aug 2020 22:06:47 GMT + x-ms-source-range: + - bytes=0-4095 + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?blockid=Mw%3D%3D&comp=block + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Sat, 22 Aug 2020 22:06:45 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - Ep3PX5ZZvPI= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainerf05f18ae/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blobf05f18ae?se=2020-08-22T23%3A05%3A23Z&sp=rt&sv=2019-12-12&sr=b&sig=33UzXINjfLjuvsT/X5TQwCuruo1DR8xasVf49CrKU7w%3D + x-ms-date: + - Sat, 22 Aug 2020 22:06:48 GMT + x-ms-source-range: + - bytes=4096-8191 + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?blockid=NA%3D%3D&comp=block + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Sat, 22 Aug 2020 22:06:46 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - Ep3PX5ZZvPI= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 22:06:48 GMT + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?blocklisttype=all&comp=blocklist + response: + body: + string: "\uFEFFMQ==4096Mg==4096Mw==4096NA==4096" + headers: + content-type: + - application/xml + date: + - Sat, 22 Aug 2020 22:06:46 GMT + etag: + - '"0x8D846E795A2164F"' + last-modified: + - Sat, 22 Aug 2020 22:06:13 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-blob-content-length: + - '8192' + x-ms-version: + - '2019-12-12' + status: + code: 200 + message: OK +- request: + body: ' + + Mw==NA==' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '104' + Content-Type: + - application/xml; charset=utf-8 + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 22:06:48 GMT + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae?comp=blocklist + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Sat, 22 Aug 2020 22:06:46 GMT + etag: + - '"0x8D846E7A9F30FF1"' + last-modified: + - Sat, 22 Aug 2020 22:06:47 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - NtnF99lsyrs= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:06:47.5603713Z' status: code: 201 message: Created @@ -262,13 +548,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:48 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: GET uri: https://storagename.blob.core.windows.net/utcontainerf05f18ae/destblobf05f18ae response: @@ -284,17 +570,19 @@ interactions: content-type: - application/octet-stream date: - - Fri, 25 Oct 2019 18:43:29 GMT + - Sat, 22 Aug 2020 22:06:47 GMT etag: - - '"0x8D7597B3AF1E953"' + - '"0x8D846E7A9F30FF1"' last-modified: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:47 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Fri, 25 Oct 2019 18:43:30 GMT + - Sat, 22 Aug 2020 22:06:47 GMT + x-ms-is-current-version: + - 'true' x-ms-lease-state: - available x-ms-lease-status: @@ -302,7 +590,9 @@ interactions: x-ms-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T22:06:47.5603713Z' status: code: 206 message: Partial Content diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob.test_upload_pages_from_url.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob.test_upload_pages_from_url.yaml index f6099bc49a28..a73f46eb3e10 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob.test_upload_pages_from_url.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_page_blob.test_upload_pages_from_url.yaml @@ -11,11 +11,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:20 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1?restype=container response: @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:18 GMT etag: - - '"0x8D759767EA8C83D"' + - '"0x8D846F6D35B46BA"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:19 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -49,11 +49,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:20 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainersource5dfe10c1?restype=container response: @@ -63,15 +63,15 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:19 GMT etag: - - '"0x8D759767EB10722"' + - '"0x8D846F6D3727C64"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:19 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -87,15 +87,15 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-blob-content-length: - '8192' x-ms-blob-type: - PageBlob x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainersource5dfe10c1/blob5dfe10c1 response: @@ -105,17 +105,19 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:19 GMT etag: - - '"0x8D759767EB9AEE7"' + - '"0x8D846F6D3893760"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:19 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:19.7809504Z' status: code: 201 message: Created @@ -133,15 +135,15 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT x-ms-page-write: - update x-ms-range: - bytes=0-8191 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainersource5dfe10c1/blob5dfe10c1?comp=page response: @@ -150,22 +152,22 @@ interactions: headers: content-length: - '0' + content-md5: + - IhmUBAsUKUvff7wSjmZjPA== date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:19 GMT etag: - - '"0x8D759767EC1C69F"' + - '"0x8D846F6D3A01EE5"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:19 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-sequence-number: - '0' - x-ms-content-crc64: - - ERTjv26IbjE= x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -181,15 +183,111 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-blob-content-length: - '8192' x-ms-blob-type: - PageBlob x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainersource5dfe10c1/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob5dfe10c1 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Sat, 22 Aug 2020 23:55:19 GMT + etag: + - '"0x8D846F6D3B7C9E1"' + last-modified: + - Sat, 22 Aug 2020 23:55:20 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:20.0871673Z' + status: + code: 201 + message: Created +- request: + body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '8192' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 23:55:21 GMT + x-ms-page-write: + - update + x-ms-range: + - bytes=0-8191 + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainersource5dfe10c1/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob5dfe10c1?comp=page + response: + body: + string: '' + headers: + content-length: + - '0' + content-md5: + - IhmUBAsUKUvff7wSjmZjPA== + date: + - Sat, 22 Aug 2020 23:55:19 GMT + etag: + - '"0x8D846F6D3CF74DE"' + last-modified: + - Sat, 22 Aug 2020 23:55:20 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-sequence-number: + - '0' + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-blob-content-length: + - '8192' + x-ms-blob-type: + - PageBlob + x-ms-date: + - Sat, 22 Aug 2020 23:55:21 GMT + x-ms-version: + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1 response: @@ -199,17 +297,19 @@ interactions: content-length: - '0' date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:19 GMT etag: - - '"0x8D759767EC9B743"' + - '"0x8D846F6D3E68376"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:20.3933837Z' status: code: 201 message: Created @@ -225,11 +325,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-copy-source: - - https://pyacrstoragedtrpf3xfnfdp.blob.core.windows.net/utcontainersource5dfe10c1/blob5dfe10c1?se=2019-10-25T19%3A09%3A36Z&sp=rd&sv=2019-02-02&sr=b&sig=5V5rE7JxXyu5zkiy1GeSqpxXicJjITU1vZ4RNt8HrfA%3D + - https://tamerdevtest.blob.core.windows.net/utcontainersource5dfe10c1/blob5dfe10c1?se=2020-08-23T00%3A55%3A21Z&sp=rdt&sv=2019-12-12&sr=b&sig=sUiZ2hFamJ6zGFddsNvmAbHp1d8GNLCcP5tOvWYHhQA%3D x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT x-ms-page-write: - update x-ms-range: @@ -237,7 +337,7 @@ interactions: x-ms-source-range: - bytes=0-4095 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1?comp=page response: @@ -246,22 +346,22 @@ interactions: headers: content-length: - '0' + content-md5: + - IaGZxT9CKjgOILFi+26+nA== date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:20 GMT etag: - - '"0x8D759767ED68AC3"' + - '"0x8D846F6D442BDE2"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-sequence-number: - '0' - x-ms-content-crc64: - - Ep3PX5ZZvPI= x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -277,11 +377,11 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-copy-source: - - https://pyacrstoragedtrpf3xfnfdp.blob.core.windows.net/utcontainersource5dfe10c1/blob5dfe10c1?se=2019-10-25T19%3A09%3A36Z&sp=rd&sv=2019-02-02&sr=b&sig=5V5rE7JxXyu5zkiy1GeSqpxXicJjITU1vZ4RNt8HrfA%3D + - https://tamerdevtest.blob.core.windows.net/utcontainersource5dfe10c1/blob5dfe10c1?se=2020-08-23T00%3A55%3A21Z&sp=rdt&sv=2019-12-12&sr=b&sig=sUiZ2hFamJ6zGFddsNvmAbHp1d8GNLCcP5tOvWYHhQA%3D x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:22 GMT x-ms-page-write: - update x-ms-range: @@ -289,7 +389,7 @@ interactions: x-ms-source-range: - bytes=4096-8191 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: PUT uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1?comp=page response: @@ -298,22 +398,22 @@ interactions: headers: content-length: - '0' + content-md5: + - IaGZxT9CKjgOILFi+26+nA== date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:20 GMT etag: - - '"0x8D759767EDEF096"' + - '"0x8D846F6D458E1F4"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-sequence-number: - '0' - x-ms-content-crc64: - - Ep3PX5ZZvPI= x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 201 message: Created @@ -327,11 +427,11 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:22 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: HEAD uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1 response: @@ -345,11 +445,11 @@ interactions: content-type: - application/octet-stream date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:20 GMT etag: - - '"0x8D759767EDEF096"' + - '"0x8D846F6D458E1F4"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-sequence-number: @@ -357,7 +457,9 @@ interactions: x-ms-blob-type: - PageBlob x-ms-creation-time: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:20 GMT + x-ms-is-current-version: + - 'true' x-ms-lease-state: - available x-ms-lease-status: @@ -365,7 +467,9 @@ interactions: x-ms-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:20.3933837Z' status: code: 200 message: OK @@ -379,13 +483,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:22 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - - '2019-02-02' + - '2019-12-12' method: GET uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1 response: @@ -401,11 +505,11 @@ interactions: content-type: - application/octet-stream date: - - Fri, 25 Oct 2019 18:09:35 GMT + - Sat, 22 Aug 2020 23:55:20 GMT etag: - - '"0x8D759767EDEF096"' + - '"0x8D846F6D458E1F4"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:21 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-blob-sequence-number: @@ -413,7 +517,217 @@ interactions: x-ms-blob-type: - PageBlob x-ms-creation-time: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:20 GMT + x-ms-is-current-version: + - 'true' + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:20.3933837Z' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 23:55:22 GMT + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1?comp=pagelist + response: + body: + string: "\uFEFF08191" + headers: + content-type: + - application/xml + date: + - Sat, 22 Aug 2020 23:55:21 GMT + etag: + - '"0x8D846F6D458E1F4"' + last-modified: + - Sat, 22 Aug 2020 23:55:21 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-blob-content-length: + - '8192' + x-ms-version: + - '2019-12-12' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-copy-source: + - https://tamerdevtest.blob.core.windows.net/utcontainersource5dfe10c1/%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4%C2%A5test/testsub%C3%90ir%C3%8D/src%C3%86blob5dfe10c1?se=2020-08-23T00%3A55%3A21Z&sp=rdt&sv=2019-12-12&sr=b&sig=aQAXAXPEcm%2BE%2BDLpjddg6tZ5xP8MrT5puW3CdWCQXks%3D + x-ms-date: + - Sat, 22 Aug 2020 23:55:23 GMT + x-ms-page-write: + - update + x-ms-range: + - bytes=0-4095 + x-ms-source-range: + - bytes=0-4095 + x-ms-version: + - '2019-12-12' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1?comp=page + response: + body: + string: '' + headers: + content-length: + - '0' + content-md5: + - IaGZxT9CKjgOILFi+26+nA== + date: + - Sat, 22 Aug 2020 23:55:21 GMT + etag: + - '"0x8D846F6D4F5655A"' + last-modified: + - Sat, 22 Aug 2020 23:55:22 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-sequence-number: + - '0' + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 23:55:23 GMT + x-ms-version: + - '2019-12-12' + method: HEAD + uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1 + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '8192' + content-type: + - application/octet-stream + date: + - Sat, 22 Aug 2020 23:55:21 GMT + etag: + - '"0x8D846F6D4F5655A"' + last-modified: + - Sat, 22 Aug 2020 23:55:22 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-sequence-number: + - '0' + x-ms-blob-type: + - PageBlob + x-ms-creation-time: + - Sat, 22 Aug 2020 23:55:20 GMT + x-ms-is-current-version: + - 'true' + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:20.3933837Z' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) + x-ms-date: + - Sat, 22 Aug 2020 23:55:23 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2019-12-12' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1 + response: + body: + string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + accept-ranges: + - bytes + content-length: + - '8192' + content-range: + - bytes 0-8191/8192 + content-type: + - application/octet-stream + date: + - Sat, 22 Aug 2020 23:55:21 GMT + etag: + - '"0x8D846F6D4F5655A"' + last-modified: + - Sat, 22 Aug 2020 23:55:22 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-blob-sequence-number: + - '0' + x-ms-blob-type: + - PageBlob + x-ms-creation-time: + - Sat, 22 Aug 2020 23:55:20 GMT + x-ms-is-current-version: + - 'true' x-ms-lease-state: - available x-ms-lease-status: @@ -421,7 +735,9 @@ interactions: x-ms-server-encrypted: - 'true' x-ms-version: - - '2019-02-02' + - '2019-12-12' + x-ms-version-id: + - '2020-08-22T23:55:20.3933837Z' status: code: 206 message: Partial Content @@ -435,11 +751,11 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.4.0 Python/3.8.5 (Windows-10-10.0.18362-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:09:37 GMT + - Sat, 22 Aug 2020 23:55:23 GMT x-ms-version: - - '2019-02-02' + - '2019-12-12' method: GET uri: https://storagename.blob.core.windows.net/utcontainer5dfe10c1/blob5dfe10c1?comp=pagelist response: @@ -449,11 +765,11 @@ interactions: content-type: - application/xml date: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:22 GMT etag: - - '"0x8D759767EDEF096"' + - '"0x8D846F6D4F5655A"' last-modified: - - Fri, 25 Oct 2019 18:09:36 GMT + - Sat, 22 Aug 2020 23:55:22 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -461,7 +777,7 @@ interactions: x-ms-blob-content-length: - '8192' x-ms-version: - - '2019-02-02' + - '2019-12-12' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/test_block_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_block_blob_async.py index 0b158529f338..bdfb2e5fc00c 100644 --- a/sdk/storage/azure-storage-blob/tests/test_block_blob_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_block_blob_async.py @@ -11,6 +11,7 @@ import asyncio import uuid +from datetime import datetime, timedelta from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceModifiedError from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy @@ -22,7 +23,9 @@ BlobType, ContentSettings, BlobBlock, - StandardBlobTier + StandardBlobTier, + generate_blob_sas, + BlobSasPermissions ) from azure.storage.blob.aio import ( @@ -77,6 +80,24 @@ def _teardown(self, FILE_PATH): def _get_blob_reference(self): return self.get_resource_name(TEST_BLOB_PREFIX) + def _get_blob_with_special_chars_reference(self): + return 'भारत¥test/testsubÐirÍ/'+self.get_resource_name('srcÆblob') + + async def _create_source_blob_url_with_special_chars(self, tags=None): + blob_name = self._get_blob_with_special_chars_reference() + blob = self.bsc.get_blob_client(self.container_name, blob_name) + await blob.upload_blob(self.get_random_bytes(8 * 1024)) + sas_token_for_special_chars = generate_blob_sas( + blob.account_name, + blob.container_name, + blob.blob_name, + snapshot=blob.snapshot, + account_key=blob.credential.account_key, + permission=BlobSasPermissions(read=True), + expiry=datetime.utcnow() + timedelta(hours=1), + ) + return BlobClient.from_blob_url(blob.url, credential=sas_token_for_special_chars).url + async def _create_blob(self, tags=None): blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -115,6 +136,50 @@ async def test_put_block(self, resource_group, location, storage_account, storag # Assert + @GlobalStorageAccountPreparer() + @AsyncStorageTestCase.await_prepared_test + async def test_copy_blob_async(self, resource_group, location, storage_account, storage_account_key): + await self._setup(storage_account, storage_account_key) + dest_blob = await self._create_blob() + source_blob_url = await self._create_source_blob_url_with_special_chars() + + # Act + copy_props = await dest_blob.start_copy_from_url(source_blob_url, requires_sync=True) + + # Assert + self.assertIsNotNone(copy_props) + self.assertIsNotNone(copy_props['copy_id']) + self.assertEqual('success', copy_props['copy_status']) + + @GlobalStorageAccountPreparer() + @AsyncStorageTestCase.await_prepared_test + async def test_put_block_from_url_and_commit(self, resource_group, location, storage_account, storage_account_key): + await self._setup(storage_account, storage_account_key) + dest_blob = await self._create_blob() + source_blob_url = await self._create_source_blob_url_with_special_chars() + split = 4 * 1024 + # Act part 1: make put block from url calls + await dest_blob.stage_block_from_url( + block_id=1, + source_url=source_blob_url, + source_offset=0, + source_length=split) + await dest_blob.stage_block_from_url( + block_id=2, + source_url=source_blob_url, + source_offset=split, + source_length=split) + + # Assert blocks + committed, uncommitted = await dest_blob.get_block_list('all') + self.assertEqual(len(uncommitted), 2) + self.assertEqual(len(committed), 0) + # Act part 2: commit the blocks + await dest_blob.commit_block_list(['1', '2']) + committed, uncommitted = await dest_blob.get_block_list('all') + self.assertEqual(len(uncommitted), 0) + self.assertEqual(len(committed), 2) + @GlobalStorageAccountPreparer() @AsyncStorageTestCase.await_prepared_test async def test_put_block_with_response(self, resource_group, location, storage_account, storage_account_key): diff --git a/sdk/storage/azure-storage-blob/tests/test_block_blob_sync_copy.py b/sdk/storage/azure-storage-blob/tests/test_block_blob_sync_copy.py index 56c44211ac70..9f95fcb5790f 100644 --- a/sdk/storage/azure-storage-blob/tests/test_block_blob_sync_copy.py +++ b/sdk/storage/azure-storage-blob/tests/test_block_blob_sync_copy.py @@ -1,3 +1,5 @@ +# coding: utf-8 + # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for @@ -40,12 +42,17 @@ def _setup(self, storage_account, key): # create source blob to be copied from self.source_blob_name = self.get_resource_name('srcblob') + self.source_blob_name_with_special_chars = 'भारत¥test/testsubÐirÍ/'+self.get_resource_name('srcÆblob') self.source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) + self.source_blob_with_special_chars_data = self.get_random_bytes(SOURCE_BLOB_SIZE) blob = self.bsc.get_blob_client(self.container_name, self.source_blob_name) + blob_with_special_chars = self.bsc.get_blob_client(self.container_name, self.source_blob_name_with_special_chars) + if self.is_live: self.bsc.create_container(self.container_name) blob.upload_blob(self.source_blob_data) + blob_with_special_chars.upload_blob(self.source_blob_with_special_chars_data) # generate a SAS so that it is accessible with a URL sas_token = generate_blob_sas( @@ -57,7 +64,19 @@ def _setup(self, storage_account, key): permission=BlobSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1), ) + # generate a SAS so that it is accessible with a URL + sas_token_for_special_chars = generate_blob_sas( + blob_with_special_chars.account_name, + blob_with_special_chars.container_name, + blob_with_special_chars.blob_name, + snapshot=blob_with_special_chars.snapshot, + account_key=blob_with_special_chars.credential.account_key, + permission=BlobSasPermissions(read=True), + expiry=datetime.utcnow() + timedelta(hours=1), + ) self.source_blob_url = BlobClient.from_blob_url(blob.url, credential=sas_token).url + self.source_blob_url_with_special_chars = BlobClient.from_blob_url( + blob_with_special_chars.url, credential=sas_token_for_special_chars).url @GlobalStorageAccountPreparer() def test_put_block_from_url_and_commit(self, resource_group, location, storage_account, storage_account_key): @@ -91,6 +110,30 @@ def test_put_block_from_url_and_commit(self, resource_group, location, storage_a self.assertEqual(len(content), 8 * 1024) self.assertEqual(content, self.source_blob_data) + dest_blob.stage_block_from_url( + block_id=3, + source_url=self.source_blob_url_with_special_chars, + source_offset=0, + source_length=split) + dest_blob.stage_block_from_url( + block_id=4, + source_url=self.source_blob_url_with_special_chars, + source_offset=split, + source_length=split) + + # Assert blocks + committed, uncommitted = dest_blob.get_block_list('all') + self.assertEqual(len(uncommitted), 2) + self.assertEqual(len(committed), 2) + + # Act part 2: commit the blocks + dest_blob.commit_block_list(['3', '4']) + + # Assert destination blob has right content + content = dest_blob.download_blob().readall() + self.assertEqual(len(content), 8 * 1024) + self.assertEqual(content, self.source_blob_with_special_chars_data) + @GlobalStorageAccountPreparer() def test_put_block_from_url_and_validate_content_md5(self, resource_group, location, storage_account, storage_account_key): self._setup(storage_account, storage_account_key) @@ -145,6 +188,17 @@ def test_copy_blob_sync(self, resource_group, location, storage_account, storage content = dest_blob.download_blob().readall() self.assertEqual(self.source_blob_data, content) + copy_props_with_special_chars = dest_blob.start_copy_from_url(self.source_blob_url_with_special_chars, requires_sync=True) + + # Assert + self.assertIsNotNone(copy_props_with_special_chars) + self.assertIsNotNone(copy_props_with_special_chars['copy_id']) + self.assertEqual('success', copy_props_with_special_chars['copy_status']) + + # Verify content + content = dest_blob.download_blob().readall() + self.assertEqual(self.source_blob_with_special_chars_data, content) + @pytest.mark.playback_test_only @GlobalStorageAccountPreparer() def test_sync_copy_blob_returns_vid(self, resource_group, location, storage_account, storage_account_key): diff --git a/sdk/storage/azure-storage-blob/tests/test_page_blob.py b/sdk/storage/azure-storage-blob/tests/test_page_blob.py index c08384d0b345..de618198ef0e 100644 --- a/sdk/storage/azure-storage-blob/tests/test_page_blob.py +++ b/sdk/storage/azure-storage-blob/tests/test_page_blob.py @@ -68,6 +68,13 @@ def _create_blob(self, bsc, length=512, sequence_number=None, tags=None): blob.create_page_blob(size=length, sequence_number=sequence_number, tags=tags) return blob + def _create_source_blob_with_special_chars(self, bs, data, offset, length): + blob_client = bs.get_blob_client(self.source_container_name, + 'भारत¥test/testsubÐirÍ/'+self.get_resource_name('srcÆblob')) + blob_client.create_page_blob(size=length) + blob_client.upload_page(data, offset=offset, length=length) + return blob_client + def _create_source_blob(self, bs, data, offset, length): blob_client = bs.get_blob_client(self.source_container_name, self.get_resource_name(TEST_BLOB_PREFIX)) @@ -407,6 +414,9 @@ def test_upload_pages_from_url(self, resource_group, location, storage_account, self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) + source_blob_client_with_special_chars = self._create_source_blob_with_special_chars( + bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) + sas = generate_blob_sas( source_blob_client.account_name, source_blob_client.container_name, @@ -416,6 +426,15 @@ def test_upload_pages_from_url(self, resource_group, location, storage_account, permission=BlobSasPermissions(read=True, delete=True), expiry=datetime.utcnow() + timedelta(hours=1)) + sas_token_for_blob_with_special_chars = generate_blob_sas( + source_blob_client_with_special_chars.account_name, + source_blob_client_with_special_chars.container_name, + source_blob_client_with_special_chars.blob_name, + snapshot=source_blob_client_with_special_chars.snapshot, + account_key=source_blob_client_with_special_chars.credential.account_key, + permission=BlobSasPermissions(read=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1)) + destination_blob_client = self._create_blob(bsc, length=SOURCE_BLOB_SIZE) # Act: make update page from url calls @@ -437,6 +456,19 @@ def test_upload_pages_from_url(self, resource_group, location, storage_account, self.assertEqual(blob_properties.get('etag'), resp.get('etag')) self.assertEqual(blob_properties.get('last_modified'), resp.get('last_modified')) + # Act: make update page from url calls + source_with_special_chars_resp = destination_blob_client.upload_pages_from_url( + source_blob_client_with_special_chars.url + "?" + sas_token_for_blob_with_special_chars, offset=0, length=4 * 1024, source_offset=0) + self.assertIsNotNone(source_with_special_chars_resp.get('etag')) + self.assertIsNotNone(source_with_special_chars_resp.get('last_modified')) + + # Assert the destination blob is constructed correctly + blob_properties = destination_blob_client.get_blob_properties() + self.assertEqual(blob_properties.size, SOURCE_BLOB_SIZE) + self.assertBlobEqual(self.container_name, destination_blob_client.blob_name, source_blob_data, bsc) + self.assertEqual(blob_properties.get('etag'), source_with_special_chars_resp.get('etag')) + self.assertEqual(blob_properties.get('last_modified'), source_with_special_chars_resp.get('last_modified')) + @GlobalStorageAccountPreparer() def test_upload_pages_from_url_and_validate_content_md5(self, resource_group, location, storage_account, storage_account_key): # Arrange From c77746b85ea21cf7d72c498c455d4bbf8897d2e4 Mon Sep 17 00:00:00 2001 From: KieranBrantnerMagee Date: Mon, 31 Aug 2020 13:33:18 -0700 Subject: [PATCH 05/10] [ServiceBus] Test and failure improvements (#13345) A smattering of small test improvements. - ensure incorrect_queue_conn_str test validates success and failure cases and consistency of different entry points. - ensure specificity of authorization/authenication errors - Begin adding "raises" stanzas to docstrings. - normalize convert_connection_string_to_kwargs to throw AuthenticationError on misaligned entity_path - fix flaky scheduled tests: both moving away from the receive_messages calls in tests, and making scheduled vs enqueue time a <= relationshi rather than ==. - similarly, if we're using the "source of truth" internal time for max wait time valdiation, must be<= since the milliseconds can actually be EXACT. - Add missing ServiceBusAuthorizationError as import for more precise tests. - ensure batch fetching in tests is recurrent to make more robust. --- sdk/servicebus/azure-servicebus/CHANGELOG.md | 1 + .../azure/servicebus/_base_handler.py | 4 +- .../azure/servicebus/_servicebus_receiver.py | 3 ++ .../azure/servicebus/_servicebus_sender.py | 3 ++ .../_servicebus_session_receiver.py | 3 ++ .../azure/servicebus/aio/__init__.py | 4 +- .../aio/_servicebus_receiver_async.py | 3 ++ .../aio/_servicebus_sender_async.py | 3 ++ .../aio/_servicebus_session_receiver_async.py | 3 ++ .../tests/async_tests/test_queues_async.py | 37 ++++++++------- .../azure-servicebus/tests/test_queues.py | 46 +++++++++++++------ .../azure-servicebus/tests/test_sb_client.py | 30 ++++++++++-- 12 files changed, 101 insertions(+), 39 deletions(-) diff --git a/sdk/servicebus/azure-servicebus/CHANGELOG.md b/sdk/servicebus/azure-servicebus/CHANGELOG.md index 122d0f541f31..a8bf7de0cf3d 100644 --- a/sdk/servicebus/azure-servicebus/CHANGELOG.md +++ b/sdk/servicebus/azure-servicebus/CHANGELOG.md @@ -5,6 +5,7 @@ **Breaking Changes** * `ServiceBusClient.close()` now closes spawned senders and receivers. +* Attempting to initialize a sender or receiver with a different connection string entity and specified entity (e.g. `queue_name`) will result in an AuthenticationError ## 7.0.0b5 (2020-08-10) diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_base_handler.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_base_handler.py index 223180d1bf11..80b181d116a9 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_base_handler.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_base_handler.py @@ -21,7 +21,7 @@ from ._common._configuration import Configuration from .exceptions import ( ServiceBusError, - ServiceBusAuthorizationError, + ServiceBusAuthenticationError, _create_servicebus_exception ) from ._common.utils import create_properties @@ -104,7 +104,7 @@ def _convert_connection_string_to_kwargs(conn_str, shared_key_credential_type, * entity_in_kwargs = queue_name or topic_name if entity_in_conn_str and entity_in_kwargs and (entity_in_conn_str != entity_in_kwargs): - raise ServiceBusAuthorizationError( + raise ServiceBusAuthenticationError( "Entity names do not match, the entity name in connection string is {};" " the entity name in parameter is {}.".format(entity_in_conn_str, entity_in_kwargs) ) diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py index 130ff7a77f7e..883a291581c3 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py @@ -352,6 +352,9 @@ def from_connection_string( within its request to the service. :rtype: ~azure.servicebus.ServiceBusReceiver + :raises ~azure.servicebus.ServiceBusAuthenticationError: Indicates an issue in token/identity validity. + :raises ~azure.servicebus.ServiceBusAuthorizationError: Indicates an access/rights related failure. + .. admonition:: Example: .. literalinclude:: ../samples/sync_samples/sample_code_servicebus.py diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_sender.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_sender.py index a5a5131cac22..2ba095b5f2f6 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_sender.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_sender.py @@ -284,6 +284,9 @@ def from_connection_string( :rtype: ~azure.servicebus.ServiceBusSender + :raises ~azure.servicebus.ServiceBusAuthenticationError: Indicates an issue in token/identity validity. + :raises ~azure.servicebus.ServiceBusAuthorizationError: Indicates an access/rights related failure. + .. admonition:: Example: .. literalinclude:: ../samples/sync_samples/sample_code_servicebus.py diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_session_receiver.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_session_receiver.py index e69d30d2f847..c6a6bcc33d35 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_session_receiver.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_session_receiver.py @@ -154,6 +154,9 @@ def from_connection_string( within its request to the service. :rtype: ~azure.servicebus.ServiceBusSessionReceiver + :raises ~azure.servicebus.ServiceBusAuthenticationError: Indicates an issue in token/identity validity. + :raises ~azure.servicebus.ServiceBusAuthorizationError: Indicates an access/rights related failure. + .. admonition:: Example: .. literalinclude:: ../samples/sync_samples/sample_code_servicebus.py diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/__init__.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/__init__.py index 8db9f20d7b1c..4e13bf070d49 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/__init__.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/__init__.py @@ -18,7 +18,7 @@ 'ServiceBusSender', 'ServiceBusReceiver', 'ServiceBusSessionReceiver', + 'ServiceBusSession', 'ServiceBusSharedKeyCredential', - 'AutoLockRenew', - 'ServiceBusSession' + 'AutoLockRenew' ] diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py index ac3a7a672f9d..da6c4b6e72e5 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py @@ -347,6 +347,9 @@ def from_connection_string( within its request to the service. :rtype: ~azure.servicebus.aio.ServiceBusReceiver + :raises ~azure.servicebus.ServiceBusAuthenticationError: Indicates an issue in token/identity validity. + :raises ~azure.servicebus.ServiceBusAuthorizationError: Indicates an access/rights related failure. + .. admonition:: Example: .. literalinclude:: ../samples/async_samples/sample_code_servicebus_async.py diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_sender_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_sender_async.py index 4171981a4599..d427159074e7 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_sender_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_sender_async.py @@ -223,6 +223,9 @@ def from_connection_string( :keyword str user_agent: If specified, this will be added in front of the built-in user agent string. :rtype: ~azure.servicebus.aio.ServiceBusSender + :raises ~azure.servicebus.ServiceBusAuthenticationError: Indicates an issue in token/identity validity. + :raises ~azure.servicebus.ServiceBusAuthorizationError: Indicates an access/rights related failure. + .. admonition:: Example: .. literalinclude:: ../samples/async_samples/sample_code_servicebus_async.py diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_session_receiver_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_session_receiver_async.py index ffc808f7b819..10abb88b5bf0 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_session_receiver_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_session_receiver_async.py @@ -137,6 +137,9 @@ def from_connection_string( within its request to the service. :rtype: ~azure.servicebus.aio.ServiceBusSessionReceiver + :raises ~azure.servicebus.ServiceBusAuthenticationError: Indicates an issue in token/identity validity. + :raises ~azure.servicebus.ServiceBusAuthorizationError: Indicates an access/rights related failure. + .. admonition:: Example: .. literalinclude:: ../samples/async_samples/sample_code_servicebus_async.py diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/test_queues_async.py b/sdk/servicebus/azure-servicebus/tests/async_tests/test_queues_async.py index 7e99a5ab6921..8d700eeb8b96 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/test_queues_async.py +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/test_queues_async.py @@ -959,14 +959,14 @@ async def test_async_queue_schedule_message(self, servicebus_namespace_connectio async with ServiceBusClient.from_connection_string( servicebus_namespace_connection_string, logging_enable=False) as sb_client: - enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) + scheduled_enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) async with sb_client.get_queue_receiver(servicebus_queue.name) as receiver: async with sb_client.get_queue_sender(servicebus_queue.name) as sender: content = str(uuid.uuid4()) message_id = uuid.uuid4() message = Message(content) message.message_id = message_id - message.scheduled_enqueue_time_utc = enqueue_time + message.scheduled_enqueue_time_utc = scheduled_enqueue_time await sender.send_messages(message) messages = await receiver.receive_messages(max_wait_time=120) @@ -975,8 +975,8 @@ async def test_async_queue_schedule_message(self, servicebus_namespace_connectio data = str(messages[0]) assert data == content assert messages[0].message_id == message_id - assert messages[0].scheduled_enqueue_time_utc == enqueue_time - assert messages[0].scheduled_enqueue_time_utc == messages[0].enqueued_time_utc.replace(microsecond=0) + assert messages[0].scheduled_enqueue_time_utc == scheduled_enqueue_time + assert messages[0].scheduled_enqueue_time_utc <= messages[0].enqueued_time_utc.replace(microsecond=0) assert len(messages) == 1 finally: for m in messages: @@ -992,7 +992,7 @@ async def test_async_queue_schedule_message(self, servicebus_namespace_connectio async def test_async_queue_schedule_multiple_messages(self, servicebus_namespace_connection_string, servicebus_queue, **kwargs): async with ServiceBusClient.from_connection_string( servicebus_namespace_connection_string, logging_enable=False) as sb_client: - enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) + scheduled_enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) messages = [] receiver = sb_client.get_queue_receiver(servicebus_queue.name, prefetch=20) sender = sb_client.get_queue_sender(servicebus_queue.name) @@ -1007,11 +1007,12 @@ async def test_async_queue_schedule_multiple_messages(self, servicebus_namespace await sender.send_messages([message_a, message_b]) - received_messages = await receiver.receive_messages(max_batch_size=2, max_wait_time=5) - for message in received_messages: + received_messages = [] + async for message in receiver.get_streaming_message_iter(max_wait_time=5): + received_messages.append(message) await message.complete() - tokens = await sender.schedule_messages(received_messages, enqueue_time) + tokens = await sender.schedule_messages(received_messages, scheduled_enqueue_time) assert len(tokens) == 2 messages = await receiver.receive_messages(max_wait_time=120) @@ -1022,8 +1023,8 @@ async def test_async_queue_schedule_multiple_messages(self, servicebus_namespace data = str(messages[0]) assert data == content assert messages[0].message_id in (message_id_a, message_id_b) - assert messages[0].scheduled_enqueue_time_utc == enqueue_time - assert messages[0].scheduled_enqueue_time_utc == messages[0].enqueued_time_utc.replace(microsecond=0) + assert messages[0].scheduled_enqueue_time_utc == scheduled_enqueue_time + assert messages[0].scheduled_enqueue_time_utc <= messages[0].enqueued_time_utc.replace(microsecond=0) assert len(messages) == 2 finally: for m in messages: @@ -1252,7 +1253,11 @@ def message_content(): message_1st_received_cnt = 0 message_2nd_received_cnt = 0 while message_1st_received_cnt < 20 or message_2nd_received_cnt < 20: - messages = await receiver.receive_messages(max_batch_size=20, max_wait_time=5) + messages = [] + batch = await receiver.receive_messages(max_batch_size=20, max_wait_time=5) + while batch: + messages += batch + batch = await receiver.receive_messages(max_batch_size=20, max_wait_time=5) if not messages: break receive_counter += 1 @@ -1382,22 +1387,22 @@ async def test_async_queue_receiver_respects_max_wait_time_overrides(self, servi async for message in receiver.get_streaming_message_iter(max_wait_time=1): messages.append(message) time_3 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=.5) < timedelta(milliseconds=(time_3 - time_2)) < timedelta(seconds=2) + assert timedelta(seconds=.5) < timedelta(milliseconds=(time_3 - time_2)) <= timedelta(seconds=2) time_4 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=8) < timedelta(milliseconds=(time_4 - time_3)) < timedelta(seconds=11) + assert timedelta(seconds=8) < timedelta(milliseconds=(time_4 - time_3)) <= timedelta(seconds=11) async for message in receiver.get_streaming_message_iter(max_wait_time=3): messages.append(message) time_5 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=1) < timedelta(milliseconds=(time_5 - time_4)) < timedelta(seconds=4) + assert timedelta(seconds=1) < timedelta(milliseconds=(time_5 - time_4)) <= timedelta(seconds=4) async for message in receiver: messages.append(message) time_6 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=3) < timedelta(milliseconds=(time_6 - time_5)) < timedelta(seconds=6) + assert timedelta(seconds=3) < timedelta(milliseconds=(time_6 - time_5)) <= timedelta(seconds=6) async for message in receiver.get_streaming_message_iter(): messages.append(message) time_7 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=3) < timedelta(milliseconds=(time_7 - time_6)) < timedelta(seconds=6) + assert timedelta(seconds=3) < timedelta(milliseconds=(time_7 - time_6)) <= timedelta(seconds=6) assert len(messages) == 1 diff --git a/sdk/servicebus/azure-servicebus/tests/test_queues.py b/sdk/servicebus/azure-servicebus/tests/test_queues.py index e41c7d14a24b..30e5b3c02082 100644 --- a/sdk/servicebus/azure-servicebus/tests/test_queues.py +++ b/sdk/servicebus/azure-servicebus/tests/test_queues.py @@ -1199,14 +1199,14 @@ def test_queue_schedule_message(self, servicebus_namespace_connection_string, se with ServiceBusClient.from_connection_string( servicebus_namespace_connection_string, logging_enable=False) as sb_client: - enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) + scheduled_enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) with sb_client.get_queue_receiver(servicebus_queue.name) as receiver: with sb_client.get_queue_sender(servicebus_queue.name) as sender: content = str(uuid.uuid4()) message_id = uuid.uuid4() message = Message(content) message.message_id = message_id - message.scheduled_enqueue_time_utc = enqueue_time + message.scheduled_enqueue_time_utc = scheduled_enqueue_time sender.send_messages(message) messages = receiver.receive_messages(max_wait_time=120) @@ -1215,8 +1215,8 @@ def test_queue_schedule_message(self, servicebus_namespace_connection_string, se data = str(messages[0]) assert data == content assert messages[0].message_id == message_id - assert messages[0].scheduled_enqueue_time_utc == enqueue_time - assert messages[0].scheduled_enqueue_time_utc == messages[0].enqueued_time_utc.replace(microsecond=0) + assert messages[0].scheduled_enqueue_time_utc == scheduled_enqueue_time + assert messages[0].scheduled_enqueue_time_utc <= messages[0].enqueued_time_utc.replace(microsecond=0) assert len(messages) == 1 finally: for m in messages: @@ -1235,7 +1235,7 @@ def test_queue_schedule_multiple_messages(self, servicebus_namespace_connection_ with ServiceBusClient.from_connection_string( servicebus_namespace_connection_string, logging_enable=False) as sb_client: - enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) + scheduled_enqueue_time = (utc_now() + timedelta(minutes=2)).replace(microsecond=0) sender = sb_client.get_queue_sender(servicebus_queue.name) receiver = sb_client.get_queue_receiver(servicebus_queue.name, prefetch=20) @@ -1265,7 +1265,7 @@ def test_queue_schedule_multiple_messages(self, servicebus_namespace_connection_ received_messages.append(message) message.complete() - tokens = sender.schedule_messages(received_messages, enqueue_time) + tokens = sender.schedule_messages(received_messages, scheduled_enqueue_time) assert len(tokens) == 2 messages = receiver.receive_messages(max_wait_time=120) @@ -1275,8 +1275,8 @@ def test_queue_schedule_multiple_messages(self, servicebus_namespace_connection_ data = str(messages[0]) assert data == content assert messages[0].message_id in (message_id_a, message_id_b) - assert messages[0].scheduled_enqueue_time_utc == enqueue_time - assert messages[0].scheduled_enqueue_time_utc == messages[0].enqueued_time_utc.replace(microsecond=0) + assert messages[0].scheduled_enqueue_time_utc == scheduled_enqueue_time + assert messages[0].scheduled_enqueue_time_utc <= messages[0].enqueued_time_utc.replace(microsecond=0) assert messages[0].delivery_count == 0 assert messages[0].properties assert messages[0].properties[b'key'] == b'value' @@ -1619,7 +1619,9 @@ def message_content(): message_1st_received_cnt = 0 message_2nd_received_cnt = 0 while message_1st_received_cnt < 20 or message_2nd_received_cnt < 20: - messages = receiver.receive_messages(max_batch_size=20, max_wait_time=5) + messages = [] + for message in receiver.get_streaming_message_iter(max_wait_time=5): + messages.append(message) if not messages: break receive_counter += 1 @@ -1788,22 +1790,38 @@ def test_queue_receiver_respects_max_wait_time_overrides(self, servicebus_namesp for message in receiver.get_streaming_message_iter(max_wait_time=1): messages.append(message) time_3 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=.5) < timedelta(milliseconds=(time_3 - time_2)) < timedelta(seconds=2) + assert timedelta(seconds=.5) < timedelta(milliseconds=(time_3 - time_2)) <= timedelta(seconds=2) time_4 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=8) < timedelta(milliseconds=(time_4 - time_3)) < timedelta(seconds=11) + assert timedelta(seconds=8) < timedelta(milliseconds=(time_4 - time_3)) <= timedelta(seconds=11) for message in receiver.get_streaming_message_iter(max_wait_time=3): messages.append(message) time_5 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=1) < timedelta(milliseconds=(time_5 - time_4)) < timedelta(seconds=4) + assert timedelta(seconds=1) < timedelta(milliseconds=(time_5 - time_4)) <= timedelta(seconds=4) for message in receiver: messages.append(message) time_6 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=3) < timedelta(milliseconds=(time_6 - time_5)) < timedelta(seconds=6) + assert timedelta(seconds=3) < timedelta(milliseconds=(time_6 - time_5)) <= timedelta(seconds=6) for message in receiver.get_streaming_message_iter(): messages.append(message) time_7 = receiver._handler._counter.get_current_ms() - assert timedelta(seconds=3) < timedelta(milliseconds=(time_7 - time_6)) < timedelta(seconds=6) + assert timedelta(seconds=3) < timedelta(milliseconds=(time_7 - time_6)) <= timedelta(seconds=6) assert len(messages) == 1 + + + @pytest.mark.liveTest + @pytest.mark.live_test_only + @CachedResourceGroupPreparer(name_prefix='servicebustest') + @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') + @CachedServiceBusQueuePreparer(name_prefix='servicebustest') + def test_queue_receiver_invalid_mode(self, servicebus_namespace_connection_string, servicebus_queue, **kwargs): + + with ServiceBusClient.from_connection_string( + servicebus_namespace_connection_string, logging_enable=False) as sb_client: +# with pytest.raises(StopIteration): + with sb_client.get_queue_receiver(servicebus_queue.name, + max_wait_time="oij") as receiver: + + assert receiver diff --git a/sdk/servicebus/azure-servicebus/tests/test_sb_client.py b/sdk/servicebus/azure-servicebus/tests/test_sb_client.py index f9cf5fb0e306..4d4cabf7638a 100644 --- a/sdk/servicebus/azure-servicebus/tests/test_sb_client.py +++ b/sdk/servicebus/azure-servicebus/tests/test_sb_client.py @@ -13,13 +13,14 @@ from azure.common import AzureHttpError, AzureConflictHttpError from azure.mgmt.servicebus.models import AccessRights -from azure.servicebus import ServiceBusClient, ServiceBusSharedKeyCredential +from azure.servicebus import ServiceBusClient, ServiceBusSharedKeyCredential, ServiceBusSender from azure.servicebus._common.message import Message, PeekMessage from azure.servicebus._common.constants import ReceiveSettleMode from azure.servicebus.exceptions import ( ServiceBusError, ServiceBusConnectionError, ServiceBusAuthenticationError, + ServiceBusAuthorizationError, ServiceBusResourceNotFound ) from devtools_testutils import AzureMgmtTestCase, CachedResourceGroupPreparer @@ -45,7 +46,7 @@ def test_sb_client_bad_credentials(self, servicebus_namespace, servicebus_queue, credential=ServiceBusSharedKeyCredential('invalid', 'invalid'), logging_enable=False) with client: - with pytest.raises(ServiceBusError): + with pytest.raises(ServiceBusAuthenticationError): with client.get_queue_sender(servicebus_queue.name) as sender: sender.send_messages(Message("test")) @@ -88,7 +89,7 @@ def test_sb_client_readonly_credentials(self, servicebus_authorization_rule_conn with client.get_queue_receiver(servicebus_queue.name) as receiver: messages = receiver.receive_messages(max_batch_size=1, max_wait_time=1) - with pytest.raises(ServiceBusError): + with pytest.raises(ServiceBusAuthorizationError): with client.get_queue_sender(servicebus_queue.name) as sender: sender.send_messages(Message("test")) @@ -120,14 +121,33 @@ def test_sb_client_writeonly_credentials(self, servicebus_authorization_rule_con @ServiceBusQueuePreparer(name_prefix='servicebustest_qone', parameter_name='wrong_queue', dead_lettering_on_message_expiration=True) @ServiceBusQueuePreparer(name_prefix='servicebustest_qtwo', dead_lettering_on_message_expiration=True) @ServiceBusQueueAuthorizationRulePreparer(name_prefix='servicebustest_qtwo') - def test_sb_client_incorrect_queue_conn_str(self, servicebus_queue_authorization_rule_connection_string, wrong_queue, **kwargs): + def test_sb_client_incorrect_queue_conn_str(self, servicebus_queue_authorization_rule_connection_string, servicebus_queue, wrong_queue, **kwargs): client = ServiceBusClient.from_connection_string(servicebus_queue_authorization_rule_connection_string) with client: - with pytest.raises(ServiceBusError): + # Validate that the wrong queue with the right credentials fails. + with pytest.raises(ServiceBusAuthenticationError): with client.get_queue_sender(wrong_queue.name) as sender: sender.send_messages(Message("test")) + # But that the correct one works. + with client.get_queue_sender(servicebus_queue.name) as sender: + sender.send_messages(Message("test")) + + # Now do the same but with direct connstr initialization. + with pytest.raises(ServiceBusAuthenticationError): + with ServiceBusSender.from_connection_string( + servicebus_queue_authorization_rule_connection_string, + queue_name=wrong_queue.name, + ) as sender: + sender.send_messages(Message("test")) + + with ServiceBusSender.from_connection_string( + servicebus_queue_authorization_rule_connection_string, + queue_name=servicebus_queue.name, + ) as sender: + sender.send_messages(Message("test")) + @pytest.mark.liveTest @pytest.mark.live_test_only @CachedResourceGroupPreparer() From 43d7ebf6e5c21ca956279c5d58d128fcd4234821 Mon Sep 17 00:00:00 2001 From: Sean Kane <68240067+seankane-msft@users.noreply.github.com> Date: Mon, 31 Aug 2020 13:59:29 -0700 Subject: [PATCH 06/10] added create_table_if_not_exists method to table service client (#13385) * added create_table_if_not_exists method to table service client, eseentially create table wrapped in try/except block * lint fix * fixing up issy's comments * table_name not name, fixed test bug --- .../azure/data/tables/_table_client.py | 7 +- .../data/tables/_table_service_client.py | 26 +++- .../tables/aio/_table_service_client_async.py | 26 +++- ...table.test_create_table_fail_on_exist.yaml | 26 ++-- ...est_table.test_create_table_if_exists.yaml | 137 ++++++++++++++++++ ...test_create_table_if_exists_new_table.yaml | 90 ++++++++++++ ...ble_async.test_create_table_if_exists.yaml | 103 +++++++++++++ ...test_create_table_if_exists_new_table.yaml | 66 +++++++++ .../azure-data-tables/tests/test_table.py | 30 +++- .../tests/test_table_async.py | 24 +++ 10 files changed, 515 insertions(+), 20 deletions(-) create mode 100644 sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists.yaml create mode 100644 sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists_new_table.yaml create mode 100644 sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists.yaml create mode 100644 sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists_new_table.yaml diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py index ab918545b351..e5490732c170 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py @@ -20,7 +20,12 @@ from ._deserialize import _convert_to_entity, _trim_service_metadata from ._entity import TableEntity from ._generated import AzureTable -from ._generated.models import AccessPolicy, SignedIdentifier, TableProperties, QueryOptions +from ._generated.models import ( + AccessPolicy, + SignedIdentifier, + TableProperties, + QueryOptions +) from ._serialize import _get_match_headers, _add_entity_properties from ._base_client import parse_connection_str from ._table_client_base import TableClientBase diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py index 3262bef182b0..18634fbb618e 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_service_client.py @@ -6,7 +6,7 @@ import functools from typing import Any, Union -from azure.core.exceptions import HttpResponseError +from azure.core.exceptions import HttpResponseError, ResourceExistsError from azure.core.paging import ItemPaged from azure.core.tracing.decorator import distributed_trace from azure.core.pipeline import Pipeline @@ -154,6 +154,30 @@ def create_table( table.create_table(**kwargs) return table + @distributed_trace + def create_table_if_not_exists( + self, + table_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> TableClient + """Creates a new table if it does not currently exist. + If the table currently exists, the current table is + returned. + + :param table_name: The Table name. + :type table_name: str + :return: TableClient + :rtype: ~azure.data.tables.TableClient + :raises: ~azure.core.exceptions.HttpResponseError + """ + table = self.get_table_client(table_name=table_name) + try: + table.create_table(**kwargs) + except ResourceExistsError: + pass + return table + @distributed_trace def delete_table( self, diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py index 1e1d6bc8f62c..0056c33c19d8 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_service_client_async.py @@ -11,7 +11,7 @@ ) from azure.core.async_paging import AsyncItemPaged -from azure.core.exceptions import HttpResponseError +from azure.core.exceptions import HttpResponseError, ResourceExistsError from azure.core.pipeline import AsyncPipeline from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async @@ -196,6 +196,30 @@ async def create_table( await table.create_table(**kwargs) return table + @distributed_trace_async + async def create_table_if_not_exists( + self, + table_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> TableClient + """Creates a new table if it does not currently exist. + If the table currently exists, the current table is + returned. + + :param table_name: The Table name. + :type table_name: str + :return: TableClient + :rtype: ~azure.data.tables.aio.TableClient + :raises: ~azure.core.exceptions.HttpResponseError + """ + table = self.get_table_client(table_name=table_name) + try: + await table.create_table(**kwargs) + except ResourceExistsError: + pass + return table + @distributed_trace_async async def delete_table( self, diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_fail_on_exist.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_fail_on_exist.yaml index e4d78057d153..9915930aa06f 100644 --- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_fail_on_exist.yaml +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_fail_on_exist.yaml @@ -15,11 +15,11 @@ interactions: DataServiceVersion: - '3.0' Date: - - Wed, 19 Aug 2020 21:18:00 GMT + - Thu, 27 Aug 2020 21:28:19 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 19 Aug 2020 21:18:00 GMT + - Thu, 27 Aug 2020 21:28:19 GMT x-ms-version: - '2019-07-07' method: POST @@ -33,7 +33,7 @@ interactions: content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Wed, 19 Aug 2020 21:18:00 GMT + - Thu, 27 Aug 2020 21:28:20 GMT location: - https://storagename.table.core.windows.net/Tables('pytablesync6d7c1113') server: @@ -63,11 +63,11 @@ interactions: DataServiceVersion: - '3.0' Date: - - Wed, 19 Aug 2020 21:18:00 GMT + - Thu, 27 Aug 2020 21:28:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 19 Aug 2020 21:18:00 GMT + - Thu, 27 Aug 2020 21:28:20 GMT x-ms-version: - '2019-07-07' method: POST @@ -75,14 +75,14 @@ interactions: response: body: string: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The - table specified already exists.\nRequestId:fbae76e2-b002-009f-206e-7649d9000000\nTime:2020-08-19T21:18:00.8893697Z"}}}' + table specified already exists.\nRequestId:2e7b208e-d002-003b-7bb8-7c685f000000\nTime:2020-08-27T21:28:21.0100931Z"}}}' headers: cache-control: - no-cache content-type: - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 date: - - Wed, 19 Aug 2020 21:18:00 GMT + - Thu, 27 Aug 2020 21:28:20 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -106,11 +106,11 @@ interactions: Content-Length: - '0' Date: - - Wed, 19 Aug 2020 21:18:00 GMT + - Thu, 27 Aug 2020 21:28:20 GMT User-Agent: - - azsdk-python-storage-table/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 19 Aug 2020 21:18:00 GMT + - Thu, 27 Aug 2020 21:28:20 GMT x-ms-version: - '2019-07-07' method: DELETE @@ -124,7 +124,7 @@ interactions: content-length: - '0' date: - - Wed, 19 Aug 2020 21:18:00 GMT + - Thu, 27 Aug 2020 21:28:20 GMT server: - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 x-content-type-options: diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists.yaml new file mode 100644 index 000000000000..106a61bdda08 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists.yaml @@ -0,0 +1,137 @@ +interactions: +- request: + body: '{"TableName": "pytablesync2c5a0f7d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 27 Aug 2020 21:42:12 GMT + User-Agent: + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 27 Aug 2020 21:42:12 GMT + x-ms-version: + - '2019-07-07' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytablesync2c5a0f7d"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 27 Aug 2020 21:42:12 GMT + location: + - https://storagename.table.core.windows.net/Tables('pytablesync2c5a0f7d') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-07-07' + status: + code: 201 + message: Created +- request: + body: '{"TableName": "pytablesync2c5a0f7d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 27 Aug 2020 21:42:12 GMT + User-Agent: + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 27 Aug 2020 21:42:12 GMT + x-ms-version: + - '2019-07-07' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The + table specified already exists.\nRequestId:64cfdefd-d002-0057-80ba-7c2831000000\nTime:2020-08-27T21:42:13.5449901Z"}}}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 27 Aug 2020 21:42:13 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-07-07' + status: + code: 409 + message: Conflict +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 27 Aug 2020 21:42:12 GMT + User-Agent: + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 27 Aug 2020 21:42:12 GMT + x-ms-version: + - '2019-07-07' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('pytablesync2c5a0f7d') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 27 Aug 2020 21:42:13 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-07-07' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists_new_table.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists_new_table.yaml new file mode 100644 index 000000000000..e906065ec1dc --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_create_table_if_exists_new_table.yaml @@ -0,0 +1,90 @@ +interactions: +- request: + body: '{"TableName": "pytablesyncdd9e138d"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '36' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 27 Aug 2020 21:42:13 GMT + User-Agent: + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 27 Aug 2020 21:42:13 GMT + x-ms-version: + - '2019-07-07' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytablesyncdd9e138d"}' + headers: + cache-control: + - no-cache + content-type: + - application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: + - Thu, 27 Aug 2020 21:42:13 GMT + location: + - https://storagename.table.core.windows.net/Tables('pytablesyncdd9e138d') + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-ms-version: + - '2019-07-07' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Date: + - Thu, 27 Aug 2020 21:42:13 GMT + User-Agent: + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 27 Aug 2020 21:42:13 GMT + x-ms-version: + - '2019-07-07' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('pytablesyncdd9e138d') + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + date: + - Thu, 27 Aug 2020 21:42:13 GMT + server: + - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: + - nosniff + x-ms-version: + - '2019-07-07' + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists.yaml new file mode 100644 index 000000000000..b71393defba6 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists.yaml @@ -0,0 +1,103 @@ +interactions: +- request: + body: '{"TableName": "pytableasync938b11fa"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '37' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 27 Aug 2020 21:49:52 GMT + User-Agent: + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 27 Aug 2020 21:49:52 GMT + x-ms-version: + - '2019-07-07' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytableasync938b11fa"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 27 Aug 2020 21:49:53 GMT + location: https://storagename.table.core.windows.net/Tables('pytableasync938b11fa') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-07-07' + status: + code: 201 + message: Created + url: https://pyacrstorageqqhkgfuuwjpy.table.core.windows.net/Tables +- request: + body: '{"TableName": "pytableasync938b11fa"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '37' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 27 Aug 2020 21:49:53 GMT + User-Agent: + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 27 Aug 2020 21:49:53 GMT + x-ms-version: + - '2019-07-07' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.error":{"code":"TableAlreadyExists","message":{"lang":"en-US","value":"The + table specified already exists.\nRequestId:6a7f283a-f002-0003-2dbb-7ccc9f000000\nTime:2020-08-27T21:49:54.0261635Z"}}}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 27 Aug 2020 21:49:53 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-07-07' + status: + code: 409 + message: Conflict + url: https://pyacrstorageqqhkgfuuwjpy.table.core.windows.net/Tables +- request: + body: null + headers: + Date: + - Thu, 27 Aug 2020 21:49:53 GMT + User-Agent: + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 27 Aug 2020 21:49:53 GMT + x-ms-version: + - '2019-07-07' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('pytableasync938b11fa') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 27 Aug 2020 21:49:53 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-07-07' + status: + code: 204 + message: No Content + url: https://pyacrstorageqqhkgfuuwjpy.table.core.windows.net/Tables('pytableasync938b11fa') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists_new_table.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists_new_table.yaml new file mode 100644 index 000000000000..b8782ff27894 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_create_table_if_exists_new_table.yaml @@ -0,0 +1,66 @@ +interactions: +- request: + body: '{"TableName": "pytableasync5dc0160a"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '37' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Thu, 27 Aug 2020 21:49:53 GMT + User-Agent: + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 27 Aug 2020 21:49:53 GMT + x-ms-version: + - '2019-07-07' + method: POST + uri: https://storagename.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://storagename.table.core.windows.net/$metadata#Tables/@Element","TableName":"pytableasync5dc0160a"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Thu, 27 Aug 2020 21:49:54 GMT + location: https://storagename.table.core.windows.net/Tables('pytableasync5dc0160a') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-07-07' + status: + code: 201 + message: Created + url: https://pyacrstorageqqhkgfuuwjpy.table.core.windows.net/Tables +- request: + body: null + headers: + Date: + - Thu, 27 Aug 2020 21:49:53 GMT + User-Agent: + - azsdk-python-data-tables/2019-07-07 Python/3.8.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 27 Aug 2020 21:49:53 GMT + x-ms-version: + - '2019-07-07' + method: DELETE + uri: https://storagename.table.core.windows.net/Tables('pytableasync5dc0160a') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Thu, 27 Aug 2020 21:49:54 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-07-07' + status: + code: 204 + message: No Content + url: https://pyacrstorageqqhkgfuuwjpy.table.core.windows.net/Tables('pytableasync5dc0160a') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/test_table.py b/sdk/tables/azure-data-tables/tests/test_table.py index 7ba338ac0d9c..e51e1c68651c 100644 --- a/sdk/tables/azure-data-tables/tests/test_table.py +++ b/sdk/tables/azure-data-tables/tests/test_table.py @@ -133,17 +133,39 @@ def test_create_table_fail_on_exist(self, resource_group, location, storage_acco # Arrange ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) table_name = self._get_table_reference() - # btable_client = ts.get_table_client(table_name) # Act created = ts.create_table(table_name) with self.assertRaises(ResourceExistsError): ts.create_table(table_name) + print(created) # Assert - self.assertTrue(created) - # existing = list(ts.query_tables(query_options=QueryOptions(filter="TableName eq '{}'".format(table_name)))) - # self.assertEqual(existing[0], [table_name]) + self.assertIsNotNone(created) + ts.delete_table(table_name) + + @GlobalStorageAccountPreparer() + def test_create_table_if_exists(self, resource_group, location, storage_account, storage_account_key): + ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + table_name = self._get_table_reference() + + t0 = ts.create_table(table_name) + t1 = ts.create_table_if_not_exists(table_name) + + self.assertIsNotNone(t0) + self.assertIsNotNone(t1) + self.assertEqual(t0.table_name, t1.table_name) + ts.delete_table(table_name) + + @GlobalStorageAccountPreparer() + def test_create_table_if_exists_new_table(self, resource_group, location, storage_account, storage_account_key): + ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + table_name = self._get_table_reference() + + t = ts.create_table_if_not_exists(table_name) + + self.assertIsNotNone(t) + self.assertEqual(t.table_name, table_name) ts.delete_table(table_name) @GlobalStorageAccountPreparer() diff --git a/sdk/tables/azure-data-tables/tests/test_table_async.py b/sdk/tables/azure-data-tables/tests/test_table_async.py index a5dfeeb707f7..4a3d764de311 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_async.py +++ b/sdk/tables/azure-data-tables/tests/test_table_async.py @@ -73,6 +73,30 @@ async def test_create_table_fail_on_exist(self, resource_group, location, storag self.assertTrue(created) await ts.delete_table(table_name=table_name) + @GlobalStorageAccountPreparer() + async def test_create_table_if_exists(self, resource_group, location, storage_account, storage_account_key): + ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + table_name = self._get_table_reference() + + t0 = await ts.create_table(table_name) + t1 = await ts.create_table_if_not_exists(table_name) + + self.assertIsNotNone(t0) + self.assertIsNotNone(t1) + self.assertEqual(t0.table_name, t1.table_name) + await ts.delete_table(table_name) + + @GlobalStorageAccountPreparer() + async def test_create_table_if_exists_new_table(self, resource_group, location, storage_account, storage_account_key): + ts = TableServiceClient(self.account_url(storage_account, "table"), storage_account_key) + table_name = self._get_table_reference() + + t = await ts.create_table_if_not_exists(table_name) + + self.assertIsNotNone(t) + self.assertEqual(t.table_name, table_name) + await ts.delete_table(table_name) + @GlobalStorageAccountPreparer() async def test_create_table_invalid_name(self, resource_group, location, storage_account, storage_account_key): # Arrange From f683b2928e81da5ee629c928a59d3d9be47f2aed Mon Sep 17 00:00:00 2001 From: changlong-liu <59815250+changlong-liu@users.noreply.github.com> Date: Tue, 1 Sep 2020 10:49:56 +0800 Subject: [PATCH 07/10] fix issue #11658 for is_valid_resource_id (#11709) * fix issue #11658 * use regex * add tests * revert print --- sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py | 8 ++++---- sdk/core/azure-mgmt-core/tests/test_tools.py | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py b/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py index 18502db70977..ce671e572516 100644 --- a/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py +++ b/sdk/core/azure-mgmt-core/azure/mgmt/core/tools.py @@ -30,13 +30,13 @@ _LOGGER = logging.getLogger(__name__) _ARMID_RE = re.compile( - "(?i)/subscriptions/(?P[^/]*)(/resourceGroups/(?P[^/]*))?" - "(/providers/(?P[^/]*)/(?P[^/]*)/(?P[^/]*)(?P.*))?" + "(?i)/subscriptions/(?P[^/]+)(/resourceGroups/(?P[^/]+))?" + "(/providers/(?P[^/]+)/(?P[^/]*)/(?P[^/]+)(?P.*))?" ) _CHILDREN_RE = re.compile( - "(?i)(/providers/(?P[^/]*))?/" - "(?P[^/]*)/(?P[^/]*)" + "(?i)(/providers/(?P[^/]+))?/" + "(?P[^/]*)/(?P[^/]+)" ) _ARMNAME_RE = re.compile("^[^<>%&:\\?/]{1,260}$") diff --git a/sdk/core/azure-mgmt-core/tests/test_tools.py b/sdk/core/azure-mgmt-core/tests/test_tools.py index 871b78bd754f..831bf9b4835c 100644 --- a/sdk/core/azure-mgmt-core/tests/test_tools.py +++ b/sdk/core/azure-mgmt-core/tests/test_tools.py @@ -239,7 +239,9 @@ def test_resource_parse(self): invalid_ids = [ '/subscriptions/fakesub/resourceGroups/myRg/type1/name1', '/subscriptions/fakesub/resourceGroups/myRg/providers/Microsoft.Provider/foo', - '/subscriptions/fakesub/resourceGroups/myRg/providers/namespace/type/name/type1' + '/subscriptions/fakesub/resourceGroups/myRg/providers/namespace/type/name/type1', + '/subscriptions/fakesub/resourceGroups/', + '/subscriptions//resourceGroups/' ] for invalid_id in invalid_ids: self.assertFalse(is_valid_resource_id(invalid_id)) From 7f1e4d851849e219ae0176ede988b9d8ba9bc7fc Mon Sep 17 00:00:00 2001 From: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Date: Tue, 1 Sep 2020 10:52:05 -0400 Subject: [PATCH 08/10] [text analytics] add domain_filter param (#13451) --- .../azure/ai/textanalytics/__init__.py | 2 + .../azure/ai/textanalytics/_models.py | 5 +++ .../textanalytics/_text_analytics_client.py | 6 +++ .../aio/_text_analytics_client_async.py | 7 +++ ...e_pii_entities.test_phi_domain_filter.yaml | 44 +++++++++++++++++++ ...entities_async.test_phi_domain_filter.yaml | 33 ++++++++++++++ .../tests/test_recognize_pii_entities.py | 16 ++++++- .../test_recognize_pii_entities_async.py | 14 ++++++ 8 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_phi_domain_filter.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_phi_domain_filter.yaml diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py index 476f9842a066..ef3d19429fd8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py @@ -31,6 +31,7 @@ OpinionSentiment, RecognizePiiEntitiesResult, PiiEntity, + PiiEntityDomainType, ) __all__ = [ @@ -59,6 +60,7 @@ 'OpinionSentiment', 'RecognizePiiEntitiesResult', 'PiiEntity', + 'PiiEntityDomainType', ] __version__ = VERSION diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py index e9733e8fec25..de975185f66e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py @@ -4,6 +4,7 @@ # Licensed under the MIT License. # ------------------------------------ import re +from enum import Enum from ._generated.models import ( LanguageInput, MultiLanguageInput, @@ -64,6 +65,10 @@ def get(self, key, default=None): return self.__dict__[key] return default +class PiiEntityDomainType(str, Enum): + """The different domains of PII entities that users can filter by""" + PROTECTED_HEALTH_INFORMATION = "PHI" # See https://aka.ms/tanerpii for more information. + class DetectedLanguage(DictMixin): """DetectedLanguage contains the predicted language found in text, diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py index 8c636e18ae92..7c68034c9de8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py @@ -260,6 +260,10 @@ def recognize_pii_entities( # type: ignore be used for scoring, e.g. "latest", "2019-10-01". If a model-version is not specified, the API will default to the latest, non-preview version. :keyword bool show_stats: If set to true, response will contain document level statistics. + :keyword domain_filter: Filters the response entities to ones only included in the specified domain. + I.e., if set to 'PHI', will only return entities in the Protected Healthcare Information domain. + See https://aka.ms/tanerpii for more information. + :paramtype domain_filter: str or ~azure.ai.textanalytics.PiiEntityDomainType :return: The combined list of :class:`~azure.ai.textanalytics.RecognizePiiEntitiesResult` and :class:`~azure.ai.textanalytics.DocumentError` in the order the original documents were passed in. @@ -281,6 +285,7 @@ def recognize_pii_entities( # type: ignore docs = _validate_input(documents, "language", language) model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) + domain_filter = kwargs.pop("domain_filter", None) if self._string_code_unit: kwargs.update({"string_index_type": self._string_code_unit}) try: @@ -288,6 +293,7 @@ def recognize_pii_entities( # type: ignore documents=docs, model_version=model_version, show_stats=show_stats, + domain=domain_filter, cls=kwargs.pop("cls", pii_entities_result), **kwargs ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py index ffa9cd77d6e2..f7c6290665ba 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py @@ -262,6 +262,10 @@ async def recognize_pii_entities( # type: ignore be used for scoring, e.g. "latest", "2019-10-01". If a model-version is not specified, the API will default to the latest, non-preview version. :keyword bool show_stats: If set to true, response will contain document level statistics. + :keyword domain_filter: Filters the response entities to ones only included in the specified domain. + I.e., if set to 'PHI', will only return entities in the Protected Healthcare Information domain. + See https://aka.ms/tanerpii for more information. + :paramtype domain_filter: str or ~azure.ai.textanalytics.PiiEntityDomainType :return: The combined list of :class:`~azure.ai.textanalytics.RecognizePiiEntitiesResult` and :class:`~azure.ai.textanalytics.DocumentError` in the order the original documents were passed in. @@ -283,6 +287,8 @@ async def recognize_pii_entities( # type: ignore docs = _validate_input(documents, "language", language) model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) + domain_filter = kwargs.pop("domain_filter", None) + if self._string_code_unit: kwargs.update({"string_index_type": self._string_code_unit}) try: @@ -290,6 +296,7 @@ async def recognize_pii_entities( # type: ignore documents=docs, model_version=model_version, show_stats=show_stats, + domain=domain_filter, cls=kwargs.pop("cls", pii_entities_result), **kwargs ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_phi_domain_filter.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_phi_domain_filter.yaml new file mode 100644 index 000000000000..ee650032c7a0 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_phi_domain_filter.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "I work at Microsoft and my phone number + is 333-333-3333", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&domain=PHI&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"333-333-3333","category":"Phone + Number","offset":43,"length":12,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: + - c2319b95-6fd2-46c9-80e3-06c8f2701825 + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Mon, 31 Aug 2020 20:32:54 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '79' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_phi_domain_filter.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_phi_domain_filter.yaml new file mode 100644 index 000000000000..7395d5ac2e41 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_phi_domain_filter.yaml @@ -0,0 +1,33 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "I work at Microsoft and my phone number + is 333-333-3333", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '113' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&domain=PHI&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"text":"333-333-3333","category":"Phone + Number","offset":43,"length":12,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2020-07-01"}' + headers: + apim-request-id: 9265752d-3262-4dbb-94d6-be26889e3db9 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Mon, 31 Aug 2020 20:32:55 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '82' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com//text/analytics/v3.1-preview.1/entities/recognition/pii?showStats=false&domain=PHI&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py index 736f75cd46d5..fe12a81cf1d7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py @@ -17,6 +17,7 @@ TextDocumentInput, VERSION, TextAnalyticsApiVersion, + PiiEntityDomainType, ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below @@ -573,4 +574,17 @@ def test_recognize_pii_entities_v3(self, client): with pytest.raises(NotImplementedError) as excinfo: client.recognize_pii_entities(["this should fail"]) - assert "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1 and up" in str(excinfo.value) \ No newline at end of file + assert "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1 and up" in str(excinfo.value) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + def test_phi_domain_filter(self, client): + # without the domain filter, this should return two entities: Microsoft as an org, + # and the phone number. With the domain filter, it should only return one. + result = client.recognize_pii_entities( + ["I work at Microsoft and my phone number is 333-333-3333"], + domain_filter=PiiEntityDomainType.PROTECTED_HEALTH_INFORMATION + ) + self.assertEqual(len(result[0].entities), 1) + self.assertEqual(result[0].entities[0].text, '333-333-3333') + self.assertEqual(result[0].entities[0].category, 'Phone Number') diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py index fb2d67bcdcb9..ac673e423159 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py @@ -18,6 +18,7 @@ TextDocumentInput, VERSION, TextAnalyticsApiVersion, + PiiEntityDomainType, ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below @@ -572,3 +573,16 @@ async def test_recognize_pii_entities_v3(self, client): await client.recognize_pii_entities(["this should fail"]) assert "'recognize_pii_entities' endpoint is only available for API version v3.1-preview.1 and up" in str(excinfo.value) + + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer() + async def test_phi_domain_filter(self, client): + # without the domain filter, this should return two entities: Microsoft as an org, + # and the phone number. With the domain filter, it should only return one. + result = await client.recognize_pii_entities( + ["I work at Microsoft and my phone number is 333-333-3333"], + domain_filter=PiiEntityDomainType.PROTECTED_HEALTH_INFORMATION + ) + self.assertEqual(len(result[0].entities), 1) + self.assertEqual(result[0].entities[0].text, '333-333-3333') + self.assertEqual(result[0].entities[0].category, 'Phone Number') From 37d5472725581630b8b03cfe222fc0f8e89f15d2 Mon Sep 17 00:00:00 2001 From: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Date: Tue, 1 Sep 2020 10:52:41 -0400 Subject: [PATCH 09/10] fix typing for paging methods (#13410) --- sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md | 2 ++ .../azure/keyvault/certificates/_client.py | 11 ++++++----- .../azure/keyvault/certificates/aio/_client.py | 11 ++++++----- sdk/keyvault/azure-keyvault-keys/CHANGELOG.md | 2 ++ .../azure/keyvault/keys/aio/_client.py | 9 +++++---- sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md | 3 ++- .../azure/keyvault/secrets/aio/_client.py | 9 +++++---- 7 files changed, 28 insertions(+), 19 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md b/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md index aa8bab5357fc..e19c22c00e7b 100644 --- a/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History ## 4.2.1 (Unreleased) +### Fixed +- Correct typing for paging methods ## 4.2.0 (2020-08-11) diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py index 630c4e8d2920..c515772c1b4d 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_client.py @@ -31,7 +31,8 @@ if TYPE_CHECKING: # pylint:disable=unused-import - from typing import Any, Dict, List, Optional, Iterable + from typing import Any, Dict, Iterable, List, Optional + from azure.core.paging import ItemPaged class CertificateClient(KeyVaultClientBase): @@ -530,7 +531,7 @@ def restore_certificate_backup(self, backup, **kwargs): @distributed_trace def list_deleted_certificates(self, **kwargs): - # type: (**Any) -> Iterable[DeletedCertificate] + # type: (**Any) -> ItemPaged[DeletedCertificate] """Lists the currently-recoverable deleted certificates. Possible only if vault is soft-delete enabled. Requires certificates/get/list permission. Retrieves the certificates in the current vault which @@ -566,7 +567,7 @@ def list_deleted_certificates(self, **kwargs): @distributed_trace def list_properties_of_certificates(self, **kwargs): - # type: (**Any) -> Iterable[CertificateProperties] + # type: (**Any) -> ItemPaged[CertificateProperties] """List identifiers and properties of all certificates in the vault. Requires certificates/list permission. @@ -598,7 +599,7 @@ def list_properties_of_certificates(self, **kwargs): @distributed_trace def list_properties_of_certificate_versions(self, certificate_name, **kwargs): - # type: (str, **Any) -> Iterable[CertificateProperties] + # type: (str, **Any) -> ItemPaged[CertificateProperties] """List the identifiers and properties of a certificate's versions. Requires certificates/list permission. @@ -989,7 +990,7 @@ def delete_issuer(self, issuer_name, **kwargs): @distributed_trace def list_properties_of_issuers(self, **kwargs): - # type: (**Any) -> Iterable[IssuerProperties] + # type: (**Any) -> ItemPaged[IssuerProperties] """Lists properties of the certificate issuers for the key vault. Requires the certificates/manageissuers/getissuers permission. diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py index 62c1534810ed..033c4aebb1c2 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/aio/_client.py @@ -4,12 +4,13 @@ # ------------------------------------ # pylint:disable=too-many-lines,too-many-public-methods import base64 -from typing import Any, AsyncIterable, Optional, Iterable, List, Dict, Union +from typing import Any, Optional, Iterable, List, Dict, Union from functools import partial from azure.core.polling import async_poller from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.async_paging import AsyncItemPaged from .. import ( KeyVaultCertificate, @@ -504,7 +505,7 @@ async def restore_certificate_backup(self, backup: bytes, **kwargs: "Any") -> Ke return KeyVaultCertificate._from_certificate_bundle(certificate_bundle=bundle) @distributed_trace - def list_deleted_certificates(self, **kwargs: "Any") -> AsyncIterable[DeletedCertificate]: + def list_deleted_certificates(self, **kwargs: "Any") -> AsyncItemPaged[DeletedCertificate]: """Lists the currently-recoverable deleted certificates. Possible only if vault is soft-delete enabled. Requires certificates/get/list permission. Retrieves the certificates in the current vault which @@ -536,7 +537,7 @@ def list_deleted_certificates(self, **kwargs: "Any") -> AsyncIterable[DeletedCer ) @distributed_trace - def list_properties_of_certificates(self, **kwargs: "Any") -> AsyncIterable[CertificateProperties]: + def list_properties_of_certificates(self, **kwargs: "Any") -> AsyncItemPaged[CertificateProperties]: """List identifiers and properties of all certificates in the vault. Requires certificates/list permission. @@ -568,7 +569,7 @@ def list_properties_of_certificates(self, **kwargs: "Any") -> AsyncIterable[Cert @distributed_trace def list_properties_of_certificate_versions( self, certificate_name: str, **kwargs: "Any" - ) -> AsyncIterable[CertificateProperties]: + ) -> AsyncItemPaged[CertificateProperties]: """List the identifiers and properties of a certificate's versions. Requires certificates/list permission. @@ -965,7 +966,7 @@ async def delete_issuer(self, issuer_name: str, **kwargs: "Any") -> CertificateI return CertificateIssuer._from_issuer_bundle(issuer_bundle=issuer_bundle) @distributed_trace - def list_properties_of_issuers(self, **kwargs: "Any") -> AsyncIterable[IssuerProperties]: + def list_properties_of_issuers(self, **kwargs: "Any") -> AsyncItemPaged[IssuerProperties]: """Lists properties of the certificate issuers for the key vault. Requires the certificates/manageissuers/getissuers permission. diff --git a/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md b/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md index 7f2ecd50a554..64279ca98878 100644 --- a/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History ## 4.2.1 (Unreleased) +### Fixed +- Correct typing for async paging methods ## 4.2.0 (2020-08-11) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py index f939e7afe87c..3b7b1cf070f6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py @@ -16,7 +16,8 @@ if TYPE_CHECKING: # pylint:disable=ungrouped-imports from datetime import datetime - from typing import Any, AsyncIterable, Optional, List, Union + from azure.core.async_paging import AsyncItemPaged + from typing import Any, Optional, List, Union from .. import KeyType @@ -256,7 +257,7 @@ async def get_deleted_key(self, name: str, **kwargs: "Any") -> DeletedKey: return DeletedKey._from_deleted_key_bundle(bundle) @distributed_trace - def list_deleted_keys(self, **kwargs: "Any") -> "AsyncIterable[DeletedKey]": + def list_deleted_keys(self, **kwargs: "Any") -> "AsyncItemPaged[DeletedKey]": """List all deleted keys, including the public part of each. Possible only in a vault with soft-delete enabled. Requires keys/list permission. @@ -281,7 +282,7 @@ def list_deleted_keys(self, **kwargs: "Any") -> "AsyncIterable[DeletedKey]": ) @distributed_trace - def list_properties_of_keys(self, **kwargs: "Any") -> "AsyncIterable[KeyProperties]": + def list_properties_of_keys(self, **kwargs: "Any") -> "AsyncItemPaged[KeyProperties]": """List identifiers and properties of all keys in the vault. Requires keys/list permission. :returns: An iterator of keys without their cryptographic material or version information @@ -304,7 +305,7 @@ def list_properties_of_keys(self, **kwargs: "Any") -> "AsyncIterable[KeyProperti ) @distributed_trace - def list_properties_of_key_versions(self, name: str, **kwargs: "Any") -> "AsyncIterable[KeyProperties]": + def list_properties_of_key_versions(self, name: str, **kwargs: "Any") -> "AsyncItemPaged[KeyProperties]": """List the identifiers and properties of a key's versions. Requires keys/list permission. :param str name: The name of the key diff --git a/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md b/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md index 3498b39e68cb..7d60250d6f86 100644 --- a/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History ## 4.2.1 (Unreleased) - +### Fixed +- Correct typing for async paging methods ## 4.2.0 (2020-08-11) ### Fixed diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py index 0ae4b19f52ea..7f71232c2f98 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py @@ -2,11 +2,12 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from typing import Any, AsyncIterable, Optional, Dict +from typing import Any, Optional, Dict from functools import partial from azure.core.tracing.decorator import distributed_trace from azure.core.tracing.decorator_async import distributed_trace_async +from azure.core.async_paging import AsyncItemPaged from .._models import KeyVaultSecret, DeletedSecret, SecretProperties from .._shared import AsyncKeyVaultClientBase @@ -165,7 +166,7 @@ async def update_secret_properties( return SecretProperties._from_secret_bundle(bundle) # pylint: disable=protected-access @distributed_trace - def list_properties_of_secrets(self, **kwargs: "Any") -> AsyncIterable[SecretProperties]: + def list_properties_of_secrets(self, **kwargs: "Any") -> AsyncItemPaged[SecretProperties]: """List identifiers and attributes of all secrets in the vault. Requires secrets/list permission. List items don't include secret values. Use :func:`get_secret` to get a secret's value. @@ -189,7 +190,7 @@ def list_properties_of_secrets(self, **kwargs: "Any") -> AsyncIterable[SecretPro ) @distributed_trace - def list_properties_of_secret_versions(self, name: str, **kwargs: "Any") -> AsyncIterable[SecretProperties]: + def list_properties_of_secret_versions(self, name: str, **kwargs: "Any") -> AsyncItemPaged[SecretProperties]: """List properties of all versions of a secret, excluding their values. Requires secrets/list permission. List items don't include secret values. Use :func:`get_secret` to get a secret's value. @@ -321,7 +322,7 @@ async def get_deleted_secret(self, name: str, **kwargs: "Any") -> DeletedSecret: return DeletedSecret._from_deleted_secret_bundle(bundle) @distributed_trace - def list_deleted_secrets(self, **kwargs: "Any") -> AsyncIterable[DeletedSecret]: + def list_deleted_secrets(self, **kwargs: "Any") -> AsyncItemPaged[DeletedSecret]: """Lists all deleted secrets. Possible only in vaults with soft-delete enabled. Requires secrets/list permission. From 9b1b9ece93a92e96d590f0f4cf36f7b172a3a25c Mon Sep 17 00:00:00 2001 From: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Date: Tue, 1 Sep 2020 10:53:12 -0400 Subject: [PATCH 10/10] [text analytics] add bing_id property to LinkedEntity class (#13446) --- .../azure-ai-textanalytics/CHANGELOG.md | 2 + .../azure/ai/textanalytics/_base_client.py | 4 ++ .../azure/ai/textanalytics/_models.py | 21 +++++++-- ...ecognize_linked_entities.test_bing_id.yaml | 47 +++++++++++++++++++ ...ze_linked_entities_async.test_bing_id.yaml | 36 ++++++++++++++ .../tests/test_recognize_linked_entities.py | 16 ++++++- .../test_recognize_linked_entities_async.py | 16 ++++++- .../azure-ai-textanalytics/tests/test_repr.py | 7 ++- 8 files changed, 142 insertions(+), 7 deletions(-) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bing_id.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bing_id.yaml diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index 372b10411b81..d11798ae878f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -11,6 +11,8 @@ pass in `v3.0` to the kwarg `api_version` when creating your TextAnalyticsClient - `offset` is the offset of the text from the start of the document - We now have added support for opinion mining. To use this feature, you need to make sure you are using the service's v3.1-preview.1 API. To get this support pass `show_opinion_mining` as True when calling the `analyze_sentiment` endpoint +- Add property `bing_id` to the `LinkedEntity` class. This property is only available for v3.1-preview.2 and up, and it is to be +used in conjunction with the Bing Entity Search API to fetch additional relevant information about the returned entity. ## 5.0.0 (2020-07-27) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py index c269772d87ff..8d60ff8dbf9d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py @@ -15,6 +15,10 @@ class TextAnalyticsApiVersion(str, Enum): #: this is the default version V3_1_PREVIEW_1 = "v3.1-preview.1" + + # 3.1-preview.2 is not yet the default version since we don't have a + # reliable endpoint + V3_1_PREVIEW_2 = "v3.1-preview.2" V3_0 = "v3.0" def _authentication_policy(credential): diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py index de975185f66e..339d70df7d6f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py @@ -1,4 +1,4 @@ -# coding=utf-8 +# coding=utf-8 pylint: disable=too-many-lines # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. @@ -616,6 +616,11 @@ class LinkedEntity(DictMixin): :ivar data_source: Data source used to extract entity linking, such as Wiki/Bing etc. :vartype data_source: str + :ivar str bing_id: Bing unique identifier of the recognized entity. Use in conjunction + with the Bing Entity Search SDK to fetch additional relevant information. Only + available for API version v3.1-preview.2 and up. + .. versionadded:: v3.1-preview.2 + The *bing_id* property. """ def __init__(self, **kwargs): @@ -625,9 +630,11 @@ def __init__(self, **kwargs): self.data_source_entity_id = kwargs.get("data_source_entity_id", None) self.url = kwargs.get("url", None) self.data_source = kwargs.get("data_source", None) + self.bing_id = kwargs.get("bing_id", None) @classmethod def _from_generated(cls, entity): + bing_id = entity.bing_id if hasattr(entity, "bing_id") else None return cls( name=entity.name, matches=[LinkedEntityMatch._from_generated(e) for e in entity.matches], # pylint: disable=protected-access @@ -635,12 +642,20 @@ def _from_generated(cls, entity): data_source_entity_id=entity.id, url=entity.url, data_source=entity.data_source, + bing_id=bing_id, ) def __repr__(self): return "LinkedEntity(name={}, matches={}, language={}, data_source_entity_id={}, url={}, " \ - "data_source={})".format(self.name, repr(self.matches), self.language, self.data_source_entity_id, - self.url, self.data_source)[:1024] + "data_source={}, bing_id={})".format( + self.name, + repr(self.matches), + self.language, + self.data_source_entity_id, + self.url, + self.data_source, + self.bing_id, + )[:1024] class LinkedEntityMatch(DictMixin): diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bing_id.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bing_id.yaml new file mode 100644 index 000000000000..537c216e5a8b --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bing_id.yaml @@ -0,0 +1,47 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Microsoft was founded by Bill Gates + and Paul Allen", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '108' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://cognitiveusw2dev.azure-api.net/text/analytics/v3.1-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill + Gates","matches":[{"text":"Bill Gates","offset":25,"length":10,"confidenceScore":0.52}],"language":"en","id":"Bill + Gates","url":"https://en.wikipedia.org/wiki/Bill_Gates","dataSource":"Wikipedia"},{"bingId":"df2c4376-9923-6a54-893f-2ee5a5badbc7","name":"Paul + Allen","matches":[{"text":"Paul Allen","offset":40,"length":10,"confidenceScore":0.54}],"language":"en","id":"Paul + Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"},{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' + headers: + apim-request-id: + - 34b34e81-fcc2-4c1e-85b2-116f85196a4c + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.BatchScoring=1 + date: + - Mon, 31 Aug 2020 18:48:40 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '27' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bing_id.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bing_id.yaml new file mode 100644 index 000000000000..2c4123289eb0 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bing_id.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"documents": [{"id": "0", "text": "Microsoft was founded by Bill Gates + and Paul Allen", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '108' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.0.1 Python/3.8.5 (macOS-10.13.6-x86_64-i386-64bit) + method: POST + uri: https://cognitiveusw2dev.azure-api.net/text/analytics/v3.1-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + response: + body: + string: '{"documents":[{"id":"0","entities":[{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill + Gates","matches":[{"text":"Bill Gates","offset":25,"length":10,"confidenceScore":0.52}],"language":"en","id":"Bill + Gates","url":"https://en.wikipedia.org/wiki/Bill_Gates","dataSource":"Wikipedia"},{"bingId":"df2c4376-9923-6a54-893f-2ee5a5badbc7","name":"Paul + Allen","matches":[{"text":"Paul Allen","offset":40,"length":10,"confidenceScore":0.54}],"language":"en","id":"Paul + Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"},{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' + headers: + apim-request-id: 70ab796e-3da1-4a55-86b4-16c4b19a97a8 + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1 + date: Mon, 31 Aug 2020 18:48:41 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '26' + status: + code: 200 + message: OK + url: https://cognitiveusw2dev.azure-api.net/text/analytics/v3.1-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py index 2ca6a82027d7..4d2b16d205fd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities.py @@ -3,7 +3,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ - +import os import pytest import platform import functools @@ -586,3 +586,17 @@ def test_string_index_type_not_fail_v3(self, client): # make sure that the addition of the string_index_type kwarg for v3.1-preview.1 doesn't # cause v3.0 calls to fail client.recognize_linked_entities(["please don't fail"]) + + # currently only have this as playback since the dev endpoint is unreliable + @pytest.mark.playback_test_only + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={ + "api_version": TextAnalyticsApiVersion.V3_1_PREVIEW_2, + "text_analytics_account_key": os.environ.get('AZURE_TEXT_ANALYTICS_KEY'), + "text_analytics_account": "https://cognitiveusw2dev.azure-api.net/" + }) + def test_bing_id(self, client): + result = client.recognize_linked_entities(["Microsoft was founded by Bill Gates and Paul Allen"]) + for doc in result: + for entity in doc.entities: + assert entity.bing_id # this checks if it's None and if it's empty diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py index e055f9178a24..5581410b49bf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_linked_entities_async.py @@ -3,7 +3,7 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ - +import os import pytest import platform import functools @@ -622,3 +622,17 @@ async def test_string_index_type_not_fail_v3(self, client): # make sure that the addition of the string_index_type kwarg for v3.1-preview.1 doesn't # cause v3.0 calls to fail await client.recognize_linked_entities(["please don't fail"]) + + # currently only have this as playback since the dev endpoint is unreliable + @pytest.mark.playback_test_only + @GlobalTextAnalyticsAccountPreparer() + @TextAnalyticsClientPreparer(client_kwargs={ + "api_version": TextAnalyticsApiVersion.V3_1_PREVIEW_2, + "text_analytics_account_key": os.environ.get('AZURE_TEXT_ANALYTICS_KEY'), + "text_analytics_account": "https://cognitiveusw2dev.azure-api.net/" + }) + async def test_bing_id(self, client): + result = await client.recognize_linked_entities(["Microsoft was founded by Bill Gates and Paul Allen"]) + for doc in result: + for entity in doc.entities: + assert entity.bing_id # this checks if it's None and if it's empty diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py index eca9da158bff..8d0c1463f16e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_repr.py @@ -116,12 +116,15 @@ def linked_entity(linked_entity_match): language="English", data_source_entity_id="Bill Gates", url="https://en.wikipedia.org/wiki/Bill_Gates", - data_source="wikipedia" + data_source="wikipedia", + bing_id="12345678" ) model_repr = ( "LinkedEntity(name=Bill Gates, matches=[{}, {}], "\ "language=English, data_source_entity_id=Bill Gates, "\ - "url=https://en.wikipedia.org/wiki/Bill_Gates, data_source=wikipedia)".format(linked_entity_match[1], linked_entity_match[1]) + "url=https://en.wikipedia.org/wiki/Bill_Gates, data_source=wikipedia, bing_id=12345678)".format( + linked_entity_match[1], linked_entity_match[1] + ) ) assert repr(model) == model_repr return model, model_repr