Skip to content

Conversation

@samsaha-ms
Copy link

@samsaha-ms samsaha-ms commented Jan 16, 2026


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

Related command

If existing sku is one of enterprise sku like Enterprise_E5 and we want to update to any allowed Azure Managed Redis Sku
az redisenterprise update --name --resource-group --sku ComputeOptimized_X

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.

Copilot AI review requested due to automatic review settings January 16, 2026 15:27
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jan 16, 2026

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

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

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

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 16, 2026

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

@github-actions
Copy link

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>

@github-actions
Copy link

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link

Hi @samsaha-ms

Release Suggestions

Module: redisenterprise

  • Please log updates into to src/redisenterprise/HISTORY.rst
  • Update VERSION to 1.3.1 in src/redisenterprise/setup.py

Notes

Copy link
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 PR adds functionality to handle SKU updates from Enterprise SKUs (like Enterprise_E5) to Azure Managed Redis SKUs (like ComputeOptimized_X5). When updating from Enterprise SKUs to Azure Managed Redis SKUs, the capacity and zones properties must be unset as they are not supported by the new SKU types.

Changes:

  • Added RedisEnterpriseUpdate class with logic to unset capacity and zones during SKU transitions
  • Registered the update command in the command table
  • Added comprehensive test coverage for SKU update scenarios

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
custom.py Implements RedisEnterpriseUpdate class with pre_instance_update hook to unset capacity and zones when transitioning from Enterprise to Azure Managed Redis SKUs
commands.py Registers the custom RedisEnterpriseUpdate command in the command table
_help.py Adds help documentation and usage example for the update command
test_demo.py Adds scenario7 test class and test case for SKU update functionality
example_steps.py Adds step_update helper function and creates a new cluster configuration for SKU update testing

@samsaha-ms
Copy link
Author

@evelyn-ys, could you please help me fixing the lint error due to missing example? I have added it _help.py but it is still flagging.
Also, should I change anything in setup.py to increase minor versions like current 1.3.0 to 1.3.1, as it is treated as bug fix in the redisEnteprirse extension.

@evelyn-ys
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@evelyn-ys
Copy link
Member

@evelyn-ys, could you please help me fixing the lint error due to missing example? I have added it _help.py but it is still flagging. Also, should I change anything in setup.py to increase minor versions like current 1.3.0 to 1.3.1, as it is treated as bug fix in the redisEnteprirse extension.

@kairu-ms Can you help check why the manual help didn't overwrite codegen help successfully for redisenterprise update?

@yonzhan yonzhan requested a review from kairu-ms January 20, 2026 00:27
@kairu-ms
Copy link
Contributor

@evelyn-ys, could you please help me fixing the lint error due to missing example? I have added it _help.py but it is still flagging. Also, should I change anything in setup.py to increase minor versions like current 1.3.0 to 1.3.1, as it is treated as bug fix in the redisEnteprirse extension.

@kairu-ms Can you help check why the manual help didn't overwrite codegen help successfully for redisenterprise update?

For the commands to overwrite, it should be exported in unregistered mode, which will remove the register_command decoration in the aaz code:

 @register_command(
    "redisenterprise update",
)

@samsaha-ms
Copy link
Author

@evelyn-ys, could you please help me fixing the lint error due to missing example? I have added it _help.py but it is still flagging. Also, should I change anything in setup.py to increase minor versions like current 1.3.0 to 1.3.1, as it is treated as bug fix in the redisEnteprirse extension.

@kairu-ms Can you help check why the manual help didn't overwrite codegen help successfully for redisenterprise update?

For the commands to overwrite, it should be exported in unregistered mode, which will remove the register_command decoration in the aaz code:

 @register_command(
    "redisenterprise update",
)

@kairu-ms, I am doing changes in this repo first time, sorry for few follow up queries that may sound novice.

  1. Should we remove this part only or any other changes are required?
  2. There are other commands(example) already existing in the extension which are registered with custom class handlers, but I see the register_command decoration aaz and no lint error for them. And same thing for "redisenterprise update" command we are trying to. Could you please help me in understanding the difference between existing and the one introduced in the PR that requires additional changes that you mentioned?
  3. Is this (the approach in this PR) the correct way to add custom code in az cli command to have additional checks and update properties before calling azure apis?

@samsaha-ms
Copy link
Author

@evelyn-ys, could you please help me fixing the lint error due to missing example? I have added it _help.py but it is still flagging. Also, should I change anything in setup.py to increase minor versions like current 1.3.0 to 1.3.1, as it is treated as bug fix in the redisEnteprirse extension.

@kairu-ms Can you help check why the manual help didn't overwrite codegen help successfully for redisenterprise update?

For the commands to overwrite, it should be exported in unregistered mode, which will remove the register_command decoration in the aaz code:

 @register_command(
    "redisenterprise update",
)

@kairu-ms, I am doing changes in this repo first time, sorry for few follow up queries that may sound novice.

  1. Should we remove this part only or any other changes are required?
  2. There are other commands(example) already existing in the extension which are registered with custom class handlers, but I see the register_command decoration aaz and no lint error for them. And same thing for "redisenterprise update" command we are trying to. Could you please help me in understanding the difference between existing and the one introduced in the PR that requires additional changes that you mentioned?
  3. Is this (the approach in this PR) the correct way to add custom code in az cli command to have additional checks and update properties before calling azure apis?

Was able to resolve it by adding example in aaz registration itself.

@samsaha-ms
Copy link
Author

@evelyn-ys, could you please help me fixing the lint error due to missing example? I have added it _help.py but it is still flagging. Also, should I change anything in setup.py to increase minor versions like current 1.3.0 to 1.3.1, as it is treated as bug fix in the redisEnteprirse extension.

@evelyn-ys Lint error is fixed now. Could you please confirm on any version update required for this or not by updating setup.py?
Also, seems like one validation pipeline is stuck.

@evelyn-ys
Copy link
Member

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

For version update, pls notice this reminder

@evelyn-ys
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants