Skip to content

[Extension] Fix #34062: az extension add: Fix Windows dependency installation failures - #34140

Open
Aditya Pujara (a0x1ab) wants to merge 1 commit into
Azure:devfrom
a0x1ab:agent-assist/azure-azure-cli-issue-34062-e1de32abffe4
Open

Aditya Pujara (a0x1ab) wants to merge 1 commit into
Azure:devfrom
a0x1ab:agent-assist/azure-azure-cli-issue-34062-e1de32abffe4

Conversation

@a0x1ab

Copy link
Copy Markdown
Member

Related command

az extension add

Description

Fixes #34062.

Fix Windows dependency installation failures.

Testing Guide

  • Run az extension add.
  • Focused regression coverage: src/azure-cli-core/azure/cli/core/tests/test_extension_pip.py, src/azure-cli/azure/cli/command_modules/extension/tests/latest/test_extension_install.py.
  • Repository CI and the authorized live-test workflow validate the published revision.

History Notes

[Extension] az extension add: Fix Windows dependency installation failures


This checklist is used to make sure that common guidelines for a pull request are followed.

@x-engineering-agent x-engineering-agent Bot added the Request X Engineering Agent Request X Engineering Agent testing and review label Sep 28, 2026
@x-engineering-agent
x-engineering-agent Bot marked this pull request as ready for review September 28, 2026 15:42
@x-engineering-agent
x-engineering-agent Bot requested review from a team as code owners September 28, 2026 15:42
Copilot AI lite review requested due to automatic review settings September 28, 2026 15:42
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The x86 Windows/no-compatible-wheel source-build failure remains unresolved and needs regression coverage.

Review effort: Lite
Findings: None

What changed in this PR

This PR fixes Windows extension dependency installation by preferring binary wheels and adding regression coverage and documentation.

Changes:

  • Adds Windows-specific --prefer-binary pip behavior.
  • Adds offline tests for wheel selection, source builds, isolation, cleanup, and checksums.
  • Documents validation procedures and runtime limitations.
File Summary
src/​azure-cli/​azure/​cli/​command_modules/​extension/​tests/​latest/​test_extension_install.py Tests command-level extension installation behavior.
src/​azure-cli-core/​azure/​cli/​core/​tests/​test_extension_pip.py Adds pip installation regression coverage.
src/​azure-cli-core/​azure/​cli/​core/​tests/​extension_pip_test_utils.py Provides local package fixtures.
src/​azure-cli-core/​azure/​cli/​core/​extension/​operations.py Enables Windows binary-wheel preference.
doc/​extensions/​authoring.md Documents testing and validation guidance.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@a0x1ab

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@x-engineering-agent

This comment has been minimized.

x-engineering-agent[bot]

This comment was marked as outdated.

@x-engineering-agent x-engineering-agent Bot added the X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent label Sep 28, 2026
x-engineering-agent[bot]

This comment was marked as outdated.

@a0x1ab

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@x-engineering-agent

Copy link
Copy Markdown
Contributor

Live test results — azdev test --live --series (changed test files only)

✅ PASS

Selectors: extension.TestExtensionInstall (module)
PR head ref: agent-assist/azure-azure-cli-issue-34062-e1de32abffe4
PR head sha: 088d3144e4172e479e138655daef6652dcce6365
PR base ref: dev
New test files in PR: true

Changed test files run
src/azure-cli/azure/cli/command_modules/extension/tests/latest/test_extension_install.py

New test files
src/azure-cli/azure/cli/command_modules/extension/tests/latest/test_extension_install.py

Workflow run: https://github.com/Azure/issue-sentinel/actions/runs/36509229196

Last 80 lines of azdev output

=============
| Run Tests |
=============


test index found: /home/runner/.azdev/env_config/home/runner/work/issue-sentinel/issue-sentinel/.venv/test_index/latest.json

Test on modules: extension.TestExtensionInstall

WARNING: RUNNING TESTS LIVE
The tests are set to run against current profile "latest"
============================= test session starts ==============================
platform linux -- Python 3.12.14, pytest-9.1.1, pluggy-1.6.0 -- /home/runner/work/issue-sentinel/issue-sentinel/.venv/bin/python
cachedir: .pytest_cache
rootdir: /home/runner/work/issue-sentinel/issue-sentinel/azure-cli/src/azure-cli
plugins: platformdirs-4.12.1, forked-1.7.5, xdist-3.8.0
collecting ... collected 2 items

azure-cli/src/azure-cli/azure/cli/command_modules/extension/tests/latest/test_extension_install.py::TestExtensionInstall::test_indexed_install_rejects_bad_checksum_before_pip PASSED [ 50%]
azure-cli/src/azure-cli/azure/cli/command_modules/extension/tests/latest/test_extension_install.py::TestExtensionInstall::test_indexed_system_install_prefers_binary_and_forwards_options PASSED [100%]

- generated xml file: /home/runner/work/issue-sentinel/issue-sentinel/test-output/results.xml -
============================== 2 passed in 0.76s ===============================

Posted by the X Engineering Agent live-test workflow.

@x-engineering-agent x-engineering-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Aditya Pujara (@a0x1ab)

Review

The earlier upstream-CI failures are resolved for head 088d3144e4172e479e138655daef6652dcce6365. No actionable findings were confirmed in the Windows-only --prefer-binary change or its accompanying tests and documentation. Ready for maintainer review; this comment is not an approval.

Upstream CI

The current-head summary contains 53 passed, 0 failed and 0 pending checks. The latest completed check is newer than the previous failed-CI review, so this review supersedes that failure assessment.

Test validation

  • Live test: Passed. Workflow run
  • Regression coverage: Not applicable to the changed files.

Scope and regression evidence

The change adds --prefer-binary only to Windows extension installs; other platforms retain their existing pip arguments. Focused coverage is supplied in src/azure-cli-core/azure/cli/core/tests/test_extension_pip.py and src/azure-cli/azure/cli/command_modules/extension/tests/latest/test_extension_install.py, with a shared fixture helper. The PR's Testing Guide names these paths; it is a validation plan, not an additional reported execution result.

All seven repository review tools were considered, including the test-strength and scope-consistency review targets. No additional semantic finding was confirmed. The module-specific regression-gap and risk classifiers do not identify the changed core extension/operations.py file as command-module production code: their not-applicable/low-confidence results below should not be read as an absence of runtime change. Core/extension maintainers should review the Windows dependency-selection behavior.

Risk assessment

0/100 · Low · Low confidence

The Low rating reflects the detected change scope with no elevated security, reliability, customer, operational, dependency, sovereign-cloud, generated-output, or cross-component signal.

  • Change scope: 5 changed files, 564 changed lines (+564 / -0), including 0 production files.
  • Affected components: No production component was identified.
  • Risk drivers: No elevated risk signal was detected.
  • Regression evidence: No production-code regression-test signal applies.
  • Confidence: Low because no production changed-line evidence was available.
  • Required review: No additional owning-squad review signal was detected.

Posted by x-engineering-agent (Reviewer)

@x-engineering-agent x-engineering-agent Bot removed the Request X Engineering Agent Request X Engineering Agent testing and review label Sep 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Azure CLI k8s-extension Installation Fails Due to Missing maturin Dependency

4 participants