Skip to content

feat(workload-orchestration): add unstage command for solution versions#9610

Merged
necusjz merged 7 commits intoAzure:mainfrom
manaswita-chichili:tyerunkar/unstaging-cli
Feb 26, 2026
Merged

feat(workload-orchestration): add unstage command for solution versions#9610
necusjz merged 7 commits intoAzure:mainfrom
manaswita-chichili:tyerunkar/unstaging-cli

Conversation

@tanmay-yerunkar-ms
Copy link
Copy Markdown
Contributor

Add new unstage command to remove staged solution versions from targets. This command:

  • Implements the unstage operation following the AAZ pattern
  • Supports long-running operations (LRO) with no-wait flag
  • Includes command to fetch updated solution version after unstaging
  • Adds proper argument validation and resource group support

Example usage:

az workload-orchestration target unstage -n myTarget -g myResourceGroup --solution-version-id <arm-id>

---

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

### Related command
<!--- Please provide the related command with az {command} if you can, so that we can quickly route to the related person to review. --->


### General Guidelines

- [ ] Have you run `azdev style <YOUR_EXT>` locally? (`pip install azdev` required)
- [ ] Have you run `python scripts/ci/test_index.py -q` locally? (`pip install wheel==0.30.0` required)
- [ ] My extension version conforms to the [Extension version schema](https://github.com/Azure/azure-cli/blob/release/doc/extensions/versioning_guidelines.md)

For new extensions:

- [ ] My extension description/summary conforms to the [Extension Summary Guidelines](https://github.com/Azure/azure-cli/blob/dev/doc/extensions/extension_summary_guidelines.md).


### About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.  
Once your pull request is merged into main branch, a new pull request will be created to update `src/index.json` automatically.  
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify `src/index.json`. 

Add new `unstage` command to remove staged solution versions from targets. This command:
- Implements the unstage operation following the AAZ pattern
- Supports long-running operations (LRO) with no-wait flag
- Includes command to fetch updated solution version after unstaging
- Adds proper argument validation and resource group support

Example usage:
```
az workload-orchestration target unstage -n myTarget -g myResourceGroup --solution-version-id <arm-id>
Copilot AI review requested due to automatic review settings February 13, 2026 06:03
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Feb 13, 2026

⚠️Azure CLI Extensions Breaking Change Test
⚠️workload-orchestration
rule cmd_name rule_message suggest_message
⚠️ 1001 - CmdAdd workload-orchestration target unstage cmd workload-orchestration target unstage added

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @tanmay-yerunkar-ms,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Feb 13, 2026

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

@github-actions
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

github-actions bot commented Feb 13, 2026

@tanmay-yerunkar-ms
Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree company="Microsoft"

Copy link
Copy Markdown
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 adds a new unstage command to the workload-orchestration extension that allows users to remove staged solution versions from targets. The command is generated using the AAZ (Azure API Zen) pattern and implements a long-running operation (LRO) with support for the --no-wait flag. The implementation includes a POST request to trigger the unstage operation followed by a GET request to fetch the updated solution version.

Changes:

  • Adds new workload-orchestration target unstage command following the AAZ pattern
  • Implements LRO with --no-wait support for asynchronous operations
  • Includes custom ARM ID parsing to extract solution and version names from the provided solution-version-id
  • Adds warning message to inform users about image removal from connected registry

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/target/_unstage.py New command implementation with LRO pattern, ARM ID parsing logic, and schema definitions for the solution version response
src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/target/__init__.py Adds import for the new unstage command module in alphabetical order

@tanmay-yerunkar-ms tanmay-yerunkar-ms marked this pull request as draft February 13, 2026 06:17
Add new `az workload-orchestration target unstage` command to unstage solution versions from targets. Implemented ARM ID format validation in pre_operations to fail fast on invalid input, and refactored solution name parsing to avoid duplication. Fixed grammar in warning message and added no-wait support to skip post-LRO GET operation when --no-wait flag is used.

Changes:
- Added unstage command documentation in HISTORY.rst for v5.1.0
- Implemented solution-version-id format validation with clear error messages
- Refactored ARM ID parsing to execute once in pre_operations
- Added command_instance reference to SolutionVersionsGet for shared state
- Conditionally skip SolutionVersionsGet when --no-wait is specified
- Corrected warning message grammar ("24 hours" vs "24-hour")
@yonzhan yonzhan requested a review from necusjz February 13, 2026 07:15
@yonzhan yonzhan requested review from jsntcy and kairu-ms February 13, 2026 07:15
@tanmay-yerunkar-ms tanmay-yerunkar-ms marked this pull request as ready for review February 13, 2026 07:59
@necusjz
Copy link
Copy Markdown
Member

necusjz commented Feb 19, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@necusjz
Copy link
Copy Markdown
Member

necusjz commented Feb 23, 2026

@tanmay-yerunkar-ms plz provide the pr link in Azure/aaz.

@github-actions github-actions bot added the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Feb 24, 2026
@github-actions github-actions bot removed the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Feb 25, 2026
@tanmay-yerunkar-ms
Copy link
Copy Markdown
Contributor Author

@tanmay-yerunkar-ms plz provide the pr link in Azure/aaz.

We are doing manual changes for now, so no aaz pr link available

@necusjz
Copy link
Copy Markdown
Member

necusjz commented Feb 26, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@necusjz
Copy link
Copy Markdown
Member

necusjz commented Feb 26, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@necusjz necusjz merged commit 37221f9 into Azure:main Feb 26, 2026
24 checks passed
@azclibot
Copy link
Copy Markdown
Collaborator

[Release] Update index.json for extension [ workload-orchestration-5.1.0 ] : https://dev.azure.com/msazure/One/_build/results?buildId=154628604&view=results

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.

6 participants