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

Resolve 409 Integration Failures #19868

Merged
merged 1 commit into from
Jul 20, 2021
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/sanitize_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def process_requires(setup_py_path):
requires = [
Requirement.parse(r)
for r in get_install_requires(setup_py_path)
if r.startswith("azure") and "-nspkg" not in r
if r.startswith("azure")
]
# Find package requirements that are not available on PyPI
requirement_to_update = {}
Expand Down
2 changes: 1 addition & 1 deletion eng/versioning/version_increment.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def increment_version(old_version):

package_name = args.package_name.replace('_', '-')

packages = get_packages(args, package_name)
packages = get_packages(args, package_name, additional_excludes = ["mgmt", "-nspkg"])

package_map = { pkg[1][0]: pkg for pkg in packages }

Expand Down
12 changes: 6 additions & 6 deletions eng/versioning/version_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@

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

def path_excluded(path):
return "-nspkg" in path or "tests" in path or "mgmt" in path or is_metapackage(path)
def path_excluded(path, additional_excludes):
return any([excl in path for excl in additional_excludes]) or "tests" in path or is_metapackage(path)

# Metapackages do not have an 'azure' folder within them
def is_metapackage(package_path):
Expand All @@ -44,13 +44,13 @@ def is_metapackage(package_path):
azure_path = path.join(dir_path, 'azure')
return not path.exists(azure_path)

def get_setup_py_paths(glob_string, base_path):
def get_setup_py_paths(glob_string, base_path, additional_excludes):
setup_paths = process_glob_string(glob_string, base_path)
filtered_paths = [path.join(p, 'setup.py') for p in setup_paths if not path_excluded(p)]
filtered_paths = [path.join(p, 'setup.py') for p in setup_paths if not path_excluded(p, additional_excludes)]
return filtered_paths


def get_packages(args, package_name = ""):
def get_packages(args, package_name = "", additional_excludes = []):
# This function returns list of path to setup.py and setup info like install requires, version for all packages discovered using glob
# Followiong are the list of arguements expected and parsed by this method
# service, glob_string
Expand All @@ -59,7 +59,7 @@ def get_packages(args, package_name = ""):
else:
target_dir = root_dir

paths = get_setup_py_paths(args.glob_string, target_dir)
paths = get_setup_py_paths(args.glob_string, target_dir, additional_excludes)

# Check if package is excluded if a package name param is passed
if package_name and not any(filter(lambda x: package_name == os.path.basename(os.path.dirname(x)), paths)):
Expand Down