From f76f0c7f0624cea7d0d5b21252eaeddcf99bd83c Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Tue, 22 Sep 2020 12:22:09 -0700 Subject: [PATCH] Resolve Failing SchemaRegistry Regressions (#13817) * make the wheel retrieval a little bit more forgiving * add 1.0.0b1 to the omission * update version exclusion --- scripts/devops_tasks/common_tasks.py | 11 +++++++---- scripts/devops_tasks/git_helper.py | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/devops_tasks/common_tasks.py b/scripts/devops_tasks/common_tasks.py index 5c3ed4ca9fe0..6a9c2eabd014 100644 --- a/scripts/devops_tasks/common_tasks.py +++ b/scripts/devops_tasks/common_tasks.py @@ -27,6 +27,7 @@ # this assumes the presence of "packaging" from packaging.specifiers import SpecifierSet from packaging.version import Version +from packaging.version import parse DEV_REQ_FILE = "dev_requirements.txt" @@ -340,13 +341,15 @@ def find_whl(package_name, version, whl_directory): logging.error("Whl directory is incorrect") exit(1) - logging.info("Searching whl for package {}".format(package_name)) - whl_name = "{0}-{1}*.whl".format(package_name.replace("-", "_"), version) + parsed_version = parse(version) + + logging.info("Searching whl for package {0}-{1}".format(package_name, parsed_version.base_version)) + whl_name = "{0}-{1}*.whl".format(package_name.replace("-", "_"), parsed_version.base_version) paths = glob.glob(os.path.join(whl_directory, whl_name)) if not paths: logging.error( - "whl is not found in whl directory {0} for package {1}".format( - whl_directory, package_name + "whl is not found in whl directory {0} for package {1}-{2}".format( + whl_directory, package_name, parsed_version.base_version ) ) exit(1) diff --git a/scripts/devops_tasks/git_helper.py b/scripts/devops_tasks/git_helper.py index 7a613a6f0fa9..f1aa54472a52 100644 --- a/scripts/devops_tasks/git_helper.py +++ b/scripts/devops_tasks/git_helper.py @@ -23,6 +23,7 @@ 'azure-cosmos': '3.2.0', 'azure-servicebus': '0.50.3', 'azure-eventgrid': '1.3.0', + 'azure-schemaregistry-avroserializer': '1.0.0b1' } # This method identifies release tag for latest or oldest released version of a given package