Skip to content

CI: azdev extension add silently no-ops (azdev 0.2.12) — fails Integration Tests / linter / style for all PRs #10074

Description

@FumingZhang

Describe the bug

The CI pipeline (azclitools/public) is red for every PR that modifies any extension, regardless of the change. The Integration Tests, Build Tests (Python 3.10–3.14), azdev linter, and azdev style jobs all fail because azdev extension add <ext> has become a silent no-op: it prints Adding extension '…', exits 0, but never actually registers/installs the extension. az extension list afterwards still shows only azure-devops, and azdev's discovery reports an empty Extensions: set. As a result:

  • azdev test finds no tests ('azext_<ext>' not found. If newly added, re-run with --discover), and
  • the follow-up azdev extension remove <ext> fails with extension(s) not installed: <ext> (exit 1), failing the job.

Reproduces on unrelated modules, so it is not caused by any PR's code:

Both fail identically, at the same log line numbers.

Related command

azdev extension add, azdev test, azdev extension remove (run by scripts/ci/test_source.py)

Errors

Adding extension '/mnt/vss/_work/1/s/src/image-gallery'...
...
Extensions:                                            <- azdev sees ZERO extensions
Test on modules: azext_image_gallery
WARNING: 'azext_image_gallery' not found. If newly added, re-run with --discover
WARNING: No tests selected to run.
ERROR: extension(s) not installed: image-gallery
Traceback (most recent call last):
  File ".../scripts/ci/test_source.py", line 87, in test_extension
    run_command(cmd, check_return_code=True)
subprocess.CalledProcessError: Command '['azdev', 'extension', 'remove', 'image-gallery']' returned non-zero exit status 1.

Issue script & Debug output

Failing step logs:

azdev setup builds the toolchain fresh each run:

git clone -q --single-branch -b dev https://github.com/Azure/azure-cli.git ../azure-cli
Successfully installed azure-cli-core-2.88.0
pip install --upgrade "azdev==0.2.12"

Expected behavior

azdev extension add <ext> installs/registers the extension so that azdev test can discover and run its tests and azdev extension remove <ext> succeeds — i.e. Integration Tests / linter / style pass for PRs that only modify extension code.

Environment Summary

azure-cli                         2.88.0
core                              2.88.0
azdev                             0.2.12
Extensions directory              /opt/az/azcliextensions
Development extension sources     /mnt/vss/_work/1/s
Python (Linux) 3.10.19

Additional context

Likely root cause: azdev==0.2.12 (released 2026-07-03, 3 days before these failures). The pipeline pins azdev==0.2.12, and that version's only changelog entry touches the exact command that's failing:

0.2.12 — Editable installs (azdev setup, azdev extension add, code generation) now pass --no-build-isolation so wheels build against the environment's pinned setuptools instead of an isolated PEP 517 build environment. This fixes editable-install failures introduced by the setuptools pinning.

So azdev extension add's editable-install path changed in 0.2.12 (now --no-build-isolation), which lines up exactly with the "prints Adding extension '…', exits 0, but never registers the extension" behavior. The previous released version (0.2.10; 0.2.11 was skipped on PyPI) did not touch this path. az --version reports azure-cli-core 2.88.0, so the CLI core itself looks fine — the regression aligns with the azdev bump rather than the azure-cli dev branch.

PyPI: https://pypi.org/project/azdev/0.2.12/ (uploaded 2026-07-03)

Suggested next steps:

  • Temporarily pin the pipeline back to azdev==0.2.10 to confirm/mitigate.
  • Investigate whether --no-build-isolation in azdev extension add silently fails the editable build (e.g. missing build backend / setuptools mismatch) and swallows the error (exit 0 despite no install).

Activity

  1. added
    bugThis issue requires a change to an existing behavior in the product in order to be resolved.
    on Jul 6, 2026
  2. changed the title [-]CI: `azdev extension add` silently no-ops on azure-cli dev 2.88.0 — fails Integration Tests / linter / style for all PRs[/-] [+]CI: `azdev extension add` silently no-ops (azdev 0.2.12) — fails Integration Tests / linter / style for all PRs[/+] on Jul 6, 2026
  3. yonzhan commented on Jul 6, 2026

    @yonzhan
    Collaborator

    CI

  4. aryasadeghi1 commented on Jul 6, 2026

    @aryasadeghi1
    Member

    Previously --no-build-isolation fixed the issue of requiring setuptools before while installing azdev which caused error as it could not exist (azdev installs it during the setup). Moreover, azdev extension add runs pip install -e <ext> --config-settings editable_mode=compat --no-build-isolation.

    That command exits 0 and the extension is importable, but it no longer leaves a *.egg-info in the extension source tree. azdev discovers dev extensions by globbing *.egg-info under the repo (_get_installed_dev_extensions), so it sees zero extensions, and the follow-up azdev extension remove fails with extension(s) not installed. Nothing errors during the install, which is why it slipped through.

    But why?
    the *.egg-info in source was never an install artifact, it was a side effect of build isolation. This would only effect on azure-cli-extension and not azure-cli

    The fix would be to ensure .egg-info exist by using setup command.

  5. aryasadeghi1 commented on Jul 7, 2026

    @aryasadeghi1
    Member

    Hello FumingZhang, could you please confirm that the new commit fixes the issue?
    Thank you!

  6. FumingZhang commented on Jul 7, 2026

    @FumingZhang
    MemberAuthor

    I’ve re-queued the CI checks for #10071. Let's watch whether it goes through this time.

  7. added this to the Backlog milestone on Jul 7, 2026
  8. aryasadeghi1 commented on Jul 7, 2026

    @aryasadeghi1
    Member

    The issue seems to be resolved and the CI succeeded, are you happy for me to close this?

  9. FumingZhang commented on Jul 8, 2026

    @FumingZhang
    MemberAuthor

    It looks like the azdev fix is working, but the CI runs in github action are still failing. Could you help sort those out as well?

  10. aryasadeghi1 commented on Jul 8, 2026

    @aryasadeghi1
    Member

    that should be fixed!

  11. FumingZhang commented on Jul 8, 2026

    @FumingZhang
    MemberAuthor

    cool, I've re-queued the CI for my PR. If all CI checks pass, I think we can close this issue. Thanks again for the fix.

  12. aryasadeghi1 commented on Jul 8, 2026

    @aryasadeghi1
    Member

    No worries FumingZhang, keep me posted! Thank you

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

Metadata

Metadata

Labels

Azure CLI TeamThe command of the issue is owned by Azure CLI teambugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions