Migrate Mdp module to tsp - #29938
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Migrates the Az.Mdp module’s generation workflow from Swagger/AutoRest to TypeSpec (TSP), updating module metadata and regenerating user-facing cmdlet documentation to align with the new pipeline.
Changes:
- Added TypeSpec (TSP) emitter configuration for the Mdp module (tspconfig + spec location pin).
- Regenerated PlatyPS help markdown (new front-matter format and refreshed cmdlet reference pages).
- Updated module manifest and solution structure to align with the migrated generation outputs.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Mdp/Mdp/help/Update-AzMdpPool.md | Regenerated cmdlet reference markdown (PlatyPS 2024 schema). |
| src/Mdp/Mdp/help/Remove-AzMdpPool.md | Regenerated cmdlet reference markdown (PlatyPS 2024 schema). |
| src/Mdp/Mdp/help/New-AzMdpPool.md | Regenerated cmdlet reference markdown (PlatyPS 2024 schema). |
| src/Mdp/Mdp/help/Get-AzMdpSku.md | Regenerated cmdlet reference markdown; syntax/related-links section updated. |
| src/Mdp/Mdp/help/Get-AzMdpPoolAgent.md | Regenerated cmdlet reference markdown; syntax/related-links section updated. |
| src/Mdp/Mdp/help/Get-AzMdpPool.md | Regenerated cmdlet reference markdown (PlatyPS 2024 schema). |
| src/Mdp/Mdp/help/Az.Mdp.md | Regenerated module landing page for Az.Mdp help. |
| src/Mdp/Mdp/ChangeLog.md | Added upcoming release note describing the migration. |
| src/Mdp/Mdp/Az.Mdp.psd1 | Updated module manifest metadata/dependencies formatting. |
| src/Mdp/Mdp.sln | Updated solution structure/configurations for the migrated layout. |
| src/Mdp/Mdp.Autorest/tspconfig.yaml | Added TypeSpec PowerShell emitter configuration for generating Az.Mdp. |
| src/Mdp/Mdp.Autorest/tsp-location.yaml | Pinned TypeSpec input location and azure-rest-api-specs commit. |
| src/Mdp/Mdp.Autorest/resources/README.md | Added non-packaged resources folder documentation. |
| src/Mdp/Mdp.Autorest/README.md | Removed legacy AutoRest YAML configuration section from README. |
| src/Mdp/Mdp.Autorest/Properties/AssemblyInfo.cs | Added assembly metadata file for generated artifacts. |
| src/Mdp/Mdp.Autorest/generate-info.json | Updated generation metadata identifier. |
| src/Mdp/Mdp.Autorest/docs/Update-AzMdpPool.md | Refreshed generated docs content for Update-AzMdpPool. |
| src/Mdp/Mdp.Autorest/docs/New-AzMdpPool.md | Refreshed generated docs content for New-AzMdpPool. |
| src/Mdp/Mdp.Autorest/docs/Az.Mdp.md | Updated generated docs module page (metadata/content refresh). |
| ## RELATED LINKS | ||
|
|
||
| {{ Fill in the related links here }} | ||
|
|
| ## RELATED LINKS | ||
|
|
||
| {{ Fill in the related links here }} | ||
|
|
| ## RELATED LINKS | ||
|
|
||
| {{ Fill in the related links here }} | ||
|
|
| ## RELATED LINKS | ||
|
|
||
| {{ Fill in the related links here }} | ||
|
|
| ## RELATED LINKS | ||
|
|
||
| {{ Fill in the related links here }} | ||
|
|
| emitter-output-dir: "{output-dir}/{service-dir}/Mdp/Mdp.Autorest" | ||
| clear-output-folder: true | ||
| azure: true | ||
| module-version: 0.1.0 |
|
|
||
| Microsoft Visual Studio Solution File, Format Version 12.00 |
| * Migrated code generation from Swagger (AutoRest) to TypeSpec (TSP) | ||
| - No change to cmdlets, parameters, or output types |
| ### Default (Default) | ||
|
|
||
| ``` | ||
| Get-AzMdpSku -Location <String> [-SubscriptionId <String[]>] [-DefaultProfile <PSObject>] | ||
| [<CommonParameters>] | ||
| ``` |
| ### Default (Default) | ||
|
|
||
| ``` | ||
| Get-AzMdpPoolAgent -PoolName <String> -ResourceGroupName <String> [-SubscriptionId <String[]>] | ||
| [-DefaultProfile <PSObject>] [<CommonParameters>] | ||
| ``` |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated no new comments.
Suppressed comments (10)
src/Mdp/Mdp/help/Get-AzMdpSku.md:133
- The RELATED LINKS section still contains the template placeholder ("{{ Fill in the related links here }}"), which should not ship in reference help.
## RELATED LINKS
{{ Fill in the related links here }}
src/Mdp/Mdp/help/Get-AzMdpPoolAgent.md:157
- The RELATED LINKS section contains the template placeholder text. Please replace it with actual links (for example, the cmdlet's Learn page).
## RELATED LINKS
{{ Fill in the related links here }}
src/Mdp/Mdp/help/Get-AzMdpPool.md:236
- The RELATED LINKS section contains the template placeholder ("{{ Fill in the related links here }}"). This should be replaced with real related links before merging.
## RELATED LINKS
{{ Fill in the related links here }}
src/Mdp/Mdp/help/New-AzMdpPool.md:717
- The RELATED LINKS section contains the template placeholder text. Please replace with real links (e.g., the cmdlet documentation page).
## RELATED LINKS
{{ Fill in the related links here }}
src/Mdp/Mdp/help/Update-AzMdpPool.md:598
- The RELATED LINKS section contains the template placeholder ("{{ Fill in the related links here }}"). Please replace it with actual related links.
## RELATED LINKS
{{ Fill in the related links here }}
src/Mdp/Mdp/help/Remove-AzMdpPool.md:300
- The RELATED LINKS section contains the template placeholder ("{{ Fill in the related links here }}"), which should be replaced with real related links before publishing help.
## RELATED LINKS
{{ Fill in the related links here }}
src/Mdp/Mdp/ChangeLog.md:22
- The changelog says there is "No change" to cmdlets/parameters/output types, but this PR also updates the module's Az.Accounts dependency version in Az.Mdp.psd1. Since ChangeLog.md is user-facing, it should mention the updated Az.Accounts requirement (or drop the "no change" claim if that's not guaranteed).
* Migrated code generation from Swagger (AutoRest) to TypeSpec (TSP)
- No change to cmdlets, parameters, or output types
src/Mdp/Mdp/help/Get-AzMdpSku.md:22
- The SYNTAX section contains two default parameter set blocks ("Default" and "List"), which is redundant and confusing for users. Please keep a single authoritative syntax block for the default parameter set.
### Default (Default)
Get-AzMdpSku -Location [-SubscriptionId <String[]>] [-DefaultProfile ]
[]
**src/Mdp/Mdp/help/Get-AzMdpPoolAgent.md:22**
* The SYNTAX section contains two default parameter set blocks ("Default" and "List"), making it unclear which signature is authoritative. Please keep only one default syntax block.
Default (Default)
Get-AzMdpPoolAgent -PoolName <String> -ResourceGroupName <String> [-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>] [<CommonParameters>]
src/Mdp/Mdp.Autorest/tspconfig.yaml:8
- tspconfig.yaml sets module-version to 0.1.0, but the module manifest (Az.Mdp.psd1) declares ModuleVersion 0.1.2. Keeping these out of sync can cause future regeneration to reset the module version unexpectedly.
azure: true
module-version: 0.1.0
prefix: "Az"
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 41 out of 41 changed files in this pull request and generated 1 comment.
Suppressed comments (8)
src/Mdp/Mdp/help/Get-AzMdpSku.md:22
- The SYNTAX section is duplicated ("Default" and "List"), and it shows
-SubscriptionIdas required even though the example usesGet-AzMdpSku -Location westuswithout-SubscriptionId. This makes the help inconsistent with actual usage and will confuse users.
src/Mdp/Mdp/ChangeLog.md:22 - The changelog says “No change to cmdlets, parameters, or output types”, but this PR adds new cmdlet help files and updates the module manifest exports (suggesting the public cmdlet surface changed). The entry should reflect the actual user-facing impact.
## Upcoming Release
* Migrated code generation from Swagger (AutoRest) to TypeSpec (TSP)
- No change to cmdlets, parameters, or output types
src/Mdp/Mdp/help/Get-AzMdpSku.md:1
- The file starts with a UTF-8 BOM character before the YAML front matter (
---). Some YAML/front-matter parsers treat BOM as content and can fail to recognize the document header. Re-save without BOM (front matter should start exactly with---).
src/Mdp/Mdp.Autorest/test/Get-AzMdpOperation.Tests.ps1:21 - The newly added Pester test is entirely skipped and only throws
NotImplementedException, so it provides no coverage. This module already has real, non-skipped tests (for exampleNew-AzMdpPool.Tests.ps1), so these new cmdlets should have at least basic playback coverage as well.
Describe 'Get-AzMdpOperation' {
It 'List' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
}
src/Mdp/Mdp.Autorest/Properties/AssemblyInfo.cs:16
AssemblyInfo.cshas duplicated and conflicting header/license text (MIT + Apache) and repeated “Changes may cause incorrect behavior…” lines. This makes licensing and provenance unclear. Align the header with the rest of the repo (single license header, no duplication).
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
src/Mdp/Mdp.Autorest/README.md:24
- The AutoRest configuration section was removed, but there is no replacement describing how this module is now generated with TypeSpec (where to find the config and the pinned spec commit). Add a short TypeSpec generation/config section so maintainers can reproduce the build.
## Development
For information on how to develop for `Az.Mdp`, see [how-to.md](how-to.md).
<!-- endregion -->
src/Mdp/Mdp/help/Get-AzMdpPool.md:22
- The SYNTAX section shows
-SubscriptionIdas required, but Example 1 usesGet-AzMdpPoolwith no parameters. Help should reflect that-SubscriptionIdis optional (defaulting to the current context) to stay consistent with examples and typical Az cmdlet patterns.
src/Mdp/Mdp/help/Get-AzMdpOperation.md:64 - The examples section contains placeholders (
{{ Add title here }},{{ Add code here }},{{ Add output here }}), which should not ship in user-facing cmdlet help. Provide at least one real, runnable example and remove placeholder blocks.
| # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. | ||
| FunctionsToExport = 'Get-AzMdpPool', 'Get-AzMdpPoolAgent', 'Get-AzMdpSku', 'New-AzMdpPool', | ||
| 'Remove-AzMdpPool', 'Update-AzMdpPool' | ||
| FunctionsToExport = 'Get-AzMdpOperation', 'Get-AzMdpPool', 'Get-AzMdpPoolAgent', | ||
| 'Get-AzMdpSku', 'Invoke-AzMdpUsageSubscriptionUsage', 'New-AzMdpPool', | ||
| 'Remove-AzMdpPool', 'Remove-AzMdpPoolResource', | ||
| 'Test-AzMdpPoolNameAvailability', 'Update-AzMdpPool' |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 46 out of 46 changed files in this pull request and generated no new comments.
Suppressed comments (8)
src/Mdp/Mdp.Autorest/tspconfig.yaml:8
module-versionis set to 0.1.0 but the module manifestsrc/Mdp/Mdp/Az.Mdp.psd1is version 0.1.2. Keeping these in sync avoids generating mismatched version metadata during TSP emission.
azure: true
module-version: 0.1.0
prefix: "Az"
src/Mdp/Mdp.sln:2
- The solution file now starts with a blank line.
.slnfiles are expected to begin with theMicrosoft Visual Studio Solution Fileheader on the first line; the leading blank line can break parsing in some tooling.
src/Mdp/Mdp/help/Update-AzMdpPool.md:626 - The RELATED LINKS section still contains the template placeholder
{{ Fill in the related links here }}. Please replace it with relevant cmdlet links or remove the placeholder so it doesn't appear in published help.
src/Mdp/Mdp/ChangeLog.md:22 - The changelog states there is "No change to cmdlets" but this PR updates the module export surface (e.g., adds additional exported functions/cmdlets). This entry should accurately reflect the user-visible cmdlet changes introduced by the migration.
src/Mdp/Mdp.Autorest/Properties/AssemblyInfo.cs:15 - The file header contains duplicated copyright lines and conflicting license statements (MIT and Apache). Other .Autorest projects use a single Apache 2.0 header; keeping one consistent header avoids ambiguity.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
src/Mdp/Mdp/help/Get-AzMdpOperation.md:42
- This help topic still contains placeholder example content (
{{ Add title here }},{{ Add code here }}, etc.). Shipping placeholders degrades the user-facing reference help (and is currently being suppressed via static analysis exceptions).
src/Mdp/Mdp/help/Invoke-AzMdpUsageSubscriptionUsage.md:44 - The EXAMPLES section contains placeholder content (
{{ Add title here }},{{ Add code here }}, etc.). This should be replaced with real examples before release rather than being suppressed via static analysis exceptions.
src/Mdp/Mdp.Autorest/test/Get-AzMdpOperation.Tests.ps1:20 - This test file contains only skipped placeholder tests (throwing
NotImplementedException). Since this PR introduces/exportsGet-AzMdpOperation, it should have at least a basic playback test that executes the cmdlet and asserts on the shape of the result.
Describe 'Get-AzMdpOperation' {
It 'List' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
Main reverted the PlatyPS 1.0.2 upgrade (Azure#29935), so the help markdown must use the legacy schema. Regenerates src/Mdp/Mdp/help with platyPS 0.14. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c38a9d9c-00fd-4eeb-9dbb-a5b08d0e72d4
30f6f7c to
b574d29
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 43 out of 43 changed files in this pull request and generated no new comments.
Suppressed comments (12)
src/Mdp/Mdp/ChangeLog.md:23
- The changelog claims there is "No change to cmdlets, parameters, or output types", but this PR exports new cmdlets (e.g., Get-AzMdpOperation, Invoke-AzMdpUsageSubscriptionUsage, Remove-AzMdpPoolResource, Test-AzMdpPoolNameAvailability) and adds the RuntimeConfigurationWorkFolder parameter to New/Update-AzMdpPool. Please update the entry to accurately describe the user-visible changes.
src/Mdp/Mdp.Autorest/Properties/AssemblyInfo.cs:15 - This AssemblyInfo header includes duplicated/conflicting license boilerplate (MIT + Apache) and a duplicated copyright block. Other *.Autorest/Properties/AssemblyInfo.cs files in this repo use only the standard Apache 2.0 header; please align to that to avoid license ambiguity.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the ""License"");
src/Mdp/Mdp.Autorest/test/Get-AzMdpOperation.Tests.ps1:20
- This test file only contains skipped placeholder tests that throw NotImplementedException, so it doesn't provide any coverage for the new cmdlet. Please add at least one real playback test (similar to New-AzMdpPool.Tests.ps1 / Update-AzMdpPool.Tests.ps1) and remove the -skip placeholders.
Describe 'Get-AzMdpOperation' {
It 'List' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
src/Mdp/Mdp.Autorest/test/Invoke-AzMdpUsageSubscriptionUsage.Tests.ps1:24
- This test file only contains skipped placeholder tests that throw NotImplementedException, so it doesn't provide any coverage for the new cmdlet. Please add at least one real playback test and remove the -skip placeholders.
Describe 'Invoke-AzMdpUsageSubscriptionUsage' {
It 'Usages' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
It 'UsagesViaIdentity' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
src/Mdp/Mdp.Autorest/test/Test-AzMdpPoolNameAvailability.Tests.ps1:32
- This test file only contains skipped placeholder tests that throw NotImplementedException, so it doesn't provide any coverage for the new cmdlet. Please add at least one real playback test and remove the -skip placeholders.
Describe 'Test-AzMdpPoolNameAvailability' {
It 'CheckExpanded' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
It 'Check' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
It 'CheckViaJsonFilePath' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
It 'CheckViaJsonString' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
src/Mdp/Mdp.Autorest/test/Remove-AzMdpPoolResource.Tests.ps1:40
- This test file only contains skipped placeholder tests that throw NotImplementedException, so it doesn't provide any coverage for the new cmdlet. Please add at least one real playback test and remove the -skip placeholders.
Describe 'Remove-AzMdpPoolResource' {
It 'DeleteExpanded' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
It 'DeleteViaJsonString' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
It 'DeleteViaJsonFilePath' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
It 'Delete' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
It 'DeleteViaIdentityExpanded' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
It 'DeleteViaIdentity' -skip {
{ throw [System.NotImplementedException] } | Should -Not -Throw
}
tools/StaticAnalysis/Exceptions/Az.Mdp/SignatureIssues.csv:2
- This adds a static analysis exception for ShouldProcess based on using the Invoke verb. For a read-only listing operation, consider using a Get-* verb (avoids ShouldProcess expectations) or, if it performs side effects, implement SupportsShouldProcess so -WhatIf/-Confirm are available instead of suppressing the rule.
src/Mdp/Mdp/help/Get-AzMdpOperation.md:45 - The EXAMPLES section contains template placeholders (e.g., "{{ Add title here }}", "{{ Add code here }}"), which breaks help quality and triggers the MissingExample* static analysis rules. Replace with at least one real example and description.
src/Mdp/Mdp/help/Invoke-AzMdpUsageSubscriptionUsage.md:53 - The EXAMPLES section contains template placeholders (e.g., "{{ Add title here }}", "{{ Add code here }}"), which breaks help quality and triggers the MissingExample* static analysis rules. Replace with a real example and description.
src/Mdp/Mdp/help/Test-AzMdpPoolNameAvailability.md:65 - The EXAMPLES section contains template placeholders (e.g., "{{ Add title here }}", "{{ Add code here }}"), which breaks help quality and triggers the MissingExample* static analysis rules. Replace with a real example and description.
src/Mdp/Mdp/help/Remove-AzMdpPoolResource.md:82 - The EXAMPLES section contains template placeholders (e.g., "{{ Add title here }}", "{{ Add code here }}"), which breaks help quality and triggers the MissingExample* static analysis rules. Replace with a real example and description.
tools/StaticAnalysis/Exceptions/Az.Mdp/ExampleIssues.csv:4 - This exception file suppresses MissingExample* findings for multiple Az.Mdp cmdlets. Since the corresponding markdown help currently contains placeholder example stubs, it would be better to replace those placeholders with real examples and then remove these exceptions, rather than permanently exempting the module from example validation.
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.