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

feat: add archive utils with compression options #870

Merged
merged 4 commits into from
Sep 21, 2022

Conversation

kmehant
Copy link
Member

@kmehant kmehant commented Sep 20, 2022

Signed-off-by: Mehant Kammakomati kmehant@gmail.com

Signed-off-by: Mehant Kammakomati <kmehant@gmail.com>
@github-actions
Copy link

Thanks for making a pull request! 😃
One of the maintainers will review and advise on the next steps.

@github-actions github-actions bot added the feat label Sep 20, 2022
@codecov
Copy link

codecov bot commented Sep 20, 2022

Codecov Report

Base: 18.11% // Head: 18.40% // Increases project coverage by +0.29% 🎉

Coverage data is based on head (20f2216) compared to base (7c2060a).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #870      +/-   ##
==========================================
+ Coverage   18.11%   18.40%   +0.29%     
==========================================
  Files          46       46              
  Lines        3731     3672      -59     
==========================================
  Hits          676      676              
+ Misses       2890     2831      -59     
  Partials      165      165              
Impacted Files Coverage Δ
environment/container/dockerengine.go 19.70% <0.00%> (ø)
environment/container/utils.go 0.00% <0.00%> (ø)

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.

Copy link
Member

@ashokponkumar ashokponkumar left a comment

Choose a reason for hiding this comment

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

Can we reuse

func writeDirToTar(w *io.PipeWriter, srcDir, basePath string) error {
function?

@kmehant kmehant added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 21, 2022
Signed-off-by: Mehant Kammakomati <kmehant@gmail.com>
Copy link
Member

@ashokponkumar ashokponkumar left a comment

Choose a reason for hiding this comment

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

Nice work. Some nit.

@@ -169,6 +169,7 @@ func writeTemplateToFile(tpl string, config interface{}, writepath string,
"execTemplate": execTemplate(packageTemplate),
"encAesCbcPbkdf": common.EncryptAesCbcWithPbkdfWrapper,
"encRsaCert": common.EncryptRsaCertWrapper,
"archTarGZipStr": common.CreateTarArchiveGZipStringWrapper,
Copy link
Member

Choose a reason for hiding this comment

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

Would be good to expose just tar too.

// GZipCompressionType allows archival using gzip compression format
GZipCompressionType CompressionType = "GZip"
// DefaultCompressionType allows archival without compression
DefaultCompressionType CompressionType = "Default"
Copy link
Member

Choose a reason for hiding this comment

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

the default is no compression, isn't it? I assume Tar is not a compression format. So can we possibly call it as NoCompression = None?

Signed-off-by: Mehant Kammakomati <kmehant@gmail.com>
Signed-off-by: Mehant Kammakomati <kmehant@gmail.com>
@kmehant kmehant changed the title feat: add archive utils feat: add archive utils with compression options Sep 21, 2022
@ashokponkumar ashokponkumar merged commit 1197835 into konveyor:main Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. feat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants