[Redisenterprise] az redisenterprise database wait: Fix schema buiding issue#9654
[Redisenterprise] az redisenterprise database wait: Fix schema buiding issue#9654ReaNAiveD wants to merge 1 commit intoAzure:mainfrom
az redisenterprise database wait: Fix schema buiding issue#9654Conversation
The cluster-level Wait command (from .aaz.latest.redisenterprise) was imported as _DatabaseWait, overwriting the earlier database-level Wait import (from .aaz.latest.redisenterprise.database). This caused the DatabaseWait class to inherit from the cluster-level Wait instead of the database-level Wait, so the customization logic in _build_arguments_schema operated on a non-existing database_name parameter schema. Rename the cluster-level import alias from _DatabaseWait to _ClusterWait to match the naming convention of its sibling imports (_ClusterList, _ClusterShow).
❌Azure CLI Extensions Breaking Change Test
|
|
Hi @ReaNAiveD, |
|
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 |
There was a problem hiding this comment.
Pull request overview
Fixes an import alias collision in the redisenterprise extension that caused az redisenterprise database wait to inherit the wrong AAZ base command class, breaking _build_arguments_schema customization for database_name.
Changes:
- Renamed the cluster-level
Waitimport alias from_DatabaseWaitto_ClusterWaitto avoid overwriting the database-level_DatabaseWait.
| from .aaz.latest.redisenterprise import List as _ClusterList | ||
| from .aaz.latest.redisenterprise import Show as _ClusterShow | ||
| from .aaz.latest.redisenterprise import Wait as _DatabaseWait | ||
| from .aaz.latest.redisenterprise import Wait as _ClusterWait |
There was a problem hiding this comment.
_ClusterWait is imported but not referenced anywhere in this module. If azdev style/pylint is run, this will typically trigger an unused-import failure. Consider removing this import, or explicitly suppressing the warning only if it’s intentionally kept for side effects (which would be unusual for an import from the AAZ command layer).
| from .aaz.latest.redisenterprise import Wait as _ClusterWait |
|
Hi @ReaNAiveD Release SuggestionsModule: redisenterprise
Notes
|
The cluster-level Wait was imported as
_DatabaseWait, overwriting the database-level Wait import. This causedDatabaseWaitto inherit the wrong base class, making its_build_arguments_schemacustomization operate on a non-existing database_name parameter.Renamed the alias to
_ClusterWaitto match sibling imports (_ClusterList,_ClusterShow).This fix is to unblock the Test Extension Loading pipeline step which are sensitive to import resolution order.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az redisenterprise database wait --helpGeneral 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.