-
Notifications
You must be signed in to change notification settings - Fork 550
fix (jkube-kit) : JKubeTarArchiver should always set set TarEntry size to zero for directories (#777) #1631
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
fix (jkube-kit) : JKubeTarArchiver should always set set TarEntry size to zero for directories (#777) #1631
Conversation
Eclipse JKube CI ReportStarted new GH workflow run for #1631 (2022-07-12T06:44:47Z) ⚙️ JKube E2E Tests (2654393335)
|
Codecov Report
@@ Coverage Diff @@
## master #1631 +/- ##
============================================
+ Coverage 51.92% 51.93% +0.01%
- Complexity 3862 3864 +2
============================================
Files 460 460
Lines 20722 20723 +1
Branches 2818 2819 +1
============================================
+ Hits 10759 10762 +3
+ Misses 8849 8848 -1
+ Partials 1114 1113 -1
Continue to review full report at Codecov.
|
…e to zero for directories (eclipse-jkube#777) While fixing tarball issue in eclipse-jkube#793, we had added this `tarEntry.setSize(0L)` in JKubeTarArchiver to fix tarball compatibility with old docker daemons. However, it is set only when the file is not present in `fileModeMap`. In case of Dockerfile based builds, `fileModeMap` seems to contain file modes for different files and directories. Hence, we're not able to set TarEntry size to zero. Move `tarEntry.setSize(0L)` out of fileMode related `if-else` block.
cf9a71b
to
845a611
Compare
Kudos, SonarCloud Quality Gate passed! |
Description
Fix #777
While fixing tarball issue in #793, we had added this
tarEntry.setSize(0L)
in JKubeTarArchiver to fix tarball compatibilitywith old docker daemons. However, it is set only when the file is not
present in
fileModeMap
.In case of Dockerfile based builds,
fileModeMap
seems to contain filemodes for different files and directories. Hence, we're not able to set
TarEntry size to zero.
Move
tarEntry.setSize(0L)
out of fileMode relatedif-else
block.Fixes # (issue)
Type of change
test, version modification, documentation, etc.)
Checklist