Skip to content
Merged
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
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,12 @@ jobs:
echo "== Testing pip install on Python 3.9 =="
docker run \
--rm -v $PYPI_FILES:/mnt/pypi python:3.9 \
/bin/bash -c "ls /mnt/pypi && pip install -f /mnt/pypi -q azure-cli==$CLI_VERSION.* && az self-test && az --version && sleep 5"
Copy link
Member

Choose a reason for hiding this comment

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

The test for Python 3.7 was removed by #27015.

.* was initially added by 4baa9d8 from #16362.

I made a test on the built artifact and noticed * is not expanded by the shell if no matching file exists:

$ curl https://artprodwus21.artifacts.visualstudio.com/A7b238909-6802-4b65-b90d-184bca47f458/5147fa83-336e-44ef-bbe0-c86b8ae86cbb/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2F6Y2xpdG9vbHMvcHJvamVjdElkLzUxNDdmYTgzLTMzNmUtNDRlZi1iYmUwLWM4NmI4YWU4NmNiYi9idWlsZElkLzgyNDg5L2FydGlmYWN0TmFtZS9weXBp0/content?format=zip -o pypi.zip
$ unzip pypi.zip
$ cd pypi
$ echo azure-*
azure-cli-2.51.0.post20230815081512.tar.gz azure-cli-core-2.51.0.post20230815081512.tar.gz azure-cli-telemetry-1.1.0.post20230815081512.tar.gz
$ CLI_VERSION=2.51.0
$ echo azure-cli==$CLI_VERSION.*
azure-cli==2.51.0.*

Since #27001, 2.50.0.post* on the local disk is not compatible with Python 3.7, so pip falls back to a compatible version 2.50.0 from PyPI.

/bin/bash -c "cd /mnt/pypi && ls && pip install --find-links ./ azure_cli-$CLI_VERSION*whl && az self-test && az --version && sleep 5"
Copy link
Member

@jiasli jiasli Aug 17, 2023

Choose a reason for hiding this comment

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

It'll be good practice to always make * match as little as possible:

Suggested change
/bin/bash -c "cd /mnt/pypi && ls && pip install --find-links ./ azure_cli-$CLI_VERSION*whl && az self-test && az --version && sleep 5"
/bin/bash -c "cd /mnt/pypi && ls && pip install --find-links ./ azure_cli-*-py3-none-any.whl && az self-test && az --version && sleep 5"


echo "== Testing pip install on Python 3.10 =="
docker run \
--rm -v $PYPI_FILES:/mnt/pypi python:3.10 \
/bin/bash -c "ls /mnt/pypi && pip install -f /mnt/pypi -q azure-cli==$CLI_VERSION.* && az self-test && az --version && sleep 5"
/bin/bash -c "cd /mnt/pypi && ls && pip install --find-links ./ azure_cli-$CLI_VERSION*whl && az self-test && az --version && sleep 5"

displayName: 'Test pip Install'

Expand Down