-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Labels
Description
The cleanAcrImages --action pruneEol command always reports 0 deleted images, even when lifecycle referrer artifacts with expired EOL dates exist and are properly attached to image manifests.
Root Cause
Newer versions of oras changed the JSON output format of oras discover --format json. The output now uses a referrers property instead of manifests:
{
"reference": "registry.azurecr.io/repo@sha256:...",
"referrers": [
{
"artifactType": "application/vnd.microsoft.artifact.lifecycle",
"annotations": {
"vnd.microsoft.artifact.lifecycle.end-of-life.date": "2025-09-08"
}
}
]
}OrasDiscoverData only defines a Manifests property:
public class OrasDiscoverData
{
public List<Oci.Manifest>? Manifests { get; set; }
}
Since the JSON key is referrers, Manifests always deserializes as null. This causes LifecycleAnnotationExists to return false for every manifest, so HasExpiredEol never identifies any image as expired.
Steps to Reproduce
- Attach lifecycle EOL annotations to images using oras attach
- Wait for the EOL date + age threshold to pass
- Run cleanAcrImages --action pruneEol --age
- Observe Total images deleted: 0 in the summary, despite expired EOL annotations being present
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done