-
Notifications
You must be signed in to change notification settings - Fork 18.7k
builder: fix layer lifecycle leak #36338
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
Conversation
bbe2a10
to
61e8ac4
Compare
Codecov Report
@@ Coverage Diff @@
## master #36338 +/- ##
=========================================
Coverage ? 34.06%
=========================================
Files ? 609
Lines ? 46261
Branches ? 0
=========================================
Hits ? 15758
Misses ? 28472
Partials ? 2031 |
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.
LGTM
builder/dockerfile/internals.go
Outdated
@@ -114,8 +115,8 @@ func (b *Builder) commitContainer(dispatchState *dispatchState, id string, conta | |||
return err | |||
} | |||
|
|||
func (b *Builder) exportImage(state *dispatchState, imageMount *imageMount, runConfig *container.Config) error { | |||
newLayer, err := imageMount.Layer().Commit() | |||
func (b *Builder) exportImage(state *dispatchState, layer builder.RWLayer, parent *imageMount, runConfig *container.Config) error { |
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.
only parent.Image()
is used, so maybe accept parent *image.Image
instead of imageMount
?
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.
replaced with builder.Image
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
61e8ac4
to
7ad41d5
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.
LGTM 🐯
Looks like this introduced a regression; #37077 (comment) |
fixes docker/for-linux#135
fixes #35641
Signed-off-by: Tonis Tiigi tonistiigi@gmail.com