fix: pulling not respecting "uncompressed" setting in metadata#3472
fix: pulling not respecting "uncompressed" setting in metadata#3472AustinAbro321 merged 11 commits intozarf-dev:mainfrom
Conversation
Signed-off-by: Allen Conlon <software@conlon.dev>
✅ Deploy Preview for zarf-docs canceled.
|
Signed-off-by: Allen Conlon <software@conlon.dev>
7d41fa3 to
ee1caf0
Compare
Signed-off-by: Allen Conlon <software@conlon.dev>
aebc000 to
12d7dff
Compare
Codecov ReportAttention: Patch coverage is
|
Signed-off-by: Allen Conlon <software@conlon.dev>
e3a273a to
b8d559a
Compare
Signed-off-by: Allen Conlon <software@conlon.dev>
AustinAbro321
left a comment
There was a problem hiding this comment.
LGTM, nice work. Going to ask another member of my team to give it a look before merge
|
I will see if I can track down that windows test failing.... Going to leave these to find easier in the future:
|
| } | ||
| return nil | ||
|
|
||
| mtype, err := mimetype.DetectFile(tarPath) |
There was a problem hiding this comment.
Windows doesn't allow renaming of an already opened file. Rather than defer f.close you will have to run f.close anywhere after the io.Copy
There was a problem hiding this comment.
gotcha... I will have an update to the function before this afternoon for the team to review
There was a problem hiding this comment.
I moved the f.Close() to after
_, err = io.Copy(f, resp.Body)and added f.Close() on error returns. Let me know if that helps
There was a problem hiding this comment.
Ah yes, good catch to make sure the files close in the error case. Still, I feel it would be simpler if we moved the code from the os.Create call to the io.Copy call into it's own function. This way we can use defer and avoid the several f.close calls in each error case.
There was a problem hiding this comment.
Gotcha, I will see if I can encapsulate that logic
There was a problem hiding this comment.
Moved that logic to its own function, I believe that should address the windows issues.... fingers crossed
Signed-off-by: Allen Conlon <software@conlon.dev>
Signed-off-by: Allen Conlon <software@conlon.dev>
Signed-off-by: Allen Conlon <software@conlon.dev>
e98d876 to
13c632c
Compare
|
Thank you! |
Signed-off-by: Allen Conlon <software@conlon.dev>
…dev#3472) Signed-off-by: Allen Conlon <software@conlon.dev> Signed-off-by: NevinAragam <nevin.aragam@gmail.com>
Description
Address
zarf package pullnot respecting.metadata.uncompressedpackage settingRelated Issue
Fixes #3464
Checklist before merging