Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pin Minimum Deps in min-dependency tests, Hotfix SDK-Tools for backwards compat #14069

Merged
merged 7 commits into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/tox/install_depend_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
logging.getLogger().setLevel(logging.INFO)

MINIMUM_VERSION_SUPPORTED_OVERRIDE = {
'azure-common': '1.1.10',
'azure-common': '1.1.10'
}

def install_dependent_packages(setup_py_file_path, dependency_type, temp_dir):
Expand Down
9 changes: 7 additions & 2 deletions eng/tox/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ envlist = whl,sdist
[tools]
deps =
-r ../../../eng/test_tools.txt


[coverage:paths]
source =
Expand All @@ -20,6 +20,7 @@ deps =
{[tools]deps}



[packaging]
pkgs =
wheel==0.34.2
Expand Down Expand Up @@ -215,7 +216,11 @@ commands =
[testenv:mindependency]
pre-deps =
{[packaging]pkgs}
deps = {[tools]deps}
deps =
azure-mgmt-keyvault<7.0.0
azure-mgmt-resource<15.0.0
azure-mgmt-storage<15.0.0
{[tools]deps}
changedir = {toxinidir}
passenv = *
setenv =
Expand Down
15 changes: 15 additions & 0 deletions scripts/devops_tasks/common_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,21 @@ def filter_dev_requirements(pkg_root_path, packages_to_exclude, dest_dir):

return new_dev_req_path

def extend_dev_requirements(dev_req_path, packages_to_include):
requirements = []
with open(dev_req_path, "r") as dev_req_file:
requirements = dev_req_file.readlines()

# include any package given in included list. omit duplicate
for requirement in packages_to_include:
if requirement not in requirements:
requirements.append(requirement)

logging.info("Extending dev requirements. New result:: {}".format(requirements))
# create new dev requirements file with different name for filtered requirements
with open(dev_req_path, "w") as dev_req_file:
dev_req_file.writelines(requirements)

def is_required_version_on_pypi(package_name, spec):
from pypi_tools.pypi import PyPIClient
client = PyPIClient()
Expand Down
1 change: 0 additions & 1 deletion scripts/devops_tasks/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

logging.getLogger().setLevel(logging.INFO)


class CustomVirtualEnv:
def __init__(self, path):
self.path = os.path.join(path, VENV_NAME)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
../../core/azure-core
-e ../../../tools/azure-devtools
-e ../../../tools/azure-sdk-tools
-e ../../identity/azure-identity
aiohttp>=3.0; python_version >= '3.5'
aiodns>=2.0; python_version >= '3.5'
Expand Down
10 changes: 8 additions & 2 deletions tools/azure-sdk-tools/devtools_testutils/keyvault_preparer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@
StoragePermissions,
Permissions,
Sku,
SkuFamily,
SkuName,
AccessPolicyEntry,
VaultProperties,
VaultCreateOrUpdateParameters,
)

try:
from azure.mgmt.keyvault.models import (
SkuFamily
)
except ImportError:
pass

from azure_devtools.scenario_tests.exceptions import(
AzureTestError, NameInUseError, ReservedResourceNameError
)
Expand Down Expand Up @@ -88,7 +94,7 @@ def create_resource(self, name, **kwargs):
]
properties = VaultProperties(
tenant_id=self.test_class_instance.get_settings_value("TENANT_ID"),
sku=Sku(name=self.sku, family=SkuFamily.A),
sku=Sku(name=self.sku, family=SkuFamily.A) if SkuFamily else Sku(name=self.sku),
access_policies=access_policies,
vault_uri=None,
enabled_for_deployment=self.enabled_for_deployment,
Expand Down