Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oci/layout.NewReference (and others?) doesn’t document the image=="" special case #2679

Open
mtrmac opened this issue Jan 9, 2025 · 0 comments
Labels
kind/bug A defect in an existing functionality (or a PR fixing it)

Comments

@mtrmac
Copy link
Collaborator

mtrmac commented Jan 9, 2025

… meaning that callers who intend to submit an image reference, and don’t specifically filter out "", get unexpected behavior.

At least, document this special case (and perhaps audit other NewReference* functions for possible other instances of this).

Arguably:

  • NewIndexReference should be modified to actually reject an “N/A” index value <0
  • NewTagReference should be added, where passing "" is an error.
@mtrmac mtrmac added the kind/bug A defect in an existing functionality (or a PR fixing it) label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A defect in an existing functionality (or a PR fixing it)
Projects
None yet
Development

No branches or pull requests

1 participant