-
Notifications
You must be signed in to change notification settings - Fork 384
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
ociarchive: Add new ArchiveFileNotFoundError
#2123
Conversation
What's the right place to unit test this? |
Or, to address containers/skopeo#2114 (comment) I guess we could create a new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, to address containers/skopeo#2114 (comment) I guess we could create a new
ImageStructureNotFound
(orImageContainerNotFound
) error or so.
I’d prefer that; ImageNotFound
is explicitly documented not to match this situation
But I'd still want to map that underneath
OpenImageOptional
in skopeo's API.
Sure, that works for me.
de25ba8
to
8b0bb59
Compare
ImageNotFound
if the file isn't presentImageStructureNotFound
627c94a
to
6e50f30
Compare
I’d place it in a new |
6e50f30
to
4bec302
Compare
OK, updated for latest review and added a unit test. |
ImageStructureNotFound
ArchiveFileNotFoundError
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
f134ce2
to
3d335e8
Compare
(Hm, the "PRs must be targeting tip to merge" on this repo is a little surprising) |
This is for containers/skopeo#2114 which is in turn a dependency of coreos/rpm-ostree#4598 Basically I want to map ENOENT to a clear error, because the build tooling wants to treat "target image is not present" differently from "DNS lookup failed" or "we got EPERM". There's a bit of code motion here because we need to move the `os.Open()` call before creating a temporary directory. Signed-off-by: Colin Walters <[email protected]>
3d335e8
to
31d959e
Compare
This is for containers/skopeo#2114
which is in turn a dependency of coreos/rpm-ostree#4598
Basically I want to map ENOENT to a clear error, because the build
tooling wants to treat "target image is not present" differently
from "DNS lookup failed" or "we got EPERM".
There's a bit of code motion here because we need to move
the
os.Open()
call before creating a temporary directory.Signed-off-by: Colin Walters [email protected]