Skip to content

Feature Request: err type for dangling referrers index deletion failure #479

@qweeah

Description

@qweeah

If referrer API not supported and referrers need to be updated, oras-go will 1) update the referrer index and 2) cleanup the dangling one.

// 4. delete the dangling original referrers index
if !skipDelete {
if err := s.repo.delete(ctx, oldIndexDesc, true); err != nil {
return fmt.Errorf("failed to delete dangling referrers index %s for referrers tag %s: %w", oldIndexDesc.Digest.String(), referrersTag, err)
}
}

It would be great if oras-go can expose a certain typed error when the cleanup operation fails, so caller client can decide whether to terminate, or ignore the error, or do ad-hoc garbage collection on caller side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions