{Extension} Report experimental status in extension listings#33483
Closed
rohan-patnaik wants to merge 1 commit into
Closed
{Extension} Report experimental status in extension listings#33483rohan-patnaik wants to merge 1 commit into
rohan-patnaik wants to merge 1 commit into
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
Contributor
|
Thank you for your contribution @rohan-patnaik! We will review the pull request and get back to you soon. |
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates extension listing/versioning output to correctly surface an extension’s experimental status from index metadata, and adjusts/extends tests accordingly.
Changes:
- Add
is_experimental_from_extension_meta()helper to read experimental status from extension metadata. - Populate
experimentalinlist_available_extensions()andlist_versions()using the new helper instead of hardcodingFalse. - Update existing test expectations and add a new test to validate experimental status across versions.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/azure-cli-core/azure/cli/core/tests/test_extension.py | Updates an assertion to expect experimental extensions to be reported as experimental. |
| src/azure-cli-core/azure/cli/core/extension/tests/latest/test_extension_commands.py | Imports list_versions and adds a test to ensure experimental status is preserved per-version. |
| src/azure-cli-core/azure/cli/core/extension/operations.py | Uses metadata-driven experimental detection for list outputs. |
| src/azure-cli-core/azure/cli/core/extension/init.py | Introduces is_experimental_from_extension_meta() helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
Extension |
Member
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Member
|
@rohan-patnaik thanks for your contribution! but we intend to depreacate "experimental", keep "stable" and "preview" only. |
Author
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #32871
Summary
This updates extension listing output so the
experimentalfield reflectsazext.isExperimentalmetadata instead of always returningfalse.Why
az extension list-availableandaz extension list-versionsalready expose anexperimentalfield, but both paths hard-coded it tofalse. Extensions such ascli-translatorcan therefore be marked experimental in metadata and documentation while the CLI reports them as non-experimental.Changes
is_experimental_from_extension_metabeside the existing preview metadata helper.list_available_extensionsandlist_versions.azext.isExperimentalmetadata is preserved in command output.Validation
.venv/bin/python -m pytest src/azure-cli-core/azure/cli/core/extension/tests/latest/test_extension_commands.py::TestExtensionCommands::test_list_available_extensions_no_show_details src/azure-cli-core/azure/cli/core/extension/tests/latest/test_extension_commands.py::TestExtensionCommands::test_list_versions_preserves_experimental_status -q.venv/bin/python -m pytest src/azure-cli-core/azure/cli/core/tests/test_extension.py::TestExtensions::test_list_available_extensions_preview_details -qgit diff --check