Skip to content
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 .azure-pipelines/templates/azdev_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ steps:
python -m venv env
chmod +x env/bin/activate
. env/bin/activate

python -m pip install -U pip
pip install azdev==0.1.29
azdev --version

Expand Down
2 changes: 1 addition & 1 deletion build_scripts/windows/scripts/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ for /d /r %BUILDING_DIR%\Lib\site-packages\azure\mgmt %%d in (aio) do (
:: Remove dist-info
echo remove dist-info
pushd %BUILDING_DIR%\Lib\site-packages
for /d %%d in ("*.dist-info") do (
for /d %%d in ("azure*.dist-info") do (
if exist %%d rmdir /s /q "%%d"
)
popd
Expand Down
12 changes: 6 additions & 6 deletions scripts/ci/test_extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ for ext in $output; do
fi
done

az self-test --debug
if [ $? != 0 ]
then
exit_code=1
echo "Failed to verify:" $ext
fi
#az self-test --debug
#if [ $? != 0 ]
#then
# exit_code=1
# echo "Failed to verify:" $ext
#fi
Comment on lines +39 to +44
Copy link
Member Author

Choose a reason for hiding this comment

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

Comment az self-test as it cannot pass on ADO. The issue is caused by extensions azure-iot and arcappliance both have jsonschema dependency but with different versions. On ADO, azure-iot is now always installed before arcappliance (the install order is decided by os.listdir(ext_dir) which is related to the order of how files are stored in the file system). Their directory are both appended to sys.path, and azure-iot is in front of arcappliance. Therefore, in arcappliance, when importing jsonschema, it will import from the one (version 3.0.2) installed in azure-iot and this line of code caused an import issue: __version__ = get_distribution(__name__).version.

If on some system, arcappliance is installed before azure-iot, no error will be thrown as arcappliance uses jsonschema version 3.2.0 and the code to get version changes to __version__ = metadata.version("jsonschema").

Actually, az self-test should not load all extensions together, sys.path will append all extension directories, and causing issues like above for the same dependency but with different versions in different extensions.

Copy link
Member

Choose a reason for hiding this comment

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

The issue is caused by extensions azure-iot and arcappliance both have jsonschema dependency but with different versions.

Yes, azure-iot/jsonschema (3.0.2) overriding arcappliance/jsonschema (3.2.0) is an important contributing factor. I provided more detail at #17456

Actually, az self-test should not load all extensions together

It is possible for CLI to load multiple extensions at the same time - when command index has not been built yet.


exit $exit_code