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

archiveFromContainer(): return possibly-wrapped os.IsNotError #153

Merged
merged 1 commit into from
Mar 17, 2020

Conversation

nalind
Copy link
Member

@nalind nalind commented Mar 16, 2020

When a source specified as a glob can't be found, return an error that can be identified by as an os.ErrIsNotExist, wrapped or otherwise, even if we have to drop the glob from the error string to ensure that for versions of Go that don't wrap errors.

Unit tests for the dockerclient package were failing with Go 1.12 without this patch. See the 1.13 release note on the use of the %w format specifier.

When a source specified as a glob can't be found, return an error that
can be identified by as an os.ErrIsNotExist, wrapped or otherwise, even
if we have to drop the glob from the error string to ensure that for
versions of Go that don't wrap errors.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nalind

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 16, 2020
@rhatdan
Copy link
Contributor

rhatdan commented Mar 16, 2020

It is probably time we drop go 1.12.1...
But LGTM

@rhatdan
Copy link
Contributor

rhatdan commented Mar 16, 2020

@TomSweeneyRedHat @bparees PTAL

@TomSweeneyRedHat
Copy link
Contributor

Thanks @nalind. I looked for %w over the weekend, but had didn't run across it via google. This is a neat solution, thx for the pointers.

@TomSweeneyRedHat
Copy link
Contributor

and forgot.
LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants