-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Unset capacity and zones while updating sku from enterprise to azure mananaged redis skus as they don't support the property #9529
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
base: main
Are you sure you want to change the base?
Conversation
️✔️Azure CLI Extensions Breaking Change Test
|
|
Hi @samsaha-ms, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
CodeGen Tools Feedback CollectionThank 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 |
|
Hi @samsaha-ms Release SuggestionsModule: redisenterprise
Notes
|
There was a problem hiding this 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
RedisEnterpriseUpdateclass 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 |
|
@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. |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
@kairu-ms Can you help check why the manual help didn't overwrite codegen help successfully for |
For the commands to overwrite, it should be exported in unregistered mode, which will remove the |
@kairu-ms, I am doing changes in this repo first time, sorry for few follow up queries that may sound novice.
|
Was able to resolve it by adding example in aaz registration itself. |
@evelyn-ys Lint error is fixed now. Could you please confirm on any version update required for this or not by updating setup.py? |
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
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)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.jsonautomatically.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.