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

Improve documentation of ResolveReference #2170

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

mtrmac
Copy link
Collaborator

@mtrmac mtrmac commented Nov 2, 2023

  • Document the error returned if image is not found
  • Also document it for the internal resolveImage, to record the commitment
  • Update the deprecation comments to warn about the error return value change

Thanks to @flouthoc for demonstrating the need for this documentation.

Possible alternatives:

  • Don’t change the error type; continue using c/storage.ErrImageUnknown for the new ResolveReference
  • Define a new c/image error type; the current c/image/storage.ErrNoSuchImage is an alias for c/storage.ErrNotAnImage, which is really a different error cause.
  • Possibly both? Define a new c/image error type, as an alias to c/storage.ErrImageUnknown.

- Document the error returned if image is not found
- Also document it for the internal resolveImage, to record
  the commitment
- Update the deprecation comments to warn about the error
  return value change

Signed-off-by: Miloslav Trmač <[email protected]>
Copy link
Contributor

@flouthoc flouthoc left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

LGTM

@vrothberg vrothberg merged commit 4f9a252 into containers:main Nov 3, 2023
9 checks passed
@mtrmac mtrmac deleted the ResolveNames-errors branch November 3, 2023 15:15
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.

3 participants