You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem statement: Under the mode of referrers tag schema, when all referrers of a manifest are removed the referrers index is not updated if SkipReferrersGC is toggled to true.
Err: fmt.Errorf("failed to delete dangling referrers index %s for referrers tag %s: %w", oldIndexDesc.Digest.String(), referrersTag, err),
Subject: subject,
}
}
}
returnnil
If there are no referrers (i.e. len(updatedReferrers) == 0), we should remove the referrers index if GC is enabled as the above code does.
However, when GC is disabled / skipped, we need to keep the previous index. In this case, a new index with no manifest should be generated and pushed. Note that the image-spec allows the index to have zero manifests.
The text was updated successfully, but these errors were encountered:
Note
Credits to @qweeah for finding this bug.
Problem statement: Under the mode of referrers tag schema, when all referrers of a manifest are removed the referrers index is not updated if
SkipReferrersGC
is toggled totrue
.Related code:
oras-go/registry/remote/repository.go
Lines 1455 to 1476 in 4a52cfd
If there are no referrers (i.e.
len(updatedReferrers) == 0
), we should remove the referrers index if GC is enabled as the above code does.However, when GC is disabled / skipped, we need to keep the previous index. In this case, a new index with no manifest should be generated and pushed. Note that the
image-spec
allows the index to have zeromanifests
.The text was updated successfully, but these errors were encountered: