Skip to content

Commit 47e4964

Browse files
authored
{CI} Fix update-index wheel filename and switch CI to azdev 0.2.12 (#10039)
Download the wheel with its real .whl name so pkginfo can read the metadata, and install the released azdev 0.2.12 from PyPI instead of the pinned git SHA.
1 parent eea73f3 commit 47e4964

4 files changed

Lines changed: 9 additions & 12 deletions

File tree

.azure-pipelines/templates/azdev_setup.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,9 @@ steps:
1111
python -m venv env
1212
chmod +x env/bin/activate
1313
source ./env/bin/activate
14-
# clone azure-cli
1514
git clone -q --single-branch -b dev https://github.com/Azure/azure-cli.git ../azure-cli
1615
python -m pip install -U pip
17-
# azdev 0.2.11b1 (decouples extension metadata from wheel==0.30.0) tho it is not on PyPI yet.
18-
# Pinned to a specific azure-cli-dev-tools commit (not @dev) for reproducible builds
19-
# until the pre-release is published; then switch this back to:
20-
# pip install --upgrade "azdev==0.2.11b1"
21-
pip install --upgrade "git+https://github.com/Azure/azure-cli-dev-tools.git@49390f30c6a822620d2fbdf88889c4445d22666f#egg=azdev"
16+
pip install --upgrade "azdev==0.2.12"
2217
azdev --version
2318
azdev setup -c $CLI_REPO_PATH -r $CLI_EXT_REPO_PATH --debug
2419
pip list -v

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This checklist is used to make sure that common guidelines for a pull request ar
99
### General Guidelines
1010

1111
- [ ] Have you run `azdev style <YOUR_EXT>` locally? (`pip install azdev` required)
12-
- [ ] Have you run `python scripts/ci/test_index.py -q` locally? (`azdev` required; see `.azure-pipelines/templates/azdev_setup.yml` for the install command until `azdev==0.2.11b1` is on PyPI)
12+
- [ ] Have you run `python scripts/ci/test_index.py -q` locally? (`pip install azdev` required)
1313
- [ ] My extension version conforms to the [Extension version schema](https://github.com/Azure/azure-cli/blob/release/doc/extensions/versioning_guidelines.md)
1414

1515
For new extensions:

azure-pipelines.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,8 @@ jobs:
8080
#!/usr/bin/env bash
8181
set -ev
8282
# test_index.py imports scripts/ci/util.py, which reads wheel metadata via azdev's
83-
# pkginfo-based metadata module (decoupled from wheel==0.30.0), so azdev must be
84-
# installed here. Install from the merged azure-cli-dev-tools source until azdev
85-
# 0.2.11b1 is published to PyPI, then switch this to: pip install --upgrade "azdev==0.2.11b1"
86-
pip install --upgrade "git+https://github.com/Azure/azure-cli-dev-tools.git@49390f30c6a822620d2fbdf88889c4445d22666f#egg=azdev"
83+
# pkginfo-based metadata module (decoupled from wheel==0.30.0), so azdev must be installed here.
84+
pip install --upgrade "azdev==0.2.12"
8785
pip install requests packaging setuptools
8886
export CI="ADO"
8987
python ./scripts/ci/test_index.py -v

scripts/ci/update_index.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ def main():
4343
ext_dir = tempfile.mkdtemp(dir=extensions_dir)
4444
whl_cache_dir = tempfile.mkdtemp()
4545
whl_cache = {}
46-
ext_file = get_whl_from_url(whl_path, extension_name, whl_cache_dir, whl_cache)
46+
# Download to the real wheel filename (ending in .whl): get_ext_metadata now
47+
# reads metadata via pkginfo, which requires a .whl-named file. Passing the
48+
# extension name (e.g. "ssh") produced an extension-less temp file that
49+
# pkginfo rejects with "Not a known wheel archive format".
50+
ext_file = get_whl_from_url(whl_path, whl_path.split('/')[-1], whl_cache_dir, whl_cache)
4751

4852
with open('./src/index.json', 'r') as infile:
4953
curr_index = json.loads(infile.read())

0 commit comments

Comments
 (0)