Repository navigation
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Please fix CI issues |
Production MI validation — 2026-10-12Validated commit
The dropped test backups remain under their configured retention; they were not purged. Use the original textual Still blocked: this MI reports immutability These were live smoke checks, not newly captured/re-recorded scenario cassettes. Existing recording refresh and standard full-module validation remain outstanding; keep this PR in draft. No implementation changes were required by the supported-path checks. |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Related command
az sql db str-policy set,show, andwaitaz sql midb short-term-retention-policy setandshow(live and restorable dropped databases)Description
Add short-term backup immutability support using
2026-08-01-preview, matching the behavior in Azure/azure-powershell#30215.--lock-immutabilityand--yes/-yto both set commands. Onlytrueprompts, with an irreversible-action warning. Cancellation sends no update and emits no result; non-interactive callers must use--yeswhen locking.--lock-immutabilitytogether with--deleted-time, including explicitfalse, and never include that property in a dropped MI database request.immutabilityStatuson set/show for SQL Database and live/dropped MI databases while preserving flattened CLI output.--ids, SQL DB wait, and--no-waitbehavior.azure-mgmt-sql==4.0.0b22unchanged. The referenced https://pypi.org/project/azure-mgmt-sql/5.0.0b2/ introduces hybrid models and unrelated breaking changes; a whole-module SDK migration is deliberately out of scope.Draft / before marking ready
test_sql_managed_db_short_retentionagainst2026-08-01-previewand addtest_sql_managed_db_short_retention_immutability; both MI scenarios passed live and in offline playback.--yes, live/dropped policy reads, and service rejection of unlocking and retention reductions. Test-created databases were cleaned up; MI configuration and all seven pre-existing databases were unchanged.test_sql_db_short_term_retentionand complete SQL Database (non-MI) live validation. Its old API recording has not been refreshed.Known backend response discrepancy
The MI operation-result endpoint can report
immutabilityStatus: Disabledafter successful locking while the database policy GET reportsLocked. A separate diagnostic observed this mismatch across 24 paired reads over approximately 144 seconds. Per the agreed scope, locking tests poll only the database policy GET every five seconds (300-second timeout), then assert status and retention throughshow. They do not assert immutability status on the SET operation-result response. This backend issue is being investigated separately; no fixed delay or readback workaround was added to the CLI implementation.Testing Guide
Validated with edited CLI/core source and installed Azure CLI libraries (Python 3.14.6):
--yes, locked readback, retention increase, rejection of retention decrease and unlock, and locked dropped-database validation.git diff --check: passed.To replay in a configured developer checkout:
python -m unittest azure.cli.command_modules.sql.tests.latest.test_sql_str_policy azure.cli.command_modules.sql.tests.latest.test_sql_mi_str_policyFor live recording, see
src/azure-cli/azure/cli/command_modules/sql/tests/latest/README.md. An explicitAZURE_CLI_TEST_SQL_MI_RESOURCE_IDis required; irreversible locking additionally requiresAZURE_CLI_TEST_SQL_MI_ALLOW_IMMUTABILITY_LOCK=true. These scenarios never create, modify or delete the MI or resource group; they create and clean up only randomized databases. Do not run the entire SQL suite live against a shared instance.Earlier West Europe smoke results used a target where locking was unavailable. The later successful feature-enabled MI recordings supersede that MI locking blocker. Locked test backups remain under their configured retention; they were not purged.
History Notes
[SQL]
az sql db str-policy: Add short-term backup immutability locking with confirmation and expose immutability status[SQL]
az sql midb short-term-retention-policy: Add immutability locking for live databases and expose status for live and dropped databasesThis checklist is used to make sure that common guidelines for a pull request are followed.