From 6e10afe7795efc029b8acd74c51ea3404c4e9dc4 Mon Sep 17 00:00:00 2001 From: swathipil <76007337+swathipil@users.noreply.github.com> Date: Wed, 29 Sep 2021 18:00:11 -0700 Subject: [PATCH] [SchemaRegistry] add lru cache to avro serializer (#20813) fixes: #20712 performance comparison results: https://github.com/Azure/azure-sdk-for-python/issues/20712#issuecomment-926190604 --- .../_schema_registry_avro_serializer.py | 41 +++++------ .../samples/avro_serializer.py | 12 +-- .../samples/eventhub_receive_integration.py | 6 +- .../samples/eventhub_send_integration.py | 6 +- .../setup.py | 12 ++- ...serializer_with_auto_register_schemas.yaml | 8 +- ...ializer_without_auto_register_schemas.yaml | 8 +- .../tests/schemaregistry_preparer.py | 73 ------------------- .../tests/test_avro_serializer.py | 6 -- .../sample_code_schemaregistry_async.py | 16 ++-- .../async_samples/schema_registry_async.py | 12 +-- .../sample_code_schemaregistry.py | 16 ++-- .../samples/sync_samples/schema_registry.py | 12 +-- ...egistry_async.test_schema_basic_async.yaml | 26 +++---- ....test_schema_negative_no_schema_async.yaml | 12 +-- ...ry_async.test_schema_same_twice_async.yaml | 16 ++-- ...gistry_async.test_schema_update_async.yaml | 38 +++++----- ...est_schema_registry.test_schema_basic.yaml | 24 +++--- ...gistry.test_schema_negative_no_schema.yaml | 12 +-- ...chema_registry.test_schema_same_twice.yaml | 16 ++-- ...st_schema_registry.test_schema_update.yaml | 36 ++++----- .../tests/schemaregistry_preparer.py | 16 ++-- sdk/schemaregistry/tests.yml | 4 +- shared_requirements.txt | 1 + 24 files changed, 174 insertions(+), 255 deletions(-) delete mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/schemaregistry_preparer.py diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_schema_registry_avro_serializer.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_schema_registry_avro_serializer.py index d322730bfd16..f316fa9d1f07 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_schema_registry_avro_serializer.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_schema_registry_avro_serializer.py @@ -23,6 +23,10 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- +try: + from functools import lru_cache +except ImportError: + from backports.functools_lru_cache import lru_cache from io import BytesIO from typing import Any, Dict, Mapping import avro @@ -59,8 +63,6 @@ def __init__(self, **kwargs): if self._auto_register_schemas else self._schema_registry_client.get_schema_id ) - self._id_to_schema = {} - self._schema_to_id = {} self._user_input_schema_cache = {} def __enter__(self): @@ -79,8 +81,9 @@ def close(self): """ self._schema_registry_client.close() - def _get_schema_id(self, schema_name, schema, **kwargs): - # type: (str, avro.schema.Schema, Any) -> str + @lru_cache(maxsize=128) + def _get_schema_id(self, schema_name, schema_str, **kwargs): + # type: (str, str, Any) -> str """ Get schema id from local cache with the given schema. If there is no item in the local cache, get schema id from the service and cache it. @@ -92,17 +95,12 @@ def _get_schema_id(self, schema_name, schema, **kwargs): :return: Schema Id :rtype: str """ - schema_str = str(schema) - try: - return self._schema_to_id[schema_str] - except KeyError: - schema_id = self._auto_register_schema_func( - self._schema_group, schema_name, "Avro", schema_str, **kwargs - ).schema_id - self._schema_to_id[schema_str] = schema_id - self._id_to_schema[schema_id] = schema_str - return schema_id + schema_id = self._auto_register_schema_func( + self._schema_group, schema_name, "Avro", schema_str, **kwargs + ).schema_id + return schema_id + @lru_cache(maxsize=128) def _get_schema(self, schema_id, **kwargs): # type: (str, Any) -> str """ @@ -112,15 +110,10 @@ def _get_schema(self, schema_id, **kwargs): :param str schema_id: Schema id :return: Schema content """ - try: - return self._id_to_schema[schema_id] - except KeyError: - schema_str = self._schema_registry_client.get_schema( - schema_id, **kwargs - ).schema_content - self._id_to_schema[schema_id] = schema_str - self._schema_to_id[schema_str] = schema_id - return schema_str + schema_str = self._schema_registry_client.get_schema( + schema_id, **kwargs + ).schema_content + return schema_str def serialize(self, value, **kwargs): # type: (Mapping[str, Any], Any) -> bytes @@ -147,7 +140,7 @@ def serialize(self, value, **kwargs): cached_schema = parsed_schema record_format_identifier = b"\0\0\0\0" - schema_id = self._get_schema_id(cached_schema.fullname, cached_schema, **kwargs) + schema_id = self._get_schema_id(cached_schema.fullname, str(cached_schema), **kwargs) data_bytes = self._avro_serializer.serialize(value, cached_schema) stream = BytesIO() diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/avro_serializer.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/avro_serializer.py index 592f1afa760f..a31e4a7b88ee 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/avro_serializer.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/avro_serializer.py @@ -29,12 +29,12 @@ from azure.schemaregistry import SchemaRegistryClient from azure.schemaregistry.serializer.avroserializer import SchemaRegistryAvroSerializer -TENANT_ID=os.environ['SCHEMA_REGISTRY_AZURE_TENANT_ID'] -CLIENT_ID=os.environ['SCHEMA_REGISTRY_AZURE_CLIENT_ID'] -CLIENT_SECRET=os.environ['SCHEMA_REGISTRY_AZURE_CLIENT_SECRET'] +TENANT_ID=os.environ['AZURE_TENANT_ID'] +CLIENT_ID=os.environ['AZURE_CLIENT_ID'] +CLIENT_SECRET=os.environ['AZURE_CLIENT_SECRET'] -SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE=os.environ['SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE'] -GROUP_NAME=os.environ['SCHEMA_REGISTRY_GROUP'] +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE=os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] +GROUP_NAME=os.environ['SCHEMAREGISTRY_GROUP'] SCHEMA_STRING = """ {"namespace": "example.avro", "type": "record", @@ -79,7 +79,7 @@ def deserialize(serializer, bytes_payload): if __name__ == '__main__': - schema_registry = SchemaRegistryClient(endpoint=SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=token_credential) + schema_registry = SchemaRegistryClient(endpoint=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=token_credential) serializer = SchemaRegistryAvroSerializer(client=schema_registry, group_name=GROUP_NAME, auto_register_schemas=True) bytes_data_ben, bytes_data_alice = serialize(serializer) dict_data_ben = deserialize(serializer, bytes_data_ben) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_receive_integration.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_receive_integration.py index 2cf4d0095b28..3cbf949adf00 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_receive_integration.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_receive_integration.py @@ -19,8 +19,8 @@ EVENTHUB_CONNECTION_STR = os.environ['EVENT_HUB_CONN_STR'] EVENTHUB_NAME = os.environ['EVENT_HUB_NAME'] -SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ['SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE'] -GROUP_NAME = os.environ['SCHEMA_REGISTRY_GROUP'] +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] +GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] def on_event(partition_context, event): @@ -48,7 +48,7 @@ def on_event(partition_context, event): # TODO: after 'azure-schemaregistry==1.0.0b3' is released, update 'endpoint' to 'fully_qualified_namespace' avro_serializer = SchemaRegistryAvroSerializer( client=SchemaRegistryClient( - endpoint=SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE, + endpoint=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=DefaultAzureCredential() ), group_name=GROUP_NAME, diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_send_integration.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_send_integration.py index 2638b849cf8d..d184e87d89a8 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_send_integration.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_send_integration.py @@ -20,8 +20,8 @@ EVENTHUB_CONNECTION_STR = os.environ['EVENT_HUB_CONN_STR'] EVENTHUB_NAME = os.environ['EVENT_HUB_NAME'] -SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ['SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE'] -GROUP_NAME = os.environ['SCHEMA_REGISTRY_GROUP'] +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] +GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] SCHEMA_STRING = """ {"namespace": "example.avro", @@ -62,7 +62,7 @@ def send_event_data_batch(producer, serializer): # TODO: after 'azure-schemaregistry==1.0.0b3' is released, update 'endpoint' to 'fully_qualified_namespace' avro_serializer = SchemaRegistryAvroSerializer( client=SchemaRegistryClient( - endpoint=SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE, + endpoint=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=DefaultAzureCredential() ), group_name=GROUP_NAME, diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/setup.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/setup.py index a31cbd1fc226..c33948ec7b1c 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/setup.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/setup.py @@ -7,6 +7,7 @@ # ------------------------------------------------------------------------- import re +import sys import os.path from io import open from setuptools import find_packages, setup @@ -39,6 +40,12 @@ 'azure.schemaregistry', 'azure.schemaregistry.serializer' ] +install_packages = [ + 'azure-schemaregistry==1.0.0b2', + 'avro<2.0.0,>=1.10.0' +] +if sys.version_info < (3,0): + install_packages.append('backports.functools-lru-cache>=1.6.4') setup( name=PACKAGE_NAME, @@ -64,8 +71,5 @@ ], zip_safe=False, packages=find_packages(exclude=exclude_packages), - install_requires=[ - 'azure-schemaregistry==1.0.0b2', - 'avro<2.0.0,>=1.10.0' - ] + install_requires=install_packages ) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_with_auto_register_schemas.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_with_auto_register_schemas.yaml index 138b96d57d44..90dc88aa96ec 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_with_auto_register_schemas.yaml +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_with_auto_register_schemas.yaml @@ -23,12 +23,12 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/example.avro.User?api-version=2017-04 response: body: - string: '{"id":"fc61e4d3e31b46f6a758fa1b67f35cc5"}' + string: '{"id":"f666e373299048fabaa4296f5dbfed46"}' headers: content-type: - application/json date: - - Fri, 24 Sep 2021 19:54:45 GMT + - Tue, 28 Sep 2021 22:27:25 GMT location: - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2017-04 server: @@ -38,9 +38,9 @@ interactions: transfer-encoding: - chunked x-schema-id: - - fc61e4d3e31b46f6a758fa1b67f35cc5 + - f666e373299048fabaa4296f5dbfed46 x-schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/fc61e4d3e31b46f6a758fa1b67f35cc5?api-version=2017-04 + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/f666e373299048fabaa4296f5dbfed46?api-version=2017-04 x-schema-type: - Avro x-schema-version: diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_without_auto_register_schemas.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_without_auto_register_schemas.yaml index 2d3f07b5e19d..7dce4b62fbfe 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_without_auto_register_schemas.yaml +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_without_auto_register_schemas.yaml @@ -23,12 +23,12 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/example.avro.User?api-version=2017-04 response: body: - string: '{"id":"fc61e4d3e31b46f6a758fa1b67f35cc5"}' + string: '{"id":"f666e373299048fabaa4296f5dbfed46"}' headers: content-type: - application/json date: - - Fri, 24 Sep 2021 19:54:47 GMT + - Tue, 28 Sep 2021 22:27:26 GMT location: - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2017-04 server: @@ -38,9 +38,9 @@ interactions: transfer-encoding: - chunked x-schema-id: - - fc61e4d3e31b46f6a758fa1b67f35cc5 + - f666e373299048fabaa4296f5dbfed46 x-schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/fc61e4d3e31b46f6a758fa1b67f35cc5?api-version=2017-04 + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/f666e373299048fabaa4296f5dbfed46?api-version=2017-04 x-schema-type: - Avro x-schema-version: diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/schemaregistry_preparer.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/schemaregistry_preparer.py deleted file mode 100644 index bbf139cbac38..000000000000 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/schemaregistry_preparer.py +++ /dev/null @@ -1,73 +0,0 @@ -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- - -import functools -import hashlib -import os -from collections import namedtuple - -from azure.identity import ClientSecretCredential -from azure_devtools.scenario_tests.exceptions import AzureTestError -from devtools_testutils import ( - ResourceGroupPreparer, AzureMgmtPreparer, FakeResource -) - - -SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE_PARAM = "schemaregistry_fully_qualified_namespace" -SCHEMA_REGISTRY_GROUP_PARAM = "schemaregistry_group" -SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE_ENV_KEY_NAME = 'SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE' -SCHEMA_REGISTRY_GROUP_ENV_KEY_NAME = 'SCHEMA_REGISTRY_GROUP' - - -class SchemaRegistryNamespacePreparer(AzureMgmtPreparer): - # TODO: SR doesn't have mgmt package - def __init__(self): - pass - - def create_resource(self, name, **kwargs): - pass - - def remove_resource(self, name, **kwargs): - pass - - -class SchemaRegistryPreparer(AzureMgmtPreparer): - def __init__( - self, - name_prefix='' - ): - super(SchemaRegistryPreparer, self).__init__(name_prefix, 24) - - def create_resource(self, name, **kwargs): - # TODO: right now the endpoint/group is fixed, as there is no way to create/delete resources using api, in the future we should be able to dynamically create and remove resources - if self.is_live: - return { - SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE_PARAM: os.environ[SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE_ENV_KEY_NAME], - SCHEMA_REGISTRY_GROUP_PARAM: os.environ[SCHEMA_REGISTRY_GROUP_ENV_KEY_NAME] - } - - else: - return { - SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE_PARAM: "sr-playground.servicebus.windows.net", - SCHEMA_REGISTRY_GROUP_PARAM: "azsdk_python_test_group" - } - - def remove_resource(self, name, **kwargs): - pass diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/test_avro_serializer.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/test_avro_serializer.py index 3d7b7f56608a..bf2bca41907f 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/test_avro_serializer.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/test_avro_serializer.py @@ -87,14 +87,11 @@ def test_basic_sr_avro_serializer_with_auto_register_schemas(self, schemaregistr encoded_data = sr_avro_serializer.serialize(dict_data, schema=schema_str) assert schema_str in sr_avro_serializer._user_input_schema_cache - assert str(avro.schema.parse(schema_str)) in sr_avro_serializer._schema_to_id assert encoded_data[0:4] == b'\0\0\0\0' schema_id = sr_client.get_schema_id(schemaregistry_group, schema.fullname, "Avro", str(schema)).schema_id assert encoded_data[4:36] == schema_id.encode("utf-8") - assert schema_id in sr_avro_serializer._id_to_schema - decoded_data = sr_avro_serializer.deserialize(encoded_data) assert decoded_data["name"] == u"Ben" assert decoded_data["favorite_number"] == 7 @@ -115,14 +112,11 @@ def test_basic_sr_avro_serializer_without_auto_register_schemas(self, schemaregi encoded_data = sr_avro_serializer.serialize(dict_data, schema=schema_str) assert schema_str in sr_avro_serializer._user_input_schema_cache - assert str(avro.schema.parse(schema_str)) in sr_avro_serializer._schema_to_id assert encoded_data[0:4] == b'\0\0\0\0' schema_id = sr_client.get_schema_id(schemaregistry_group, schema.fullname, "Avro", str(schema)).schema_id assert encoded_data[4:36] == schema_id.encode("utf-8") - assert schema_id in sr_avro_serializer._id_to_schema - decoded_data = sr_avro_serializer.deserialize(encoded_data) assert decoded_data["name"] == u"Ben" assert decoded_data["favorite_number"] == 7 diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/sample_code_schemaregistry_async.py b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/sample_code_schemaregistry_async.py index f304528c7332..6838c04d68ea 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/sample_code_schemaregistry_async.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/sample_code_schemaregistry_async.py @@ -33,21 +33,21 @@ def create_client(): # [START create_sr_client_async] - SCHEMA_REGISTRY_FQN = os.environ['SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE'] + SCHEMAREGISTRY_FQN = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] token_credential = DefaultAzureCredential() - schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMA_REGISTRY_FQN, credential=token_credential) + schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential) # [END create_sr_client_async] - TENANT_ID = os.environ['SCHEMA_REGISTRY_AZURE_TENANT_ID'] - CLIENT_ID = os.environ['SCHEMA_REGISTRY_AZURE_CLIENT_ID'] - CLIENT_SECRET = os.environ['SCHEMA_REGISTRY_AZURE_CLIENT_SECRET'] + TENANT_ID = os.environ['AZURE_TENANT_ID'] + CLIENT_ID = os.environ['AZURE_CLIENT_ID'] + CLIENT_SECRET = os.environ['AZURE_CLIENT_SECRET'] token_credential = ClientSecretCredential(TENANT_ID, CLIENT_ID, CLIENT_SECRET) - schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMA_REGISTRY_FQN, credential=token_credential) + schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential) return schema_registry_client, token_credential async def register_schema(schema_registry_client): # [START register_schema_async] - GROUP_NAME = os.environ['SCHEMA_REGISTRY_GROUP'] + GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] NAME = 'your-schema-name' FORMAT = SchemaFormat.AVRO SCHEMA_DEFINITION = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" @@ -66,7 +66,7 @@ async def get_schema(schema_registry_client, id): async def get_schema_id(schema_registry_client): - group_name = os.environ['SCHEMA_REGISTRY_GROUP'] + group_name = os.environ['SCHEMAREGISTRY_GROUP'] name = 'your-schema-name' format = SchemaFormat.AVRO schema_definition = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py index 20799e5aa353..6a156865647c 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py @@ -18,12 +18,12 @@ from azure.schemaregistry.aio import SchemaRegistryClient from azure.schemaregistry import SchemaFormat -TENANT_ID = os.environ['SCHEMA_REGISTRY_AZURE_TENANT_ID'] -CLIENT_ID = os.environ['SCHEMA_REGISTRY_AZURE_CLIENT_ID'] -CLIENT_SECRET = os.environ['SCHEMA_REGISTRY_AZURE_CLIENT_SECRET'] +TENANT_ID = os.environ['AZURE_TENANT_ID'] +CLIENT_ID = os.environ['AZURE_CLIENT_ID'] +CLIENT_SECRET = os.environ['AZURE_CLIENT_SECRET'] -SCHEMA_REGISTRY_FQN = os.environ['SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE'] -GROUP_NAME = os.environ['SCHEMA_REGISTRY_GROUP'] +SCHEMAREGISTRY_FQN = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] +GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] NAME = 'your-schema-name' FORMAT = SchemaFormat.AVRO SCHEMA_STRING = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" @@ -59,7 +59,7 @@ async def main(): client_id=CLIENT_ID, client_secret=CLIENT_SECRET ) - schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMA_REGISTRY_FQN, credential=token_credential) + schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential) async with token_credential, schema_registry_client: schema_id = await register_schema(schema_registry_client, GROUP_NAME, NAME, SCHEMA_STRING, FORMAT) schema_str = await get_schema_by_id(schema_registry_client, schema_id) diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/sample_code_schemaregistry.py b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/sample_code_schemaregistry.py index f3aede39c512..8c3138b68647 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/sample_code_schemaregistry.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/sample_code_schemaregistry.py @@ -31,21 +31,21 @@ def create_client(): # [START create_sr_client_sync] - SCHEMA_REGISTRY_FQN = os.environ['SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE'] + SCHEMAREGISTRY_FQN = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] token_credential = DefaultAzureCredential() - schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMA_REGISTRY_FQN, credential=token_credential) + schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential) # [END create_sr_client_sync] - TENANT_ID = os.environ['SCHEMA_REGISTRY_AZURE_TENANT_ID'] - CLIENT_ID = os.environ['SCHEMA_REGISTRY_AZURE_CLIENT_ID'] - CLIENT_SECRET = os.environ['SCHEMA_REGISTRY_AZURE_CLIENT_SECRET'] + TENANT_ID = os.environ['AZURE_TENANT_ID'] + CLIENT_ID = os.environ['AZURE_CLIENT_ID'] + CLIENT_SECRET = os.environ['AZURE_CLIENT_SECRET'] token_credential = ClientSecretCredential(TENANT_ID, CLIENT_ID, CLIENT_SECRET) - schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMA_REGISTRY_FQN, credential=token_credential) + schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential) return schema_registry_client def register_schema(schema_registry_client): # [START register_schema_sync] - GROUP_NAME = os.environ['SCHEMA_REGISTRY_GROUP'] + GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] NAME = 'your-schema-name' FORMAT = SchemaFormat.AVRO SCHEMA_DEFINITION = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" @@ -76,7 +76,7 @@ def get_schema(schema_registry_client, id): def get_schema_id(schema_registry_client): - group_name = os.environ['SCHEMA_REGISTRY_GROUP'] + group_name = os.environ['SCHEMAREGISTRY_GROUP'] name = 'your-schema-name' format = SchemaFormat.AVRO schema_definition = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py index 08f5a539b383..842cfc694e21 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py @@ -38,12 +38,12 @@ from azure.identity import ClientSecretCredential from azure.schemaregistry import SchemaRegistryClient, SchemaFormat -TENANT_ID = os.environ['SCHEMA_REGISTRY_AZURE_TENANT_ID'] -CLIENT_ID = os.environ['SCHEMA_REGISTRY_AZURE_CLIENT_ID'] -CLIENT_SECRET = os.environ['SCHEMA_REGISTRY_AZURE_CLIENT_SECRET'] +TENANT_ID = os.environ['AZURE_TENANT_ID'] +CLIENT_ID = os.environ['AZURE_CLIENT_ID'] +CLIENT_SECRET = os.environ['AZURE_CLIENT_SECRET'] -SCHEMA_REGISTRY_FQN = os.environ['SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE'] -GROUP_NAME = os.environ['SCHEMA_REGISTRY_GROUP'] +SCHEMAREGISTRY_FQN = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] +GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] NAME = 'your-schema-name' FORMAT = SchemaFormat.AVRO @@ -99,7 +99,7 @@ def get_schema_id(client, group_name, name, schema_string, format): client_id=CLIENT_ID, client_secret=CLIENT_SECRET ) - schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMA_REGISTRY_FQN, credential=token_credential) + schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential) with schema_registry_client: schema_id = register_schema(schema_registry_client, GROUP_NAME, NAME, SCHEMA_STRING, FORMAT) schema_str = get_schema_by_id(schema_registry_client, schema_id) diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_basic_async.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_basic_async.yaml index f7adcf285361..acbe6c787c8f 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_basic_async.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_basic_async.yaml @@ -16,13 +16,13 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-basic-asynce5e1482?api-version=2020-09-01-preview response: body: - string: '{"id":"ce01b38330914a5d92b88f534bafbfe9"}' + string: '{"id":"ccc58199c8974f60be5b8de153ae9771"}' headers: content-type: application/json - date: Fri, 24 Sep 2021 19:10:30 GMT + date: Wed, 29 Sep 2021 16:52:39 GMT location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-basic-asynce5e1482/versions/1?api-version=2020-09-01-preview - schema-id: ce01b38330914a5d92b88f534bafbfe9 - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ce01b38330914a5d92b88f534bafbfe9?api-version=2020-09-01-preview + schema-id: ccc58199c8974f60be5b8de153ae9771 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ccc58199c8974f60be5b8de153ae9771?api-version=2020-09-01-preview schema-version: '1' schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic-asynce5e1482/versions?api-version=2020-09-01-preview serialization-type: Avro @@ -41,16 +41,16 @@ interactions: User-Agent: - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/ce01b38330914a5d92b88f534bafbfe9?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/ccc58199c8974f60be5b8de153ae9771?api-version=2020-09-01-preview response: body: string: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}' headers: content-type: application/json - date: Fri, 24 Sep 2021 19:10:31 GMT + date: Wed, 29 Sep 2021 16:52:39 GMT location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-basic-asynce5e1482/versions/1?api-version=2020-09-01-preview - schema-id: ce01b38330914a5d92b88f534bafbfe9 - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ce01b38330914a5d92b88f534bafbfe9?api-version=2020-09-01-preview + schema-id: ccc58199c8974f60be5b8de153ae9771 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ccc58199c8974f60be5b8de153ae9771?api-version=2020-09-01-preview schema-version: '1' schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic-asynce5e1482/versions?api-version=2020-09-01-preview serialization-type: Avro @@ -60,7 +60,7 @@ interactions: status: code: 200 message: OK - url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/getSchemaById/ce01b38330914a5d92b88f534bafbfe9?api-version=2020-09-01-preview + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/getSchemaById/ccc58199c8974f60be5b8de153ae9771?api-version=2020-09-01-preview - request: body: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}' headers: @@ -78,13 +78,13 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-basic-asynce5e1482?api-version=2020-09-01-preview response: body: - string: '{"id":"ce01b38330914a5d92b88f534bafbfe9"}' + string: '{"id":"ccc58199c8974f60be5b8de153ae9771"}' headers: content-type: application/json - date: Fri, 24 Sep 2021 19:10:31 GMT + date: Wed, 29 Sep 2021 16:52:40 GMT location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-basic-asynce5e1482/versions/1?api-version=2020-09-01-preview - schema-id: ce01b38330914a5d92b88f534bafbfe9 - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ce01b38330914a5d92b88f534bafbfe9?api-version=2020-09-01-preview + schema-id: ccc58199c8974f60be5b8de153ae9771 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ccc58199c8974f60be5b8de153ae9771?api-version=2020-09-01-preview schema-version: '1' schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic-asynce5e1482/versions?api-version=2020-09-01-preview serialization-type: Avro diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_negative_no_schema_async.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_negative_no_schema_async.yaml index c8896c5d4452..41d8d1375848 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_negative_no_schema_async.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_negative_no_schema_async.yaml @@ -11,12 +11,12 @@ interactions: response: body: string: '{"Code":400,"Detail":"SubCode=40000, UnknownType:The request is invalid. - [MGResponseHttpError=BadRequest]. TrackingId:c5b8cd47-1efe-41c2-964a-8cc46d7bafdb_G25, + [MGResponseHttpError=BadRequest]. TrackingId:dbfa19f5-29c4-4278-a562-7abb97e16e07_G27, SystemTracker:swathip-test-eventhubs.servicebus.windows.net:$schemagroups\/getSchemaById\/a, - Timestamp:2021-09-24T19:10:33"}' + Timestamp:2021-09-29T16:52:41"}' headers: content-type: application/json - date: Fri, 24 Sep 2021 19:10:33 GMT + date: Wed, 29 Sep 2021 16:52:41 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked @@ -36,11 +36,11 @@ interactions: response: body: string: '{"Code":404,"Detail":"Schema id aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa does - not exist. TrackingId:6ad46706-814a-4973-9ec2-dc77945914b1_G25, SystemTracker:swathip-test-eventhubs.servicebus.windows.net:$schemagroups\/getSchemaById\/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, - Timestamp:2021-09-24T19:10:33"}' + not exist. TrackingId:87072604-c61d-4dce-bd60-077162e0aa78_G27, SystemTracker:swathip-test-eventhubs.servicebus.windows.net:$schemagroups\/getSchemaById\/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, + Timestamp:2021-09-29T16:52:41"}' headers: content-type: application/json - date: Fri, 24 Sep 2021 19:10:33 GMT + date: Wed, 29 Sep 2021 16:52:41 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_same_twice_async.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_same_twice_async.yaml index c5ddf01cf2ae..838dc9163ded 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_same_twice_async.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_same_twice_async.yaml @@ -16,13 +16,13 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-twice-async7bfd16a1?api-version=2020-09-01-preview response: body: - string: '{"id":"4eaa74dead3f4ee5b6f6ed66a4a2175a"}' + string: '{"id":"80ff968ac6744d8da0498ee8cc1e19ab"}' headers: content-type: application/json - date: Fri, 24 Sep 2021 19:10:39 GMT + date: Wed, 29 Sep 2021 16:52:48 GMT location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-twice-async7bfd16a1/versions/1?api-version=2020-09-01-preview - schema-id: 4eaa74dead3f4ee5b6f6ed66a4a2175a - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/4eaa74dead3f4ee5b6f6ed66a4a2175a?api-version=2020-09-01-preview + schema-id: 80ff968ac6744d8da0498ee8cc1e19ab + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/80ff968ac6744d8da0498ee8cc1e19ab?api-version=2020-09-01-preview schema-version: '1' schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-twice-async7bfd16a1/versions?api-version=2020-09-01-preview serialization-type: Avro @@ -50,13 +50,13 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-twice-async7bfd16a1?api-version=2020-09-01-preview response: body: - string: '{"id":"4eaa74dead3f4ee5b6f6ed66a4a2175a"}' + string: '{"id":"80ff968ac6744d8da0498ee8cc1e19ab"}' headers: content-type: application/json - date: Fri, 24 Sep 2021 19:10:40 GMT + date: Wed, 29 Sep 2021 16:52:48 GMT location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-twice-async7bfd16a1/versions/1?api-version=2020-09-01-preview - schema-id: 4eaa74dead3f4ee5b6f6ed66a4a2175a - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/4eaa74dead3f4ee5b6f6ed66a4a2175a?api-version=2020-09-01-preview + schema-id: 80ff968ac6744d8da0498ee8cc1e19ab + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/80ff968ac6744d8da0498ee8cc1e19ab?api-version=2020-09-01-preview schema-version: '1' schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-twice-async7bfd16a1/versions?api-version=2020-09-01-preview serialization-type: Avro diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_update_async.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_update_async.yaml index 1de1acbca093..502771bd0c8b 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_update_async.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_update_async.yaml @@ -16,14 +16,14 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-update-async24591503?api-version=2020-09-01-preview response: body: - string: '{"id":"2b0e42eb865a491f8c60b139c93565ed"}' + string: '{"id":"61ca9598e1f94f4e8e0e77732673143d"}' headers: content-type: application/json - date: Fri, 24 Sep 2021 19:10:40 GMT - location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update-async24591503/versions/1?api-version=2020-09-01-preview - schema-id: 2b0e42eb865a491f8c60b139c93565ed - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/2b0e42eb865a491f8c60b139c93565ed?api-version=2020-09-01-preview - schema-version: '1' + date: Wed, 29 Sep 2021 16:52:49 GMT + location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update-async24591503/versions/5?api-version=2020-09-01-preview + schema-id: 61ca9598e1f94f4e8e0e77732673143d + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/61ca9598e1f94f4e8e0e77732673143d?api-version=2020-09-01-preview + schema-version: '5' schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update-async24591503/versions?api-version=2020-09-01-preview serialization-type: Avro server: Microsoft-HTTPAPI/2.0 @@ -50,14 +50,14 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-update-async24591503?api-version=2020-09-01-preview response: body: - string: '{"id":"75db6cf193ac46c7a7ee06b9fe37aced"}' + string: '{"id":"a5b1a7a9955445d3b133f7cbb1f89c92"}' headers: content-type: application/json - date: Fri, 24 Sep 2021 19:10:41 GMT - location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update-async24591503/versions/2?api-version=2020-09-01-preview - schema-id: 75db6cf193ac46c7a7ee06b9fe37aced - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/75db6cf193ac46c7a7ee06b9fe37aced?api-version=2020-09-01-preview - schema-version: '2' + date: Wed, 29 Sep 2021 16:52:49 GMT + location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update-async24591503/versions/6?api-version=2020-09-01-preview + schema-id: a5b1a7a9955445d3b133f7cbb1f89c92 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/a5b1a7a9955445d3b133f7cbb1f89c92?api-version=2020-09-01-preview + schema-version: '6' schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update-async24591503/versions?api-version=2020-09-01-preview serialization-type: Avro server: Microsoft-HTTPAPI/2.0 @@ -75,17 +75,17 @@ interactions: User-Agent: - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/75db6cf193ac46c7a7ee06b9fe37aced?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/a5b1a7a9955445d3b133f7cbb1f89c92?api-version=2020-09-01-preview response: body: string: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_food","type":["string","null"]}]}' headers: content-type: application/json - date: Fri, 24 Sep 2021 19:10:41 GMT - location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update-async24591503/versions/2?api-version=2020-09-01-preview - schema-id: 75db6cf193ac46c7a7ee06b9fe37aced - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/75db6cf193ac46c7a7ee06b9fe37aced?api-version=2020-09-01-preview - schema-version: '2' + date: Wed, 29 Sep 2021 16:52:49 GMT + location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update-async24591503/versions/6?api-version=2020-09-01-preview + schema-id: a5b1a7a9955445d3b133f7cbb1f89c92 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/a5b1a7a9955445d3b133f7cbb1f89c92?api-version=2020-09-01-preview + schema-version: '6' schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update-async24591503/versions?api-version=2020-09-01-preview serialization-type: Avro server: Microsoft-HTTPAPI/2.0 @@ -94,5 +94,5 @@ interactions: status: code: 200 message: OK - url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/getSchemaById/75db6cf193ac46c7a7ee06b9fe37aced?api-version=2020-09-01-preview + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/getSchemaById/a5b1a7a9955445d3b133f7cbb1f89c92?api-version=2020-09-01-preview version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_basic.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_basic.yaml index 01adea1ae411..328f7761d583 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_basic.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_basic.yaml @@ -20,18 +20,18 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88?api-version=2020-09-01-preview response: body: - string: '{"id":"c9e4d79c4a06400aac374b9711bf98f8"}' + string: '{"id":"694cab9feec74728bb431fe3a7bf75f0"}' headers: content-type: - application/json date: - - Fri, 24 Sep 2021 23:46:00 GMT + - Wed, 29 Sep 2021 16:52:26 GMT location: - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88/versions/1?api-version=2020-09-01-preview schema-id: - - c9e4d79c4a06400aac374b9711bf98f8 + - 694cab9feec74728bb431fe3a7bf75f0 schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/c9e4d79c4a06400aac374b9711bf98f8?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/694cab9feec74728bb431fe3a7bf75f0?api-version=2020-09-01-preview schema-version: - '1' schema-versions-location: @@ -59,7 +59,7 @@ interactions: User-Agent: - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/c9e4d79c4a06400aac374b9711bf98f8?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/694cab9feec74728bb431fe3a7bf75f0?api-version=2020-09-01-preview response: body: string: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}' @@ -67,13 +67,13 @@ interactions: content-type: - application/json date: - - Fri, 24 Sep 2021 23:46:00 GMT + - Wed, 29 Sep 2021 16:52:26 GMT location: - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88/versions/1?api-version=2020-09-01-preview schema-id: - - c9e4d79c4a06400aac374b9711bf98f8 + - 694cab9feec74728bb431fe3a7bf75f0 schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/c9e4d79c4a06400aac374b9711bf98f8?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/694cab9feec74728bb431fe3a7bf75f0?api-version=2020-09-01-preview schema-version: - '1' schema-versions-location: @@ -110,18 +110,18 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88?api-version=2020-09-01-preview response: body: - string: '{"id":"c9e4d79c4a06400aac374b9711bf98f8"}' + string: '{"id":"694cab9feec74728bb431fe3a7bf75f0"}' headers: content-type: - application/json date: - - Fri, 24 Sep 2021 23:46:01 GMT + - Wed, 29 Sep 2021 16:52:27 GMT location: - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88/versions/1?api-version=2020-09-01-preview schema-id: - - c9e4d79c4a06400aac374b9711bf98f8 + - 694cab9feec74728bb431fe3a7bf75f0 schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/c9e4d79c4a06400aac374b9711bf98f8?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/694cab9feec74728bb431fe3a7bf75f0?api-version=2020-09-01-preview schema-version: - '1' schema-versions-location: diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_negative_no_schema.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_negative_no_schema.yaml index d3b4e6df3427..601d2162551e 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_negative_no_schema.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_negative_no_schema.yaml @@ -15,14 +15,14 @@ interactions: response: body: string: '{"Code":400,"Detail":"SubCode=40000, UnknownType:The request is invalid. - [MGResponseHttpError=BadRequest]. TrackingId:21ad828b-f18a-41e9-b6b2-a7999b16edf0_G16, + [MGResponseHttpError=BadRequest]. TrackingId:70e92116-f53e-4bac-a8c0-d4911d73b78b_G6, SystemTracker:swathip-test-eventhubs.servicebus.windows.net:$schemagroups\/getSchemaById\/a, - Timestamp:2021-09-24T23:46:03"}' + Timestamp:2021-09-29T16:52:28"}' headers: content-type: - application/json date: - - Fri, 24 Sep 2021 23:46:02 GMT + - Wed, 29 Sep 2021 16:52:28 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -48,13 +48,13 @@ interactions: response: body: string: '{"Code":404,"Detail":"Schema id aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa does - not exist. TrackingId:84fba0d2-8892-49c4-83f7-a46bb0c51a72_G16, SystemTracker:swathip-test-eventhubs.servicebus.windows.net:$schemagroups\/getSchemaById\/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, - Timestamp:2021-09-24T23:46:03"}' + not exist. TrackingId:ce867010-7173-41b3-9ad5-f3970933b3b4_G6, SystemTracker:swathip-test-eventhubs.servicebus.windows.net:$schemagroups\/getSchemaById\/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, + Timestamp:2021-09-29T16:52:29"}' headers: content-type: - application/json date: - - Fri, 24 Sep 2021 23:46:03 GMT + - Wed, 29 Sep 2021 16:52:28 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_same_twice.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_same_twice.yaml index 1314f6522692..5793ebd3966f 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_same_twice.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_same_twice.yaml @@ -20,18 +20,18 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-twice863b11a7?api-version=2020-09-01-preview response: body: - string: '{"id":"9d7f438550c74f65a54fbdf72c6fc2e5"}' + string: '{"id":"18f60ef48371403a8a14b118d5bb7b77"}' headers: content-type: - application/json date: - - Fri, 24 Sep 2021 19:10:27 GMT + - Wed, 29 Sep 2021 16:52:36 GMT location: - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-twice863b11a7/versions/1?api-version=2020-09-01-preview schema-id: - - 9d7f438550c74f65a54fbdf72c6fc2e5 + - 18f60ef48371403a8a14b118d5bb7b77 schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/9d7f438550c74f65a54fbdf72c6fc2e5?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/18f60ef48371403a8a14b118d5bb7b77?api-version=2020-09-01-preview schema-version: - '1' schema-versions-location: @@ -68,18 +68,18 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-twice863b11a7?api-version=2020-09-01-preview response: body: - string: '{"id":"9d7f438550c74f65a54fbdf72c6fc2e5"}' + string: '{"id":"18f60ef48371403a8a14b118d5bb7b77"}' headers: content-type: - application/json date: - - Fri, 24 Sep 2021 19:10:27 GMT + - Wed, 29 Sep 2021 16:52:36 GMT location: - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-twice863b11a7/versions/1?api-version=2020-09-01-preview schema-id: - - 9d7f438550c74f65a54fbdf72c6fc2e5 + - 18f60ef48371403a8a14b118d5bb7b77 schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/9d7f438550c74f65a54fbdf72c6fc2e5?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/18f60ef48371403a8a14b118d5bb7b77?api-version=2020-09-01-preview schema-version: - '1' schema-versions-location: diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_update.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_update.yaml index dd6609a3a1cf..fdccdada7bf1 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_update.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_update.yaml @@ -20,20 +20,20 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-update423f1009?api-version=2020-09-01-preview response: body: - string: '{"id":"96623bcb8c1145ada80fcd5539e2bb38"}' + string: '{"id":"95e1b9b2b37f47ec8b5c3ad1cc8a59b0"}' headers: content-type: - application/json date: - - Fri, 24 Sep 2021 19:10:29 GMT + - Wed, 29 Sep 2021 16:52:38 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update423f1009/versions/1?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update423f1009/versions/5?api-version=2020-09-01-preview schema-id: - - 96623bcb8c1145ada80fcd5539e2bb38 + - 95e1b9b2b37f47ec8b5c3ad1cc8a59b0 schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/96623bcb8c1145ada80fcd5539e2bb38?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/95e1b9b2b37f47ec8b5c3ad1cc8a59b0?api-version=2020-09-01-preview schema-version: - - '1' + - '5' schema-versions-location: - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update423f1009/versions?api-version=2020-09-01-preview serialization-type: @@ -68,20 +68,20 @@ interactions: uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-update423f1009?api-version=2020-09-01-preview response: body: - string: '{"id":"06471c0b87b642b0b8db01fa7a03c788"}' + string: '{"id":"15ccba13dd0f4491aaebaa0d5d1c8269"}' headers: content-type: - application/json date: - - Fri, 24 Sep 2021 19:10:29 GMT + - Wed, 29 Sep 2021 16:52:38 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update423f1009/versions/2?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update423f1009/versions/6?api-version=2020-09-01-preview schema-id: - - 06471c0b87b642b0b8db01fa7a03c788 + - 15ccba13dd0f4491aaebaa0d5d1c8269 schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/06471c0b87b642b0b8db01fa7a03c788?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/15ccba13dd0f4491aaebaa0d5d1c8269?api-version=2020-09-01-preview schema-version: - - '2' + - '6' schema-versions-location: - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update423f1009/versions?api-version=2020-09-01-preview serialization-type: @@ -107,7 +107,7 @@ interactions: User-Agent: - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/06471c0b87b642b0b8db01fa7a03c788?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/15ccba13dd0f4491aaebaa0d5d1c8269?api-version=2020-09-01-preview response: body: string: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_food","type":["string","null"]}]}' @@ -115,15 +115,15 @@ interactions: content-type: - application/json date: - - Fri, 24 Sep 2021 19:10:30 GMT + - Wed, 29 Sep 2021 16:52:38 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update423f1009/versions/2?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update423f1009/versions/6?api-version=2020-09-01-preview schema-id: - - 06471c0b87b642b0b8db01fa7a03c788 + - 15ccba13dd0f4491aaebaa0d5d1c8269 schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/06471c0b87b642b0b8db01fa7a03c788?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/15ccba13dd0f4491aaebaa0d5d1c8269?api-version=2020-09-01-preview schema-version: - - '2' + - '6' schema-versions-location: - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update423f1009/versions?api-version=2020-09-01-preview serialization-type: diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/schemaregistry_preparer.py b/sdk/schemaregistry/azure-schemaregistry/tests/schemaregistry_preparer.py index 9847fb47964a..b14b923f482b 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/schemaregistry_preparer.py +++ b/sdk/schemaregistry/azure-schemaregistry/tests/schemaregistry_preparer.py @@ -30,10 +30,10 @@ ) -SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE_PARAM = "schemaregistry_fully_qualified_namespace" -SCHEMA_REGISTRY_GROUP_PARAM = "schemaregistry_group" -SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE_ENV_KEY_NAME = 'SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE' -SCHEMA_REGISTRY_GROUP_ENV_KEY_NAME = 'SCHEMA_REGISTRY_GROUP' +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE_PARAM = "schemaregistry_fully_qualified_namespace" +SCHEMAREGISTRY_GROUP_PARAM = "schemaregistry_group" +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE_ENV_KEY_NAME = 'SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE' +SCHEMAREGISTRY_GROUP_ENV_KEY_NAME = 'SCHEMAREGISTRY_GROUP' class SchemaRegistryNamespacePreparer(AzureMgmtPreparer): @@ -59,13 +59,13 @@ def create_resource(self, name, **kwargs): # TODO: right now the endpoint/group is fixed, as there is no way to create/delete resources using api, in the future we should be able to dynamically create and remove resources if self.is_live: return { - SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE_PARAM: os.environ[SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE_ENV_KEY_NAME], - SCHEMA_REGISTRY_GROUP_PARAM: os.environ[SCHEMA_REGISTRY_GROUP_ENV_KEY_NAME] + SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE_PARAM: os.environ[SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE_ENV_KEY_NAME], + SCHEMAREGISTRY_GROUP_PARAM: os.environ[SCHEMAREGISTRY_GROUP_ENV_KEY_NAME] } else: return { - SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE_PARAM: "sr-playground.servicebus.windows.net", - SCHEMA_REGISTRY_GROUP_PARAM: "azsdk_python_test_group" + SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE_PARAM: "sr-playground.servicebus.windows.net", + SCHEMAREGISTRY_GROUP_PARAM: "azsdk_python_test_group" } def remove_resource(self, name, **kwargs): diff --git a/sdk/schemaregistry/tests.yml b/sdk/schemaregistry/tests.yml index 0df2a454f686..b29323def858 100644 --- a/sdk/schemaregistry/tests.yml +++ b/sdk/schemaregistry/tests.yml @@ -13,8 +13,8 @@ stages: AZURE_TENANT_ID: $(python-schema-registry-sdk-test-tenant-id) AZURE_CLIENT_ID: $(python-schema-registry-sdk-test-client-id) AZURE_CLIENT_SECRET: $(python-schema-registry-sdk-test-client-secret) - SCHEMA_REGISTRY_ENDPOINT: $(python-schema-registry-sdk-test-endpoint) - SCHEMA_REGISTRY_GROUP: $(python-schema-registry-sdk-test-group) + SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE: $(python-schema-registry-sdk-test-endpoint) + SCHEMAREGISTRY_GROUP: $(python-schema-registry-sdk-test-group) AZURE_TEST_RUN_LIVE: 'true' MatrixFilters: - '"PythonVersion=^(?!pypy3).*"' diff --git a/shared_requirements.txt b/shared_requirements.txt index 7c661af6eaf2..3679fda7a354 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -128,6 +128,7 @@ isodate>=0.6.0 avro<2.0.0,>=1.10.0 pyjwt>=1.7.1 chardet<5,>=3.0.2 +backports.functools-lru-cache>=1.6.4 #override azure azure-keyvault~=1.0 #override azure-mgmt-core azure-core<2.0.0,>=1.15.0 #override azure-containerregistry azure-core>=1.4.0,<2.0.0