Skip to content

[PS] Migrate RedisEnterpriseCache module to autorest v4#28618

Open
JoyerJin wants to merge 9 commits intomainfrom
joyer/RedisEnterpriseCache-migrate-v4
Open

[PS] Migrate RedisEnterpriseCache module to autorest v4#28618
JoyerJin wants to merge 9 commits intomainfrom
joyer/RedisEnterpriseCache-migrate-v4

Conversation

@JoyerJin
Copy link
Copy Markdown
Contributor

@JoyerJin JoyerJin commented Sep 26, 2025

Description

Preannouncement PR: #28621

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

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

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

@JoyerJin JoyerJin marked this pull request as ready for review September 28, 2025 06:07
Copilot AI review requested due to automatic review settings September 28, 2025 06:07
Copy link
Copy Markdown
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 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

@isra-fel isra-fel added the autorest v4 migration pr migrating module from generated by autorest.powershell v3 to v4 label Oct 2, 2025
@Pan-Qi Pan-Qi marked this pull request as draft January 8, 2026 06:46
@Pan-Qi Pan-Qi added the Contains Breaking Change This PR contains breaking change label Jan 9, 2026
@Pan-Qi Pan-Qi marked this pull request as ready for review January 9, 2026 04:54
Copilot AI review requested due to automatic review settings January 9, 2026 04:54
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 9, 2026

To the author of the pull request,
This PR was labeled "Contains Breaking Change" because breaking changes have been detected by the static analysis pipeline.

  • According to our policy, breaking changes can only take place during major release and they must be preannounced.
  • Please follow our guide on the detailed steps.
  • Required: Please fill in the task below to facilitate our contact,you will receive notifications related to breaking changes.

Copy link
Copy Markdown
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

Copilot reviewed 80 out of 83 changed files in this pull request and generated no new comments.

@koderjoker koderjoker self-assigned this Jan 9, 2026
@isra-fel isra-fel added this to the Az 16.0.0 (TBD) milestone Jan 28, 2026
@isra-fel
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@NoriZC
Copy link
Copy Markdown
Contributor

NoriZC commented Mar 31, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown
Contributor

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},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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?
Image

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.

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")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is the module guid, and why did it get updated?

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.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please revert change


## DESCRIPTION
Creates/Updates a particular access policy assignment for a database
Create a particular access policy assignment for a database
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please revert change


## SYNOPSIS
Updates an existing Redis Enterprise cluster
Update an existing (overwrite/reupdate with potential downtime) cache cluster
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please revert change


## DESCRIPTION
Updates an existing Redis Enterprise cluster
Update an existing (overwrite/reupdate with potential downtime) cache cluster
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please revert change


```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.RedisEnterpriseCache.Support.HighAvailability
Type: System.Nullable`1[System.Boolean]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this the expected type for switch parameters?

Copilot AI review requested due to automatic review settings April 7, 2026 03:56
Copy link
Copy Markdown
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

Copilot reviewed 80 out of 83 changed files in this pull request and generated 15 comments.

Comment on lines 10 to 12
## SYNOPSIS
Updates an existing Redis Enterprise cluster
Update an existing (overwrite/reupdate with potential downtime) cache cluster

Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment on lines 10 to 12
## SYNOPSIS
Creates/Updates a particular access policy assignment for a database
Create create a particular access policy assignment for a database

Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

The synopsis/description contains a duplicated word ("Create create"). Please correct the grammar (e.g., "Creates a particular access policy assignment for a database").

Copilot uses AI. Check for mistakes.
Comment on lines 51 to 53
### [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

Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines 69 to 71
### [Update-AzRedisEnterpriseCache](Update-AzRedisEnterpriseCache.md)
Updates an existing Redis Enterprise cluster
Update an existing (overwrite/reupdate with potential downtime) cache cluster

Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines 20 to 22
## 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
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.

## SYNOPSIS
Creates/Updates a particular access policy assignment for a database
Create create a particular access policy assignment for a database
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

The synopsis/description contains a duplicated word ("Create create"). Please correct the grammar (e.g., "Creates a particular access policy assignment for a database").

Suggested change
Create create a particular access policy assignment for a database
Creates a particular access policy assignment for a database

Copilot uses AI. Check for mistakes.

### [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
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
Create create a particular access policy assignment for a database
Creates a particular access policy assignment for a database.

Copilot uses AI. Check for mistakes.

### [Update-AzRedisEnterpriseCache](Update-AzRedisEnterpriseCache.md)
Updates an existing Redis Enterprise cluster
Update an existing (overwrite/reupdate with potential downtime) cache cluster
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
Update an existing (overwrite/reupdate with potential downtime) cache cluster
Updates an existing cache cluster (overwrite or update with potential downtime).

Copilot uses AI. Check for mistakes.
Comment on lines 1 to 6
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.

```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]]
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Type: Boolean?

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autorest v4 migration pr migrating module from generated by autorest.powershell v3 to v4 Contains Breaking Change This PR contains breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants