Skip to content

List instances and List revision should use ST Id not name#9643

Open
Avisiktapatra wants to merge 20 commits intoAzure:mainfrom
manaswita-chichili:avpatra/RevisionInstancesFix
Open

List instances and List revision should use ST Id not name#9643
Avisiktapatra wants to merge 20 commits intoAzure:mainfrom
manaswita-chichili:avpatra/RevisionInstancesFix

Conversation

@Avisiktapatra
Copy link

@Avisiktapatra Avisiktapatra commented Mar 2, 2026


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

Related command

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

For new extensions:

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.

Copilot AI review requested due to automatic review settings March 2, 2026 04:52
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Mar 2, 2026

❌Azure CLI Extensions Breaking Change Test
❌workload-orchestration
rule cmd_name rule_message suggest_message
1010 - ParaPropUpdate workload-orchestration target solution-instance-list cmd workload-orchestration target solution-instance-list update parameter solution_name: updated property options from ['--solution', '--solution-template-name'] to ['--solution-id', '--solution-template-id'] please change property options from ['--solution-id', '--solution-template-id'] to ['--solution', '--solution-template-name'] for parameter solution_name of cmd workload-orchestration target solution-instance-list
1010 - ParaPropUpdate workload-orchestration target solution-revision-list cmd workload-orchestration target solution-revision-list update parameter solution_name: updated property options from ['--solution', '--solution-template-name'] to ['--solution-id', '--solution-template-id'] please change property options from ['--solution-id', '--solution-template-id'] to ['--solution', '--solution-template-name'] for parameter solution_name of cmd workload-orchestration target solution-revision-list

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

Hi @Avisiktapatra,
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
Collaborator

yonzhan commented Mar 2, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 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
Contributor

github-actions bot commented Mar 2, 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
Contributor

github-actions bot commented Mar 2, 2026

Hi @Avisiktapatra

⚠️ Release Requirements

Module: workload-orchestration

  • ⚠️ Please update VERSION to be 6.0.0 in src/workload-orchestration/setup.py

Notes

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 updates workload-orchestration target listing commands to use the solution template’s uniqueIdentifier (ST Id) instead of the template name when calling the target “solutions” list endpoints, to align with the service’s expected identifier.

Changes:

  • Add a shared TargetHelper.get_solution_template_unique_identifier(...) to fetch a solution template and extract properties.uniqueIdentifier.
  • Update target solution-instance-list to resolve and use uniqueIdentifier for the solutionName path segment.
  • Update target solution-revision-list to resolve and use uniqueIdentifier for the solutionName path segment.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/target/_target_helper.py New helper for resolving solution template uniqueIdentifier via a GET on solutionTemplates.
src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/target/_solution_instance_list.py Uses resolved uniqueIdentifier in URL params for listing solution instances.
src/workload-orchestration/azext_workload_orchestration/aaz/latest/workload_orchestration/target/_solution_revision_list.py Uses resolved uniqueIdentifier in URL params for listing solution revisions.

Comment on lines 92 to 101
def __call__(self, *args, **kwargs):
# Resolve solution template name to its uniqueIdentifier
self.unique_identifier = TargetHelper.get_solution_template_unique_identifier(
self.ctx.subscription_id,
self.ctx.args.resource_group,
self.ctx.args.solution_name,
self.client
)

request = self.make_request()
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

The new behavior adds an extra management-plane GET to resolve the solution template uniqueIdentifier before listing instances, but there’s no scenario coverage for this command path in the extension tests. Adding/adjusting a scenario test to exercise workload-orchestration target solution-instance-list (including the extra solutionTemplates GET) would help prevent regressions.

Copilot uses AI. Check for mistakes.
@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 Mar 2, 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 Mar 2, 2026
Avisiktapatra and others added 2 commits March 2, 2026 10:45
…test/workload_orchestration/target/_target_helper.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…test/workload_orchestration/target/_target_helper.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@yonzhan yonzhan requested a review from necusjz March 2, 2026 06:42
@necusjz
Copy link
Member

necusjz commented Mar 12, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@manaswita-chichili
Copy link
Contributor

Tested the resource Id validation changes:
image
image
image
image

@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 Mar 16, 2026
@Avisiktapatra
Copy link
Author

Validation: Solution revision list
image

Validation: solution instance list
image

@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 Mar 16, 2026
@necusjz
Copy link
Member

necusjz commented Mar 16, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@Avisiktapatra
Copy link
Author

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

@necusjz
Copy link
Member

necusjz commented Mar 17, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@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 Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants