-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: Refactor LayersMap
to correct old strange code behavior
#2066
fix: Refactor LayersMap
to correct old strange code behavior
#2066
Conversation
My observation is the following: I have made the following (maybe trivial) observations: Instead I hardly guess
However |
111279b
to
9da0603
Compare
The other thing is, that this improvements do not yet resolve the symlink bug I see over multiple stages: FROM base as A
...
RUN echo "DEBUGGINGCHECK:" && ls -al /usr/lib/x86_64-linux-gnu/libbsd.so.0
FROM A as End
RUN echo "DEBUGGINGCHECK:" && ls -al /usr/lib/x86_64-linux-gnu/libbsd.so.0 /// FAILING HERE Seems that extracting the stage |
72754eb
to
2549ee3
Compare
9676a69
to
78eee0c
Compare
- Added a test. - Cache current image, track deletes in `whiteouts` as well as normal adds in `layers`. - Fix ugly delete behavior of `layerHashCache`. Delete it when crerating a new snapshot. - Slight cleanup in `snapshot.go`. - Format ugly `WalkFS` function.
78eee0c
to
e0b84c5
Compare
acc64db
to
b769a7e
Compare
@tejal29 Could you have a look at this changes that would be great! Especially the firsts commit. @imjasonh and me are investigating these changes which fixes some ugly bugs with missing files in images when multiple stages are involved. |
1dbdede
to
e0d27aa
Compare
getFlattenedPaths
function in LayersMap
LayersMap
to correct old strange code behavior
@imjasonh: Hurai, finally CI runs through, with minor modifications. IMO only improvements to status quo. Some local test fixes have been applied too to make local testing run through smoothly. |
65d4b92
to
7083da8
Compare
- Correct some linting.
7083da8
to
62747f6
Compare
- Merge only last layer onto `currentImage`.
11bab2f
to
d37d622
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's kind of a lot of changes in this PR, but I think I'm following them all, and at this point it's probably easier just to power through than to split it up. In the future though, smaller single-purpose PRs would be great so we can iteratively make small improvements.
@imjasonh Totally agree. I still try to find the bug dockerfile to add as regression test |
- Test `Dockerfile_test_issue_2066` fails on main@28432d3c
- This missing files problem should be fixed by PR GoogleContainerTools#2066.
Highlights - Installed binaries are missing from image [#2049](#2049) - proc: detect kubernetes runtime by mounts [#2054](#2054) - Fixes #2046: make target stage lookup case insensitive [#2047](#2047) - fix: Refactor LayersMap to correct old strange code behavior [#2066](#2066) - Fix missing setuid flags on COPY --from=build operation [#2089](#2089) - Fixes #2046: make target stage lookup case insensitive [#2047](#2047) - Add GitLab CI credentials helper [#2040]((#2040)) - and a number of dependency bumps
Highlights - Installed binaries are missing from image #2049 - proc: detect kubernetes runtime by mounts #2054 - Fixes #2046: make target stage lookup case insensitive #2047 - Fix: Refactor LayersMap to correct old strange code behavior #2066 - Fix missing setuid flags on COPY --from=build operation #2089 - Fixes #2046: make target stage lookup case insensitive #2047 - Add GitLab CI credentials helper #2040 - And a number of dependency bumps
Highlights - Installed binaries are missing from image #2049 - proc: detect kubernetes runtime by mounts #2054 - Fixes #2046: make target stage lookup case insensitive #2047 - Fix: Refactor LayersMap to correct old strange code behavior #2066 - Fix missing setuid flags on COPY --from=build operation #2089 - Fixes #2046: make target stage lookup case insensitive #2047 - Add GitLab CI credentials helper #2040 - And a number of dependency bumps
Highlights - Installed binaries are missing from image #2049 - proc: detect kubernetes runtime by mounts #2054 - Fixes #2046: make target stage lookup case insensitive #2047 - Fix: Refactor LayersMap to correct old strange code behavior #2066 - Fix missing setuid flags on COPY --from=build operation #2089 - Fixes #2046: make target stage lookup case insensitive #2047 - Add GitLab CI credentials helper #2040 - And a number of dependency bumps
Fixes #1420
Fixes #1944
Description
Flatten function is still wrong.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Reviewer Notes