Closed mispencer closed 1 year ago
@mispencer thanks for reporting the issue. The digest in example-impacted-tag-manifest.txt is a92b06bbd34b3505478caf3de4af1f6d30ab88287a6c2bf17434f6bd501aa630. However, I don't see it in acr-purge.log. Do you have other example to share?
That's correct - the top level manifest isn't being removed. However, what is being removed is the second level manifests, which would be sha256:a34f1355da7317481060fafaabc3e8509f9c2496150b4852780b7fd92d355d73
and sha256:8c45edf022a7e690d08290a61800615afb5146e66db96a16138b6149c69b4ad8
in the original example manifest.
@mispencer can I know the media type of the top-level manifest? Is it application/vnd.docker.distribution.manifest.list.v2+json
or application/vnd.oci.image.index.v1+json
?
We now understand the root cause of the issue. acr purge
command doesn't recognize oci index media type to handle multi-arch image deletion. We are working with the community to publish a fix soon.
@mispencer We have a hot fix for this issue. For now, we can change the purge command as following to solve this issue.
PURGE_CMD="mcr.microsoft.com/acr/acr-cli:0.7 purge --filter 'hello-world:.*' \
--ago 7d"
az acr task create --name purgeTask \
--cmd "$PURGE_CMD" \
--schedule "0 0 * * *" \
--registry myregistry \
--context /dev/null
Closing as this issue is now inactive for over 7 days. Thanks!
Describe the bug
acr purge
is purging manifests that belong to tags it isn't purgingTo Reproduce Steps to reproduce the behavior:
Expected behavior Manifests belong to non-purged tags should not be removed
Additional context See attached redacted log and an example impacted tag's manifest. This log is from running
acr purge --ago 21d --filter 'YYYYYYYYYY:.*' --untagged
today (1/26/2023) acr-purge.log example-impacted-tag-manifest.txtIf non-redacted logs or other such information would be helpful, I could provide by another channel.