Add slash to directory path if copying > 1 file
ClosedPublic

Authored by thcipriani on Jul 19 2018, 4:42 PM.

Details

Reviewers
dduvall
Group Reviewers
Release-Engineering-Team
Commits
rGBLBRaba163aa5a76: Add slash to directory path if copying > 1 file
Patch without arc
git checkout -b D1080 && curl -L https://phabricator.wikimedia.org/D1080?download=true | git apply
Summary

Ran into a Docker error when attempting to build a node project with
more than one requirements files:

When using COPY with more than one source file, the destination must
be a directory and end with a /

Diff Detail

Repository
rGBLBR Blubber
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
thcipriani created this revision.Jul 19 2018, 4:42 PM
Restricted Application added a reviewer: Release-Engineering-Team. · View Herald TranscriptJul 19 2018, 4:42 PM
Restricted Application added a project: Release-Engineering-Team. · View Herald Transcript
thcipriani requested review of this revision.Jul 19 2018, 4:42 PM
thcipriani updated this revision to Diff 2834.Jul 19 2018, 5:08 PM

Fix comments

dduvall requested changes to this revision.Jul 25 2018, 8:21 PM

Looks like there are some failing Docker specific tests:

?   	phabricator.wikimedia.org/source/blubber	[no test files]
ok  	phabricator.wikimedia.org/source/blubber/build	(cached)
ok  	phabricator.wikimedia.org/source/blubber/config	(cached)
--- FAIL: TestCopy (0.00s)
	assertions.go:237: 
                        
	Error Trace:	instructions_test.go:40
		
	Error:		Not equal: "COPY [\"foo1\", \"foo2\", \"bar\"]\n" (expected)
			        != "COPY [\"foo1\", \"foo2\", \"bar/\"]\n" (actual)
		
--- FAIL: TestCopyAs (0.00s)
    --- FAIL: TestCopyAs/with_Copy (0.00s)
    	assertions.go:237: 
                        
	Error Trace:	instructions_test.go:51
    		
	Error:		Not equal: "COPY --chown=123:124 [\"foo1\", \"foo2\", \"bar\"]\n" (expected)
    			        != "COPY --chown=123:124 [\"foo1\", \"foo2\", \"bar/\"]\n" (actual)
    		
    --- FAIL: TestCopyAs/with_CopyFrom (0.00s)
    	assertions.go:237: 
                        
	Error Trace:	instructions_test.go:61
    		
	Error:		Not equal: "COPY --chown=123:124 --from=foo [\"foo1\", \"foo2\", \"bar\"]\n" (expected)
    			        != "COPY --chown=123:124 --from=foo [\"foo1\", \"foo2\", \"bar/\"]\n" (actual)
    		
--- FAIL: TestCopyFrom (0.00s)
	assertions.go:237: 
                        
	Error Trace:	instructions_test.go:72
		
	Error:		Not equal: "COPY --from=foo [\"foo1\", \"foo2\", \"bar\"]\n" (expected)
			        != "COPY --from=foo [\"foo1\", \"foo2\", \"bar/\"]\n" (actual)
		
--- FAIL: TestEscapeCopy (0.00s)
	assertions.go:237: 
                        
	Error Trace:	instructions_test.go:152
		
	Error:		Not equal: "COPY [\"file.a\", \"file.b\", \"dest\"]\n" (expected)
			        != "COPY [\"file.a\", \"file.b\", \"dest/\"]\n" (actual)
		
FAIL
FAIL	phabricator.wikimedia.org/source/blubber/docker	0.017s
?   	phabricator.wikimedia.org/source/blubber/meta	[no test files]
This revision now requires changes to proceed.Jul 25 2018, 8:21 PM
thcipriani updated this revision to Diff 2852.Jul 25 2018, 8:43 PM

Fix broken docker tests

dduvall accepted this revision.Jul 26 2018, 5:18 PM
This revision is now accepted and ready to land.Jul 26 2018, 5:18 PM
This revision was automatically updated to reflect the committed changes.