docs(acr purge): document --include-locked parameter (acr-cli ≥ 0.17)#159
docs(acr purge): document --include-locked parameter (acr-cli ≥ 0.17)#159estebanreyl wants to merge 6 commits into
Conversation
acr purge now supports the --include-locked parameter, which unlocks tags and manifests whose write-enabled or delete-enabled attribute is false before deleting them. Update the auto-purge doc to correct the prior note that stated locked artifacts are never purged, and add the parameter to the optional parameters list.
- auto-purge: note that --include-locked is available beginning with acr-cli:0.17. - image-lock: note that locking doesn't protect an image from acr purge --include-locked, which unlocks artifacts before deleting.
- image-lock: reword the note to make clear that locking does protect an artifact until an authorized identity removes the lock; acr purge --include-locked disables the attributes before deleting rather than bypassing protection. - auto-purge: add a CAUTION that --include-locked disables write/delete protection on all matching artifacts, deletes unrecoverably, and to use --dry-run first.
Fold the version-availability sentence into the --include-locked bullet and remove the standalone note; trim the caution block.
Relocate the note to the Unlock section, stop reintroducing what a lock is, and clarify that acr purge automatically unlocks matching tags or manifests before deleting them when it has sufficient permissions.
|
@estebanreyl : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit 33fdb64: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Can you review the proposed changes? Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
|
@estebanreyl : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
There was a problem hiding this comment.
Pull request overview
Updates Azure Container Registry documentation to reflect acr purge support for the --include-locked parameter (acr-cli ≥ 0.17), including behavior and safety guidance when purging locked artifacts.
Changes:
- Documented
--include-lockedin theacr purgeoptional parameters list, with minimum acr-cli version information. - Added/expanded guidance explaining that locked artifacts are skipped by default and can be unlocked+deleted when
--include-lockedis used. - Added a caution callout warning that
--include-lockedoverrides locking protections and recommending--dry-run.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| articles/container-registry/container-registry-image-lock.md | Adds a note explaining that acr purge --include-locked can unlock and delete locked artifacts, linking to auto-purge guidance. |
| articles/container-registry/container-registry-auto-purge.md | Documents --include-locked behavior, minimum acr-cli version, and adds a caution about unrecoverable deletion when overriding locks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Learn Build status updates of commit 5d09f7f: ✅ Validation status: passed
For more details, please refer to the build report. |
Summary
acr purgesupports the--include-lockedparameter, which purges tags and manifests even when theirwrite-enabledordelete-enabledattribute is set tofalse. For each matching locked artifact, the command unlocks it with said flag (sets both attributes back totrue) before deleting it. The parameter is available beginning withmcr.microsoft.com/acr/acr-cli:0.17.Changes
Added
--include-lockedto the optional parameters list, with a version note.Why
This flag has been supported for a while, but we forgot to update the public docs. The acr-cli docs document the flag here: https://github.com/Azure/acr-cli#include-locked-flag
Validation
I double checked by verifying end-to-end against a live registry for both code paths (locked tag and locked untagged manifest): without the flag the locked artifact is skipped; it, the artifact is unlocked, then deleted. This also matches our docs on the acr-cli repo.