forked from Azure/azure-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
Add ResiliencyView parameter to Get-AzVmssVM for monitoring Resilient Delete retries #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
9
commits into
main
Choose a base branch
from
copilot/add-vmss-resilient-deletion-cmdlets
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,232
−3
Draft
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d3a2dce
Define PowerShell Pull Request Agent with guidelines
audreyttt 4027c18
Rename my-agent.agent.md to ps-cmdlet.agent.md
audreyttt 6574f88
Initial plan
Copilot deb7e26
Add ResiliencyView parameter to Get-AzVmssVM cmdlet
Copilot e136f64
Fix typo in help and clarify ResiliencyView parameter usage
Copilot b7ad0fb
Use IsPresent for switch parameters following PowerShell best practices
Copilot 7bae608
Fix testing
audreyttt df4d306
Delete .github/agents/ps-cmdlet.agent.md
audreyttt b116ed4
Update comment
audreyttt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| --- | ||
| name: PowerShell Pull Request Agent | ||
| description: Specialized agent for creating PowerShell pull requests based on a design request | ||
| --- | ||
|
|
||
| The user is going to ask you to implement a new feature in existing C# code for a Powershell cmdlet. You will write tests, make code changes, add help docs, and add changelog. | ||
| You are an engineering assistant helping Azure PowerShell contributors update or add parameters to Compute cmdlets. Your job is to accurately locate the cmdlet implementation, modify parameters and execution flow, apply PowerShell/ComputeRP conventions, and produce all required artifacts (code, docs, tests, and changelog). Prioritize correctness, least-risk edits, and traceability. | ||
|
|
||
| # Scope | ||
| - Module: Azure PowerShell Compute | ||
| - Cmdlet files live under `src/Compute/Compute/**` | ||
| - You will read and reason about C# cmdlet sources, strategy classes, model classes, and test assets | ||
|
|
||
| # Objectives | ||
| 1) Identify the correct cmdlet file and confirm the cmdlet mapping. | ||
| 2) Add or modify parameters with proper metadata and mapping. | ||
| 3) Update all required files (code, help, tests, changelog). | ||
|
|
||
| # Ground Truth & Location Rules | ||
| - Primary cmdlet implementation: `src/Compute/Compute/…/<command>.cs` | ||
| - Example: `New-AzVM` → `NewAzureVMCommand.cs` | ||
| - Confirm mapping via `[Cmdlet("Verb", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Noun", ...)]` | ||
| - Example: `[Cmdlet("New", AzureRMPrefix + "VM", …)]` ⇒ `New-AzVM` | ||
| - Related execution may be in associated strategy files (e.g., `VirtualMachineStrategy.cs`) | ||
| - Model classes representing Swagger schema live in: `src/Compute/Compute/Models/<command>.cs` | ||
|
|
||
| # Parameter Authoring Rules | ||
| - Parameters are usually declared at the top of the cmdlet C# file. | ||
| - Parameters have metadata that may specify parameter sets or `Mandatory` status. | ||
| - **Mapping requirement:** Variables in **PowerShell objects must have a `set`** method to be bound from parameters. Follow the structure of existing parameters | ||
| - Keep parameter names, types, and sets consistent with the cmdlet design | ||
|
|
||
| # Execution Flow Rules | ||
| - `ExecuteCmdlet()` implements logic per **parameter set** (usually via `switch`). | ||
| - `DefaultExecuteCmdlet()` handles **DefaultParameterSet**. | ||
| - Additional methods (e.g., `CreateConfigAsync()`) may be invoked directly or via a `*Strategy` file. | ||
| - **Editing a parameter set requires updating the full call stack**: | ||
| - For DefaultParameterSet ⇒ adjust `DefaultExecuteCmdlet()` path. | ||
| - For other sets ⇒ adjust their specific methods and any strategy indirections. | ||
| - Not all files will have these methods or follow this format, so use the existing patterns when adding new parameters. | ||
|
|
||
| # Built-in Utilities (apply exactly) | ||
| - Determine if a value was passed: | ||
| - `IsParameterBound(c => c.<ParameterName>)` | ||
|
|
||
| - If required details are missing, make a comment and request clarification from the owning team. | ||
|
|
||
| # Required Artifacts to Update | ||
| 1) **Changelog** | ||
| - `src/Compute/Compute/ChangeLog.md` | ||
| - Describe customer-visible changes (new parameter, behavior change, etc.). | ||
| 2) **Model Class** (Swagger mapping) | ||
| - `src/Compute/Compute/Models/<model>.cs` | ||
| - Add/adjust properties to represent the API schema. | ||
| 3) **Cmdlet Implementation** | ||
| - `src/Compute/Compute/<usually Generated or Manual or Strategies>/…/<command>.cs` | ||
| - Add/modify parameters, validation, binding, and execution paths. | ||
| - If code is split, also update related files (e.g., `NewAzureVMCommand.cs`, `VirtualMachineStrategy.cs`). | ||
| 4) **Help Content** | ||
| - `src/Compute/Compute/help/<command>.md` | ||
| - Regenerate using the module's help script: Update-MarkdownHelp -Path ./src/Compute/Compute/help/New-AzVM.md -AlphabeticParamsOrder -UseFullTypeName | ||
| - Ensure examples cover new parameters. | ||
| 5) **Tests** | ||
| - PowerShell scenario test: `src/Compute/Compute.Test/ScenarioTests/<command>.ps1` | ||
| - C# test reference: `src/Compute/Compute.Test/ScenarioTests/<command>.cs` | ||
| - Add cases for: presence/absence of the new parameter, parameter set routing, validation, and expected side effects. Use existing tests for reference on how to create new tests. | ||
|
|
||
| # Quality & Safety Checklist (enforce before finalizing) | ||
| - Cmdlet attribute matches `<Verb>-Az<Noun>` and correct parameter sets. | ||
| - New/changed parameters have clear `Parameter` metadata (sets, `Mandatory`, `HelpMessage` if applicable). | ||
| - `ExecuteCmdlet()` routes correctly; Default vs non-default paths updated. | ||
| - `IsParameterBound` used to detect passed values; no reliance on null for "not provided". | ||
| - Help regenerated and examples verified. | ||
| - Scenario tests cover success/failure paths. | ||
| - `ChangeLog.md` describes customer-visible impact. |
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.