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 Regression Failures #16455

Merged
merged 5 commits into from
Feb 1, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ build/

# Test results
TestResults/
ENV_DIR/

# tox generated artifacts
test-junit-*.xml
Expand Down
5 changes: 3 additions & 2 deletions build_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import argparse
import os
import glob
import sys
from subprocess import check_call


Expand All @@ -19,8 +20,8 @@ def create_package(name, dest_folder=DEFAULT_DEST_FOLDER):
absdirs = [os.path.dirname(package) for package in (glob.glob('{}/setup.py'.format(name)) + glob.glob('sdk/*/{}/setup.py'.format(name)))]

absdirpath = os.path.abspath(absdirs[0])
check_call(['python', 'setup.py', 'bdist_wheel', '-d', dest_folder], cwd=absdirpath)
check_call(['python', 'setup.py', "sdist", "--format", "zip", '-d', dest_folder], cwd=absdirpath)
check_call([sys.executable, 'setup.py', 'bdist_wheel', '-d', dest_folder], cwd=absdirpath)
check_call([sys.executable, 'setup.py', "sdist", "--format", "zip", '-d', dest_folder], cwd=absdirpath)


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion scripts/devops_tasks/build_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def build_packages(targeted_packages, distribution_directory, is_dev_build=False
print("Generating Package Using Python {}".format(sys.version))
run_check_call(
[
"python",
sys.executable,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discovered when running locally that python calling python doesn't nest properly unless you're using system PATH updates like how the VSAgents do them.

Using sys.executable is the proper way to ensure that you're always in the same environment.

build_packing_script_location,
"--dest",
distribution_directory,
Expand Down
6 changes: 5 additions & 1 deletion scripts/devops_tasks/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def _install_packages(self, dependent_pkg_path, pkg_to_exclude):
working_dir = self.context.package_root_path
temp_dir = self.context.temp_path

list_to_exclude = [pkg_to_exclude,]
list_to_exclude = [pkg_to_exclude, 'azure-sdk-tools', ]
installed_pkgs = [p.split('==')[0] for p in get_installed_packages(self.context.venv.lib_paths) if p.startswith('azure-')]
logging.info("Installed azure sdk packages:{}".format(installed_pkgs))

Expand Down Expand Up @@ -253,6 +253,10 @@ def _install_packages(self, dependent_pkg_path, pkg_to_exclude):
logging.info("Not extending dev requirements {} {}".format(filtered_dev_req_path, self.context.is_latest_depend_test))

if filtered_dev_req_path:
logging.info("Extending dev requirement to include azure-sdk-tools")
extend_dev_requirements(
filtered_dev_req_path, ["../../../tools/azure-sdk-tools"]
)
logging.info(
"Installing filtered dev requirements from {}".format(filtered_dev_req_path)
)
Expand Down