[redisenterprise] Retarget to 2026-06-01-preview; add migration group; fix migration undo LRO - #10246
Conversation
…enance config, and tests Adds the �z redisenterprise migration command group (start/validate/undo/list/show), --maintenance-config on create/update, and live-recorded tests for the new preview surface (access-string, keyspace events, maintenance config). Retargets generated AAZ models to the 2026-05-01-preview API version and bumps the extension to 1.5.0b1 (preview). The migration validate step is temporarily skipped pending a server-side RP fix (tracked in ADO #38848036 / #38847788); the migration e2e test is marked live_only until a clean recording can be captured. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…LRO; record migration e2e - Regenerate AAZ commands for API 2026-06-01-preview (validate envelope fix). - Fix `migration undo` crash: swagger Migrations_Cancel declares final-state-via: location with no response body, so the generated poller passes a None deserialization callback and azure-core raises "NoneType is not callable" on the non-empty Location body. Override MigrationsCancel in custom.py with a no-op on_200 deserializer (tracked upstream via swagger bug; remove once contract fixed). - Add recorded migration e2e test (validate -> start -> wait -> list -> show -> undo); drop @live_only now that a clean cassette exists. - Trim redundant LRO status-poll entries from all recordings to speed up playback. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Hi Kanchan Joshi (@koderjoker), |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Updates the redisenterprise Azure CLI extension to target the 2026-06-01-preview REST API and releases preview version 1.5.0b1, adding a new az redisenterprise migration command group plus new cluster/database parameters, and introducing a custom override to prevent an LRO deserialization crash in migration undo.
Changes:
- Retargets generated AAZ command layer to 2026-06-01-preview, including new fields like maintenance configuration, keyspace notifications, and access-string support.
- Adds
az redisenterprise migrationcommands (start/validate/undo/list/show/wait) plus tests/recordings for migration and new parameters. - Overrides generated LRO behavior for migration undo to avoid a
NoneTypedeserializer crash on successful completion.
Reviewed changes
Copilot reviewed 51 out of 58 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/redisenterprise/setup.py | Bumps extension version to 1.5.0b1. |
| src/redisenterprise/HISTORY.rst | Adds 1.5.0b1 release notes for new API/commands/parameters. |
| src/redisenterprise/azext_redisenterprise/tests/latest/test_migration.py | New scenario test for migration validate/start/wait/list/show/undo flow. |
| src/redisenterprise/azext_redisenterprise/tests/latest/test_migration_flatten_args.py | Offline unit tests for migration start flattening override. |
| src/redisenterprise/azext_redisenterprise/tests/latest/test_maintenance_config.py | New scenario test validating maintenance configuration on create/update. |
| src/redisenterprise/azext_redisenterprise/tests/latest/test_database_keyspace.py | New scenario test for --notify-keyspace-events behavior. |
| src/redisenterprise/azext_redisenterprise/tests/latest/test_access_policy_access_string.py | New scenario test for --access-string on access policy assignments. |
| src/redisenterprise/azext_redisenterprise/tests/latest/recordings/test_redisenterprise_maintenance_config.yaml | New recording for maintenance configuration scenario. |
| src/redisenterprise/azext_redisenterprise/custom.py | Adds migration start flattening + migration undo LRO fix; wires maintenance configuration through create. |
| src/redisenterprise/azext_redisenterprise/commands.py | Registers migration start/undo custom command implementations. |
| src/redisenterprise/azext_redisenterprise/azext_metadata.json | Marks the extension as preview via azext.isPreview. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/operation_status/_show.py | Retargets operation status show to 2026-06-01-preview. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/migration/_wait.py | Adds generated migration wait command for the new group. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/migration/_validate.py | Adds generated migration validate command with flat ARM-correct body. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/migration/_undo.py | Adds generated migration undo command (LRO declared final-state-via location). |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/migration/_start.py | Adds generated migration start command (LRO). |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/migration/_show.py | Adds generated migration show command. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/migration/_list.py | Adds generated migration list command (paging). |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/migration/init.py | Exposes generated migration commands via package init. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/migration/__cmd_group.py | Registers the redisenterprise migration command group. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_wait.py | Retargets API version and extends schema (e.g., accessString/systemData). |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_update.py | Adds --access-string support and retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_show.py | Retargets API version and extends schema for new fields. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_list.py | Retargets API version and extends schema for new fields. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_delete.py | Retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/access_policy_assignment/_create.py | Adds --access-string support and retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_wait.py | Retargets API version and adds notifyKeyspaceEvents to schema. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_upgrade_db_redis_version.py | Retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_update.py | Adds --notify-keyspace-events support and retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_show.py | Retargets API version and adds notifyKeyspaceEvents to schema. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_regenerate_key.py | Retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_list.py | Retargets API version and adds notifyKeyspaceEvents to schema. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_list_keys.py | Retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_import.py | Switches SAS URI args to password-type inputs and retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_force_unlink.py | Retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_force_link_to_replication_group.py | Retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_flush.py | Retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_export.py | Switches SAS URI to password-type input (with prompt) and retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_delete.py | Retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_create.py | Adds --notify-keyspace-events support and retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_wait.py | Retargets API version and extends schema (maintenanceConfiguration/systemData, etc.). |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_update.py | Adds maintenance configuration support and retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_show.py | Retargets API version and extends schema (maintenanceConfiguration/systemData, etc.). |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_list.py | Retargets API version and extends schema (maintenanceConfiguration/systemData, etc.). |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_list_skus_for_scaling.py | Retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_delete.py | Retargets API version. |
| src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_create.py | Adds maintenance configuration support and retargets API version. |
| src/redisenterprise/azext_redisenterprise/_params.py | Adds --maintenance-config/--maintenance-configuration argument wiring and help text. |
Suppressed comments (1)
src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/database/_import.py:190
sas_urisis a list of SAS URIs (secrets). The request content builder currently serializes them withoutsecretflags, unlike theexportcommand which marks its SAS URI as secret. This can cause SAS tokens to be written into logs/recordings and surfaced in debug output.
def content(self):
_content_value, _builder = self.new_content_builder(
self.ctx.args,
typ=AAZObjectType,
typ_kwargs={"flags": {"required": True, "client_flatten": True}}
)
_builder.set_prop("sasUris", AAZListType, ".sas_uris", typ_kwargs={"flags": {"required": True}})
sas_uris = _builder.get(".sasUris")
if sas_uris is not None:
sas_uris.set_elements(AAZStrType, ".")
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
f970f15 to
f11a759
Compare
- Add examples to migration start/validate/undo commands (missing_command_example) - Backtick-wrap KEK example URL in create params (broken_site_link_from_parameter) - Re-record all recorded tests (demo scenarios 1-7, maintenance-config, notify-keyspace-events, access-string, test-connection) in centralindia Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
- Assert migration validate returns isValid == True (was exists-only) - Assert migration undo rolls back to provisioningState == Cancelled via a follow-up migration show - Re-record migration e2e to capture the post-undo show interaction Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
The import command's content builder serialized sasUris list elements without the secret flag, unlike export's sasUri. This could surface SAS tokens in debug logs/recordings. Add secret flag to match export. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e73a11f1-4d3e-4200-8c68-4fed583a2c42
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Upstream CI
All upstream CI checks passed (30/30 completed, 0 failed).
Test validation
- Live test: Failed with conclusion
failure. Workflow run - Regression coverage: Not applicable to the changed files.
The live-test workflow run failed for this PR's changed test files (run: https://github.com/Azure/issue-sentinel/actions/runs/33479757485). This appears PR-related: the changes retarget the redisenterprise extension to API version 2026-06-01-preview, add a new migration group, and modify migration undo LRO handling, and the failing live test exercises the same redisenterprise scenarios/migration code paths. Recommended next action: inspect the live-test run logs for the specific assertion or recording mismatch, update the affected recording(s) if the API behavior legitimately changed, and re-dispatch the live test after the fix.
Repository policy findings
- Generated code ownership checker (blocking) —
src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_create.py:22,src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_delete.py:23,src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_list.py:22,src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_list_skus_for_scaling.py:25,src/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_show.py:22and 31 more location(s): A generated file changed without an open or mergedAzure/aazpull request containing the durable command-model change.
Remediation: Make the durable command-model change in Azure/aaz, link that PR in this description, then regenerate the downstreamaaz/<profile>output.
Verify: Regenerate from a clean checkout and confirm the resulting diff contains this change and the linked source PR is open or merged.
Risk assessment
100/100 · Critical · High confidence
The Critical rating is driven by security-sensitive behavior, public CLI behavior, dependency or supply chain and 2 additional signal(s).
- Change scope: 62 changed files, 32321 changed lines (
+23146/-9175), including 40 production files. - Affected components:
redisenterprise - Risk drivers: security-sensitive behavior (+28); public CLI behavior (+18); dependency or supply chain (+18); failure-handling behavior (+12); generated output (+12)
- Regression evidence: Changed regression tests are included, reducing risk.
- Confidence: High because changed-line patches were available for every production file.
- Required review: Owning-squad review is required for
redisenterprisebefore merge.
Migration start/validate/undo examples now come from the Azure/aaz command model instead of hand-edited docstrings, so a clean regen reproduces them. Also reverts the manual _import.py sasUris secret flag, which the CLI codegen cannot emit for password arrays and is out of scope for this PR; the sasUris input arg remains password-typed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e73a11f1-4d3e-4200-8c68-4fed583a2c42
|
/azp run |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
🤖 PR Validation —⚠️ Review suggested
Description
Updates the
redisenterpriseextension to REST API 2026-06-01-preview and ships preview version1.5.0b1. Adds the newaz redisenterprise migrationcommand group, cluster maintenance configuration, keyspace-notification and access-string parameters, and fixes a generated-client LRO crash onmigration undo.What changed
2026-06-01-preview. This API fixes the migration validate action so the request body is ARM-correct (flat, no server-sidepropertiesenvelope), matching the companionAzure/aazmodel PR.az redisenterprise migrationgroup:start(flat source args--source-resource-id,--skip-data-migration,--switch-dns,--force-migrate),validate,undo,list,show,wait.--maintenance-config/--maintenance-configurationoncreate/update;--notify-keyspace-eventsondatabase create;--access-stringondatabase access-policy-assignment create/update.undoLRO fix: swaggerMigrations_Canceldeclaresfinal-state-via: locationwith no response body, so the generated poller passes aNonedeserialization callback and azure-core raisesTypeError: 'NoneType' object is not callableon the non-emptyLocationbody.custom.pyoverridesMigrationsCancelwith a no-opon_200deserializer. Tracked by ADO #39377077 (swagger should useazure-async-operation); the override should be removed once the contract is fixed.validate -> start -> wait -> list -> show -> undo) and dropped@live_only; trimmed redundant LRO status-poll entries from all recordings to cut CI playback time (~3.6x faster locally).Testing
azdev test redisenterprise: 13 passed, 1 skipped (skip =test_test_connection, live-only).azdev style redisenterprise: PASSED;azdev linter --include-whl-extensions redisenterprise: PASSED.python scripts/ci/test_index.py -q: OK.Dependency
Requires the AAZ model PR Azure/aaz#1070 (branch
redisenterprise-2026-06-preview), which must merge first.Related command
az redisenterprise migration start|validate|undo|list|show|wait;az redisenterprise create|update(--maintenance-config);az redisenterprise database create(--notify-keyspace-events);az redisenterprise database access-policy-assignment create|update(--access-string)General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install azdevrequired)For new extensions:
About Extension Publish
Version updated in
setup.py(1.5.0b1) andHISTORY.rst;src/index.jsonis intentionally left unmodified (updated automatically post-merge).