Skip to content

[redisenterprise] Retarget to 2026-06-01-preview; add migration group; fix migration undo LRO - #10246

Open
Kanchan Joshi (koderjoker) wants to merge 7 commits into
Azure:mainfrom
koderjoker:redisenterprise-2026-06-preview
Open

[redisenterprise] Retarget to 2026-06-01-preview; add migration group; fix migration undo LRO#10246
Kanchan Joshi (koderjoker) wants to merge 7 commits into
Azure:mainfrom
koderjoker:redisenterprise-2026-06-preview

Conversation

@koderjoker

@koderjoker Kanchan Joshi (koderjoker) commented Aug 24, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes
⚠️ None
⚠️Azure CLI Extensions Breaking Change Test
⚠️redisenterprise
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd redisenterprise create cmd redisenterprise create added parameter maintenance_configuration
⚠️ 1006 - ParaAdd redisenterprise database access-policy-assignment create cmd redisenterprise database access-policy-assignment create added parameter access_string
⚠️ 1006 - ParaAdd redisenterprise database access-policy-assignment update cmd redisenterprise database access-policy-assignment update added parameter access_string
⚠️ 1006 - ParaAdd redisenterprise database create cmd redisenterprise database create added parameter notify_keyspace_events
⚠️ 1008 - ParaPropAdd redisenterprise database export cmd redisenterprise database export update parameter sas_uri: added property nargs=?
⚠️ 1010 - ParaPropUpdate redisenterprise database export cmd redisenterprise database export update parameter sas_uri: updated property aaz_type from string to AAZPasswordArg
⚠️ 1010 - ParaPropUpdate redisenterprise database export cmd redisenterprise database export update parameter sas_uri: updated property type from string to Password
⚠️ 1010 - ParaPropUpdate redisenterprise database import cmd redisenterprise database import update parameter sas_uris: updated property type from List<String> to List<Password>
⚠️ 1006 - ParaAdd redisenterprise database update cmd redisenterprise database update added parameter notify_keyspace_events
⚠️ 1011 - SubgroupAdd redisenterprise migration sub group redisenterprise migration added
⚠️ 1006 - ParaAdd redisenterprise update cmd redisenterprise update added parameter maintenance_configuration

Description

Updates the redisenterprise extension to REST API 2026-06-01-preview and ships preview version 1.5.0b1. Adds the new az redisenterprise migration command group, cluster maintenance configuration, keyspace-notification and access-string parameters, and fixes a generated-client LRO crash on migration undo.

What changed

  • API retarget: regenerated all AAZ commands for 2026-06-01-preview. This API fixes the migration validate action so the request body is ARM-correct (flat, no server-side properties envelope), matching the companion Azure/aaz model PR.
  • New az redisenterprise migration group: start (flat source args --source-resource-id, --skip-data-migration, --switch-dns, --force-migrate), validate, undo, list, show, wait.
  • New parameters: --maintenance-config/--maintenance-configuration on create/update; --notify-keyspace-events on database create; --access-string on database access-policy-assignment create/update.
  • Migration undo LRO fix: 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 TypeError: 'NoneType' object is not callable on the non-empty Location body. custom.py overrides MigrationsCancel with a no-op on_200 deserializer. Tracked by ADO #39377077 (swagger should use azure-async-operation); the override should be removed once the contract is fixed.
  • Tests/recordings: added recorded migration e2e (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

  • 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 azdev required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

Version updated in setup.py (1.5.0b1) and HISTORY.rst; src/index.json is intentionally left unmodified (updated automatically post-merge).

Kanchan Joshi and others added 3 commits August 23, 2026 11:08
…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>
Copilot AI lite review requested due to automatic review settings August 24, 2026 05:26
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Kanchan Joshi (@koderjoker),
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 pyproject.toml (or setup.py, if the extension has not migrated yet) as well.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

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.

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 migration commands (start/validate/undo/list/show/wait) plus tests/recordings for migration and new parameters.
  • Overrides generated LRO behavior for migration undo to avoid a NoneType deserializer 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_uris is a list of SAS URIs (secrets). The request content builder currently serializes them without secret flags, unlike the export command 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.

Comment thread src/redisenterprise/HISTORY.rst
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

- 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>
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

@x-engineering-agent x-engineering-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Kanchan Joshi (@koderjoker)

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

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 redisenterprise before 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
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

Auto-Assign Auto assign by bot Redis Enterprise X Engineering Agent Reviewed Pull request reviewed by X Engineering Agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants