[PS] Migrate RedisEnterpriseCache module to autorest v4#28618
[PS] Migrate RedisEnterpriseCache module to autorest v4#28618
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
There was a problem hiding this comment.
Pull Request Overview
This pull request migrates the RedisEnterpriseCache module from AutoRest v3 to AutoRest v4, involving significant changes to the code generation tooling and breaking changes to cmdlet interfaces and parameter types.
- Updates the module to use AutoRest v4 with new API version
2025-05-01-preview - Changes numerous parameter types from strongly-typed enums to strings
- Modifies parameter set structures and adds new parameter overloads for improved usability
Reviewed Changes
Copilot reviewed 80 out of 82 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| tools/StaticAnalysis/Exceptions/Az.RedisEnterpriseCache/BreakingChangeIssues.csv | Documents breaking changes for cmdlet types and parameters to maintain compatibility tracking |
| src/RedisEnterpriseCache/RedisEnterpriseCache/help/*.md | Updates help documentation to reflect new parameter types and syntax changes |
| src/RedisEnterpriseCache/RedisEnterpriseCache/Az.RedisEnterpriseCache.psd1 | Updates module metadata including version requirements and build configuration |
| src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/test/*.ps1 | Removes test implementations and updates test environment configuration |
src/RedisEnterpriseCache/RedisEnterpriseCache.Autorest/test/env.json
Outdated
Show resolved
Hide resolved
src/RedisEnterpriseCache/RedisEnterpriseCache/help/Update-AzRedisEnterpriseCache.md
Show resolved
Hide resolved
...edisEnterpriseCache/help/Invoke-AzRedisEnterpriseCacheForceDatabaseLinkToReplicationGroup.md
Outdated
Show resolved
Hide resolved
...edisEnterpriseCache/help/Invoke-AzRedisEnterpriseCacheForceDatabaseLinkToReplicationGroup.md
Outdated
Show resolved
Hide resolved
src/RedisEnterpriseCache/RedisEnterpriseCache/help/Az.RedisEnterpriseCache.md
Outdated
Show resolved
Hide resolved
|
To the author of the pull request, |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| [Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Category('Body')] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.ManagedServiceIdentityType] | ||
| # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). | ||
| ${IdentityType}, |
There was a problem hiding this comment.
Why is this a switch parameter now, instead of identityType having either "systemAssignedIdentity" or "userAssignedIdentity" as a value?
Is the presence (or abscence) of EnableSystemAssignedIdentity and UserAssignedIdentity supposed to represent the below combinations given in the managed identity common type?

There was a problem hiding this comment.
Based on the new Autorest version, this is one of the breaking changes. For new-cmdlet and update-cmdlet will require different type of input. You could read the detail at https://github.com/Azure/autorest.powershell/blob/main/docs/migration-from-v3-to-v4.md
|
|
||
| [Parameter(ParameterSetName='CreateClusterWithDatabase')] | ||
| [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AofFrequency])] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.PSArgumentCompleterAttribute("1s", "always")] |
There was a problem hiding this comment.
always setting is deprecated, is there a way to mark it so and not include it in autocomplete?
|
|
||
| [Parameter()] | ||
| [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AofFrequency])] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.PSArgumentCompleterAttribute("1s", "always")] |
There was a problem hiding this comment.
always is deprecated, any way to mark it so?
|
|
||
| [Parameter()] | ||
| [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.AofFrequency])] | ||
| [Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.PSArgumentCompleterAttribute("1s", "always")] |
There was a problem hiding this comment.
always is deprecated, any way to mark it so and not include it in autocomplete?
| --- | ||
| Module Name: Az.RedisEnterpriseCache | ||
| Module Guid: bd2e5e87-81f1-459f-9f55-4daaf5d3d27e | ||
| Module Guid: cddc4755-5511-445a-a323-f449e436bf6e |
There was a problem hiding this comment.
What is the module guid, and why did it get updated?
There was a problem hiding this comment.
autorest generation will update this guid too. Could ignore this change
|
|
||
| ## SYNOPSIS | ||
| Creates/Updates a particular access policy assignment for a database | ||
| Create a particular access policy assignment for a database |
|
|
||
| ## DESCRIPTION | ||
| Creates/Updates a particular access policy assignment for a database | ||
| Create a particular access policy assignment for a database |
|
|
||
| ## SYNOPSIS | ||
| Updates an existing Redis Enterprise cluster | ||
| Update an existing (overwrite/reupdate with potential downtime) cache cluster |
|
|
||
| ## DESCRIPTION | ||
| Updates an existing Redis Enterprise cluster | ||
| Update an existing (overwrite/reupdate with potential downtime) cache cluster |
|
|
||
| ```yaml | ||
| Type: Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.HighAvailability | ||
| Type: System.Nullable`1[System.Boolean] |
There was a problem hiding this comment.
Is this the expected type for switch parameters?
| ## SYNOPSIS | ||
| Updates an existing Redis Enterprise cluster | ||
| Update an existing (overwrite/reupdate with potential downtime) cache cluster | ||
|
|
There was a problem hiding this comment.
The synopsis/description text is user-facing but contains awkward phrasing and a double space ("reupdate with"). Please reword to a clear, grammatically correct sentence (and keep spacing consistent).
| ## SYNOPSIS | ||
| Creates/Updates a particular access policy assignment for a database | ||
| Create create a particular access policy assignment for a database | ||
|
|
There was a problem hiding this comment.
The synopsis/description contains a duplicated word ("Create create"). Please correct the grammar (e.g., "Creates a particular access policy assignment for a database").
| ### [New-AzRedisEnterpriseCacheAccessPolicyAssignment](New-AzRedisEnterpriseCacheAccessPolicyAssignment.md) | ||
| Creates/Updates a particular access policy assignment for a database | ||
| Create create a particular access policy assignment for a database | ||
|
|
There was a problem hiding this comment.
This module index entry includes a duplicated word ("Create create"), which will show up in rendered help. Please fix the grammar to match the cmdlet help synopsis.
| ### [Update-AzRedisEnterpriseCache](Update-AzRedisEnterpriseCache.md) | ||
| Updates an existing Redis Enterprise cluster | ||
| Update an existing (overwrite/reupdate with potential downtime) cache cluster | ||
|
|
There was a problem hiding this comment.
This module index entry includes awkward phrasing and a double space ("reupdate with"). Since this text is displayed in aggregated help, please reword/format it to be grammatically correct and avoid extra spaces.
| ## Upcoming Release | ||
| * Introduced various new features by upgrading code generator. Please see details [here](https://github.com/Azure/azure-powershell/blob/main/documentation/Autorest-powershell-v4-new-features.md). | ||
| * Preannounced breaking changes. Please refer to https://go.microsoft.com/fwlink/?linkid=2333229 |
There was a problem hiding this comment.
The new "Upcoming Release" entry is vague and developer-centric ("various new features by upgrading code generator"). ChangeLog entries should be specific from the user's perspective (e.g., mention the RedisEnterpriseCache AutoRest v4 migration and key user-visible impacts) and include an issue/PR reference when applicable.
|
|
||
| ## SYNOPSIS | ||
| Creates/Updates a particular access policy assignment for a database | ||
| Create create a particular access policy assignment for a database |
There was a problem hiding this comment.
The synopsis/description contains a duplicated word ("Create create"). Please correct the grammar (e.g., "Creates a particular access policy assignment for a database").
| Create create a particular access policy assignment for a database | |
| Creates a particular access policy assignment for a database |
|
|
||
| ### [New-AzRedisEnterpriseCacheAccessPolicyAssignment](New-AzRedisEnterpriseCacheAccessPolicyAssignment.md) | ||
| Creates/Updates a particular access policy assignment for a database | ||
| Create create a particular access policy assignment for a database |
There was a problem hiding this comment.
This module index entry includes a duplicated word ("Create create"), which will show up in rendered help. Please fix the grammar to match the cmdlet help synopsis.
| Create create a particular access policy assignment for a database | |
| Creates a particular access policy assignment for a database. |
|
|
||
| ### [Update-AzRedisEnterpriseCache](Update-AzRedisEnterpriseCache.md) | ||
| Updates an existing Redis Enterprise cluster | ||
| Update an existing (overwrite/reupdate with potential downtime) cache cluster |
There was a problem hiding this comment.
This module index entry includes awkward phrasing and a double space ("reupdate with"). Since this text is displayed in aggregated help, please reword/format it to be grammatically correct and avoid extra spaces.
| Update an existing (overwrite/reupdate with potential downtime) cache cluster | |
| Updates an existing cache cluster (overwrite or update with potential downtime). |
There was a problem hiding this comment.
The scenario recording contains environment-specific identifiers (subscription/tenant IDs, principalId, etc.) and very large opaque values (e.g., long Azure-AsyncOperation query strings). Please sanitize recordings to stable placeholders to avoid committing identifiable/test-environment details and to keep diffs/repo size manageable.
|
|
||
| ```yaml | ||
| Type: Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.HighAvailability | ||
| Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] |
There was a problem hiding this comment.
The parameter type rendering for -EnableSystemAssignedIdentity includes full assembly qualification (System.Private.CoreLib, Version=10.0.0.0), which is noisy and confusing in user-facing docs. Please adjust the doc generation/templates so this renders as a simple boolean/nullable boolean type.
| Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] | |
| Type: Boolean? |
Description
Preannouncement PR: #28621
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.