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

[openshift-3.11] dockerclient: detect ENOENT when copying #162

Merged

Conversation

nalind
Copy link
Member

@nalind nalind commented May 19, 2020

This patch rolls up changes from #147, #148, #152, and #153. The latter three aim to be consumable in OpenShift 3.11 to fix https://bugzilla.redhat.com/show_bug.cgi?id=1794768.

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

LGTM assuming happy tests

@rhatdan
Copy link
Contributor

rhatdan commented May 19, 2020

LGTM

nalind and others added 4 commits May 27, 2020 10:10
We modify the Args map member of a Builder object, but we don't make a
copy of the initial value that we're given in NewBuilder() before doing
that, so we end up modifying the map that we're given.  This can be
surprising.

In the dispatcher for ARG instructions, we weren't checking that the map
wasn't nil before attempting to assign values to it, so we could panic.

Fix this by making a fresh map in NewBuilder() and initializing it using
the zero or more values from the passed-in map.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Detect cases where, when filtering the output of archiveFromFile() or
archiveFromContainer() to net only sources which match a source path, we
fail to match anything.  When that happens, return an os.ErrNotExist
error from the archive's Close() method.  The archiveFromContainer()
function now returns a ReadCloser where it previously returned only a
Reader.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
The dockerclient/archive.go had error output with `%w`
when it should have been `%v`.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
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>
@nalind nalind closed this May 27, 2020
@nalind nalind reopened this May 27, 2020
@nalind
Copy link
Member Author

nalind commented May 27, 2020

/override continuous-integration/travis-ci/pr

@nalind
Copy link
Member Author

nalind commented May 27, 2020

/refresh

@rhatdan
Copy link
Contributor

rhatdan commented May 28, 2020

/lgtm

1 similar comment
@mrunalp
Copy link
Member

mrunalp commented May 28, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 28, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrunalp, nalind, rhatdan

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:
  • OWNERS [mrunalp,nalind,rhatdan]

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

1 similar comment
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrunalp, nalind, rhatdan

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:
  • OWNERS [mrunalp,nalind,rhatdan]

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

@nalind
Copy link
Member Author

nalind commented May 28, 2020

/refresh

@openshift-merge-robot openshift-merge-robot merged commit 81fbc29 into openshift:openshift-3.11 May 28, 2020
@nalind nalind deleted the openshift-3.11-enoent branch May 28, 2020 18:48
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. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants