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

support dry-run for cp command #10235

Merged
merged 2 commits into from Feb 3, 2023
Merged

support dry-run for cp command #10235

merged 2 commits into from Feb 3, 2023

Conversation

glours
Copy link
Contributor

@glours glours commented Feb 3, 2023

Signed-off-by: Guillaume Lours 705411+glours@users.noreply.github.com

What I did
Add support of dry-run mode for cp command

Related issue
https://docker.atlassian.net/browse/ENV-53

(not mandatory) A picture of a cute animal, if possible in relation to what you did
image

@glours glours self-assigned this Feb 3, 2023
@glours glours marked this pull request as ready for review February 3, 2023 11:54
@glours glours requested review from a team, nicksieger, ndeloof, StefanScherer, ulyssessouza, milas and laurazard and removed request for a team February 3, 2023 11:54
@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Base: 72.79% // Head: 73.89% // Increases project coverage by +1.10% 🎉

Coverage data is based on head (fdc1738) compared to base (bf0ed9a).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##               v2   #10235      +/-   ##
==========================================
+ Coverage   72.79%   73.89%   +1.10%     
==========================================
  Files           2        2              
  Lines         272      272              
==========================================
+ Hits          198      201       +3     
+ Misses         62       60       -2     
+ Partials       12       11       -1     
Impacted Files Coverage Δ
pkg/e2e/framework.go 72.15% <0.00%> (+1.17%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@glours glours requested a review from ndeloof February 3, 2023 15:21
pkg/compose/cp.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ndeloof ndeloof left a comment

Choose a reason for hiding this comment

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

LGTM

return nil, moby.ContainerPathStat{}, ErrNotImplemented
rc := io.NopCloser(strings.NewReader(""))
if _, err := d.ContainerStatPath(ctx, container, srcPath); err != nil {
return rc, moby.ContainerPathStat{}, fmt.Errorf(" %s Could not find the file %s in container %s", DRYRUN_PREFIX, srcPath, container)
Copy link
Member

Choose a reason for hiding this comment

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

I was going to suggest s/file/path but then realized this text comes from moby/moby 🙈

pkg/api/dryrunclient.go Show resolved Hide resolved
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
…oth way)

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
@glours glours enabled auto-merge February 3, 2023 21:46
@glours glours merged commit 23585b9 into docker:v2 Feb 3, 2023
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.

None yet

3 participants