Skip to content

Fix pruneEol not deleting expired images due to oras output format change#2046

Merged
lbussell merged 1 commit intodotnet:mainfrom
gdams:main
Mar 24, 2026
Merged

Fix pruneEol not deleting expired images due to oras output format change#2046
lbussell merged 1 commit intodotnet:mainfrom
gdams:main

Conversation

@gdams
Copy link
Member

@gdams gdams commented Mar 24, 2026

fixes #2045

Newer versions of oras changed the discover --format json output to use a referrers property instead of manifests. OrasDiscoverData only had a Manifests property, so deserialization always produced null and HasExpiredEol returned false for every image.

Add a Referrers property to OrasDiscoverData and fall back to it when Manifests is null, supporting both old and new oras output formats.

This breaking change was made in https://github.com/oras-project/oras/releases/tag/v1.3.0:

Screenshot 2026-03-24 at 10 00 43

…ange

Newer versions of oras changed the `discover --format json` output to use
a `referrers` property instead of `manifests`. OrasDiscoverData only had
a `Manifests` property, so deserialization always produced null and
HasExpiredEol returned false for every image.

Add a `Referrers` property to OrasDiscoverData and fall back to it when
`Manifests` is null, supporting both old and new oras output formats.
Copy link
Member

@lbussell lbussell left a comment

Choose a reason for hiding this comment

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

Good catch.

This is also a compelling reason to complete the migration to the ORAS .NET library sooner rather than later: #1318

@lbussell lbussell merged commit bf3ca99 into dotnet:main Mar 24, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pruneEol action deletes 0 images due to oras discover output format change

2 participants