-
Notifications
You must be signed in to change notification settings - Fork 177
Fix broken output on docker app build #768
Fix broken output on docker app build #768
Conversation
1323268
to
9de59d4
Compare
Codecov Report
@@ Coverage Diff @@
## master #768 +/- ##
==========================================
- Coverage 70.74% 69.51% -1.23%
==========================================
Files 64 64
Lines 3675 3576 -99
==========================================
- Hits 2600 2486 -114
- Misses 731 760 +29
+ Partials 344 330 -14
Continue to review full report at Codecov.
|
is there a issue logged in buildkit so they don't require an |
Bit confused by this. |
df09d31
to
fd60f83
Compare
@tonistiigi Thanks! You are right about the finalizer! TIL The problem here was that as we create a new I just changed the PR to make a "file singleton" with |
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
Could you add a comment in the code explaining why the file is a global?
cad573e
to
a90d164
Compare
With a function scoped `os.File`, next time the GC passes the instance is collected, calling the finalizer and triggering the invalidation of the FD, that cannot be used anymore. Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
a90d164
to
d26c9ad
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.
I see no other trivial option here to fix the issue, but we definitely need to fix that upstream 👍
With a function scoped
os.File
, next time the GC passesthe instance is collected, calling the finalizer and triggering
the invalidation of the FD, that cannot be used anymore.
- What I did
Fix the broken output on docker app build
- How I did it
Create a global variable to hold output file and prevent it to be garbage collected
- How to verify it
By executing multiple times the following line (around 100 times) you will see that the last messages (
Successfully built <digest>
andSuccessfully tagged <tag>
) will be shown consistently.- Description for the changelog
Fix broken output on docker app build
- A picture of a cute animal (not mandatory)