Repository navigation
Support cross device rename - #6738
Conversation
mattfarina
left a comment
There was a problem hiding this comment.
I didn't expect to see this code again. It's from dep which is a rewrite (with many of the same interfaces) of the same functionality I wrote for Glide.
|
|
||
| "github.com/pkg/errors" | ||
| ) | ||
|
|
There was a problem hiding this comment.
Can you add a comment letting us know where this code came from. You can find an example at
|
@ysh7 Is there any chance you could also port this to v3? Looks like it should be a pretty simple copy and paste for the third party code and some small changes to the download manager |
Sure can do that. Will raise PR. |
helm dependency upgrade wasn't working on certain file system because it assumes that os.rename is available. Since rename isn't available for subfolders in docker containers, I ripped a fallback rename strategy from dep (https://github.com/golang/dep/blob/5b1fe9e6d89372487d0aac78d9c5362a517857e7/internal/fs/fs.go#L103-L118) that works in docker. Signed-off-by: Brice Rising <[email protected]>
The fs package tests are going to be a lot of work to get working without the internal test package used by golang/dep, so I removed all of the unused ones by this project to make the work easier. Signed-off-by: Brice Rising <[email protected]>
Recreated the features of the test package in dep that were necessary to run the tests in the fs package. Signed-off-by: Brice Rising <[email protected]>
Root can access all files, so the tests for inaccessible files were failing. Now we will skip these tests when running as root. Signed-off-by: Brice Rising <[email protected]>
Our style settings don't like underscores in variable names, so I switched to camel case. Also, err was unused in some places, so I made an error a fail condition for some test. Signed-off-by: Brice Rising <[email protected]>
Unused var was in fs.go. Removed it. Signed-off-by: Brice Rising <[email protected]>
Neeted to run formatting on fs_test.go Signed-off-by: Brice Rising <[email protected]>
For some reason, gofmt -s -w produced a different result than running gofmt on my host os Signed-off-by: Brice Rising <[email protected]>
This is probably not the correct apporach to using bsd licensed code under an apache license. Signed-off-by: Brice Rising <[email protected]>
I found another package that took code from a BSD licensed open source project. I copied their approach for reusing that license. Signed-off-by: Brice Rising <[email protected]>
Signed-off-by: Brice Rising <[email protected]>
Signed-off-by: Brice Rising <[email protected]>
Signed-off-by: Brice Rising <[email protected]>
Signed-off-by: Yagnesh Mistry <[email protected]>
…idate-license.sh Signed-off-by: Yagnesh Mistry <[email protected]>
Signed-off-by: Yagnesh Mistry <[email protected]>
thomastaylor312
left a comment
There was a problem hiding this comment.
This is looking good from my perspective and testing. I'll let @mattfarina give the final approval since he started the review
This code was ported over from PR #5038, #6738 which were originally for helm v2. The code contains functions from golang/dep/internal/fs for renaming files. Signed-off-by: Yagnesh Mistry <[email protected]>
This PR includes changes mentioned on #5038 required for merging it.
closes #2998