Skip to content

Add non-premium disk option for repair VM#8486

Merged
zhoxing-ms merged 12 commits intoAzure:mainfrom
Sandido:adsandor/nonpremdisks
Mar 7, 2025
Merged

Add non-premium disk option for repair VM#8486
zhoxing-ms merged 12 commits intoAzure:mainfrom
Sandido:adsandor/nonpremdisks

Conversation

@Sandido
Copy link
Copy Markdown
Contributor

@Sandido Sandido commented Feb 18, 2025


This PR adds a new parameter to set the os disk storage account type of the repair vm to be whatever the user wants.
This allows users who have restrictions on creating premium disks in their environments to use the repair vm feature.

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

Related command

az vm repair create

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.

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

azure-client-tools-bot-prd bot commented Feb 18, 2025

⚠️Azure CLI Extensions Breaking Change Test
⚠️vm-repair
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd vm repair create cmd vm repair create added parameter os_disk_type

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

Hi @Sandido,
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.

@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>

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Feb 18, 2025

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 18, 2025

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Feb 18, 2025

Please fix conflicts

@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 20, 2025
@Sandido Sandido marked this pull request as ready for review February 20, 2025 21:20
@github-actions github-actions bot added release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. and removed release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. labels Feb 20, 2025
@Sandido
Copy link
Copy Markdown
Contributor Author

Sandido commented Feb 25, 2025

@AllyW , addressed comments, please re-review

@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, 2025
Co-authored-by: Xing Zhou <Zhou.Xing@microsoft.com>
@zhoxing-ms
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).



@pytest.mark.NonPremiumOSDisk
class WindowsNonPremiumOSDiskRepairVM(LiveScenarioTest):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

May I ask why do we mark this test as LiveScenarioTest?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because these tests do not run against recorded json responses, they are live runs in Azure when I run them and create actual resources that are then cleaned up. That is what LiveScenarioTest does.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just out of curiosity, why can't these tests be created as ScenarioTest? Can their responses be recorded?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@zhoxing-ms They might be able to, but what is the benefit? I think PS has moved to Live Smoke tests these days anyway. Recorded json tests are an old framework.

@Sandido
Copy link
Copy Markdown
Contributor Author

Sandido commented Mar 6, 2025

@zhoxing-ms please re-review

@zhoxing-ms zhoxing-ms merged commit 23d58de into Azure:main Mar 7, 2025
21 of 22 checks passed
@azclibot
Copy link
Copy Markdown
Collaborator

azclibot commented Mar 7, 2025

[Release] Update index.json for extension [ vm-repair-2.1.0 ] : https://dev.azure.com/msazure/One/_build/results?buildId=117222476&view=results

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

Labels

Auto-Assign Auto assign by bot Compute

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants