Skip to content

Conversation

@DhritiJindal27
Copy link
Contributor

Description

This PR removes the preview flag from the pscloud extension, marking it as stable version 1.0.0.

Changes Made

  • Set azext.isPreview to false in azext_metadata.json
  • Extension is now marked as stable instead of preview
  • Users no longer need the --allow-preview flag to install the extension

Files Modified

  • src/pscloud/azext_pscloud/azext_metadata.json

Testing

  • Extension metadata correctly reflects stable status
  • Version is set to 1.0.0 in setup.py (already configured)

Related Changes

This PR works in conjunction with the AAZ repository changes to completely remove preview status from the extension.

- Rename -n and --name
- Add --zone and -z
- Flatten --vnet-injection.
- Remove unsupported identity options (--system-assigned, --user-assigned)
- Make required parameters mandatory with client-side validation
  - --zone, --provisioned-bandwidth, --reservation-id
  - --subnet-id, --vnet-id
- Remove wait subcommand for consistency with other Azure CLIs
- Update examples to show cleaner syntax with individual flags
- Updated version from 1.0.0b1 to stable 1.0.0 with dual version management
- Removed preview flags from all commands and command groups
- Fixed parameter consistency across commands (--name/-n standardization)
- Updated README documentation to reflect all parameter changes and stable version
- Added version management with separate STABLE_VERSION and PREVIEW_VERSION variables
- Changed test_pscloud_storagepool_create to use 'dhritijindal' to match VCR recording
- Ensured test_pscloud_storagepool_delete uses 'dhritijindal123' to match its VCR recording
- All 6 tests now pass successfully
- Set azext.isPreview to false in azext_metadata.json
- Extension is now marked as stable instead of preview
- Users no longer need --allow-preview flag to install
Copilot AI review requested due to automatic review settings January 7, 2026 15:38
@azure-client-tools-bot-prd
Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 7, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link

github-actions bot commented Jan 7, 2026

Hi @DhritiJindal27

Release Suggestions

Module: pscloud

  • Update VERSION to 1.0.1b1 in src/pscloud/setup.py
  • Set azext.isPreview to true in azext_metadata.json for pscloud

Notes

@DhritiJindal27
Copy link
Contributor Author

Closing this PR as it contains more changes than needed. Creating a cleaner PR with only the preview flag removal.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR transitions the pscloud Azure CLI extension from preview (1.0.0b1) to stable version 1.0.0. The changes include removing the preview flag from extension metadata, eliminating is_preview decorators from all command definitions, and updating test files and documentation to reflect the stable status. Additionally, the PR includes significant API improvements: removal of unsupported identity parameters, removal of the wait command, simplified parameter names (e.g., --zone instead of --availability-zone), and flattened network configuration parameters.

Key Changes:

  • Extension metadata updated to mark as stable (no longer requires --allow-preview flag)
  • Version management in setup.py now uses explicit STABLE_VERSION and PREVIEW_VERSION constants
  • Removed is_preview=True from all command decorators across the codebase
  • Significant API improvements including parameter simplification and removal of unsupported features

Reviewed changes

Copilot reviewed 20 out of 23 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
azext_metadata.json Changed isPreview flag from true to false
setup.py Added version constants for stable (1.0.0) and preview (1.0.0b1) versions
test_pscloud.py Updated test commands with new parameter syntax and resource references
test recordings (YAML files) Updated with new test execution data and timestamps
_create.py, _update.py Removed identity parameters and simplified network configuration
_get_health_status.py, _get_avs_status.py Removed preview flags and standardized parameter names
_wait.py Entire file deleted (wait command removed)
__cmd_group.py files Removed preview flags from command group decorators
_show.py, _list.py, _delete.py Removed preview flags
init.py Removed wait command import
README.md Comprehensive documentation updates with new parameter syntax and examples
HISTORY.rst Added 1.0.0 release entry

"""Test pscloud pool create command"""
# Create storagepool command with proper JSON quoting for vnet-injection
create_storagepool_cmd = """az pscloud pool create --resource-group aaa --storage-pool-name cliTestSPCUS --location "Central US" --availability-zone "1" --vnet-injection '{{"subnet-id":"/subscriptions/3490e0a3-59fd-4ed4-baed-873d4e401b99/resourceGroups/pure-cli-testing-vnet/providers/Microsoft.Network/virtualNetworks/pure-cli-vnet/subnets/delg-subnet","vnet-id":"/subscriptions/3490e0a3-59fd-4ed4-baed-873d4e401b99/resourceGroups/pure-cli-testing-vnet/providers/Microsoft.Network/virtualNetworks/pure-cli-vnet"}}' --provisioned-bandwidth 992 --reservation-id "/subscriptions/3490e0a3-59fd-4ed4-baed-873d4e401b99/resourceGroups/aaa/providers/PureStorage.Block/reservations/cliTestReservationCUS" --system-assigned --debug"""
create_storagepool_cmd = """az pscloud pool create --resource-group abc --storage-pool-name dhritijindal --location "Central US" -z "1" --subnet-name "/subscriptions/834be33e-67e6-45ed-a454-c25a34cdec1f/resourceGroups/abc/providers/Microsoft.Network/virtualNetworks/cli-pure-vnet/subnets/delgSubnet" --vnet-name "/subscriptions/834be33e-67e6-45ed-a454-c25a34cdec1f/resourceGroups/abc/providers/Microsoft.Network/virtualNetworks/cli-pure-vnet" --provisioned-bandwidth 992 --reservation-id "/subscriptions/834be33e-67e6-45ed-a454-c25a34cdec1f/resourceGroups/abc/providers/PureStorage.Block/reservations/cli-test-reserv" --debug"""
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The test commands contain hardcoded subscription IDs, resource group names, and resource names that appear to be real Azure resources (e.g., "834be33e-67e6-45ed-a454-c25a34cdec1f", "abc", "dhritijindal"). These should be replaced with placeholders or mock data to avoid exposing potentially sensitive information. Azure CLI tests typically use generated UUIDs or generic placeholder values to ensure tests can run in any environment without exposing real resource identifiers.

Copilot uses AI. Check for mistakes.
# Test deleting a storage pool
self.cmd(
"az pscloud pool delete --resource-group aaa --storage-pool-name cliTestSPCUS --yes"
"az pscloud pool delete --resource-group abc --storage-pool-name dhritijindal123 --yes"
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The test_pscloud_storagepool_delete function uses a different storage pool name ("dhritijindal123") than the other tests ("dhritijindal"). This inconsistency could cause the test to fail if the resource doesn't exist, or it may be attempting to delete a different resource than the one created/used in other tests. Ensure all test methods reference the same resource name for consistency, or clearly document why different names are used.

Suggested change
"az pscloud pool delete --resource-group abc --storage-pool-name dhritijindal123 --yes"
"az pscloud pool delete --resource-group abc --storage-pool-name dhritijindal --yes"

Copilot uses AI. Check for mistakes.
# 1. Test storagepool show
self.cmd(
"az pscloud pool show --resource-group 06June2025 --storage-pool-name mochauhan-bug255",
"az pscloud pool show --resource-group abc --storage-pool-name dhritijindal",
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The hardcoded subscription ID "834be33e-67e6-45ed-a454-c25a34cdec1f" in the test appears to be a real Azure subscription identifier. Test recordings should use sanitized or mock subscription IDs (typically "00000000-0000-0000-0000-000000000000" in Azure CLI test recordings) to avoid exposing actual subscription identifiers. This applies to all resource IDs in the test command strings.

Copilot uses AI. Check for mistakes.

1.0.0
+++++
* Stable release.
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The release notes for version 1.0.0 are too generic ("Stable release"). Given the significant changes in this PR (removal of identity parameters, removal of wait command, parameter name changes, flattened network parameters), the release notes should document these breaking changes and improvements more explicitly. Users upgrading from 1.0.0b1 need to know what has changed, especially any breaking changes to command syntax.

Suggested change
* Stable release.
* First stable (GA) release.
* Breaking change: Removed identity-related parameters from commands that previously accepted `--identity` or similar options.
* Breaking change: Removed the `wait` command; scripts relying on it must be updated to use alternative polling or waiting mechanisms.
* Breaking change: Renamed several parameters to align with current Azure conventions; existing scripts may need to update parameter names.
* Improvement: Flattened network-related parameters (for example, virtual network and subnet settings) to simplify command syntax and reduce nesting.

Copilot uses AI. Check for mistakes.
@@ -1,4 +1,4 @@
{
"azext.isPreview": true,
"azext.isPreview": false,
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The PR description states "Extension metadata correctly reflects stable status" and "Version is set to 1.0.0 in setup.py (already configured)", but this PR actually includes significant breaking changes beyond just removing the preview flag. These include removal of identity parameters (--system-assigned, --user-assigned), removal of the wait command, parameter name changes (--availability-zone to --zone, --vnet-injection to --subnet-name/--vnet-name), and changes to required parameters. These breaking changes should be prominently documented in the PR description to ensure reviewers and users are aware of the migration path from 1.0.0b1 to 1.0.0.

Copilot uses AI. Check for mistakes.
"az pscloud pool delete --resource-group aaa --storage-pool-name cliTestSPCUS --yes"
"az pscloud pool delete --resource-group abc --storage-pool-name dhritijindal123 --yes"
)
pass
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

There is an unnecessary pass statement at the end of the PscloudScenario class. This statement serves no purpose and should be removed for code cleanliness.

Suggested change
pass

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants