You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
🐞 Duplicated output when publishing multistage builds #4605
When you do a multistage build with dagger (build in one container and put the files in a secondary container) and publish that secondary container, the output from the build stage is duplicated. This duplication does not happen if there's only one container or if you do any execution other than publishing.
Log output
Single container build:
> _EXPERIMENTAL_DAGGER_JOURNAL="./singlebuild.log" go run main.go
#1 resolve image config for docker.io/library/alpine:latest
#1 DONE 0.8s
#2
#2 DONE 0.0s
#3 from alpine
#3 resolve docker.io/library/alpine:latest
#3 resolve docker.io/library/alpine:latest 0.3s done
#3 CACHED
#2
#2 0.134 LOOK AT MEEEEEEEEEEEEEE now:1676410956 arch:aarch64 pid:15
#2 DONE 0.1s
Multistage build:
> _EXPERIMENTAL_DAGGER_JOURNAL="./multibuild.log" DO_REPRO=1 go run main.go
#1 resolve image config for docker.io/library/alpine:latest
#1 DONE 1.7s
#2
#2 DONE 0.0s
#3 from alpine
#3 resolve docker.io/library/alpine:latest
#3 resolve docker.io/library/alpine:latest 0.2s done
#3 CACHED
#2
#2 0.119 LOOK AT MEEEEEEEEEEEEEE now:1676411000 arch:aarch64 pid:15
#2 0.119 LOOK AT MEEEEEEEEEEEEEE now:1676411000 arch:aarch64 pid:15
#2 DONE 0.1s
I would suspect this is related to the fact that in order to export we have to open a whole new buildkit session right now. There's an upstream issue for fixing this: moby/buildkit#1914. There's also some stuff around sharing buildkit sessions that we could look into too.
In the meantime, something along the lines of morlay's suggestion seams like a good approach to at least reduce the confusing output.
@gerhard Bug still exists, it just looks prettier.
Tweaked the repro to use ubuntu to confirm we're getting repeated logs instead of repeated runs, and to use Export instead of Publish to avoid a registry push:
Yes in all likelihood this should no longer be an issue in v0.8.0, though I will refrain from closing the issue until we've gotten confirmation it no longer repros
Activity
kpenfound commentedon Feb 14, 2023
cc @nipuna-perera
morlay commentedon Feb 15, 2023
I got same issue, then I have define my custom logger base on
https://github.com/dagger/dagger/blob/main/engine/engine.go#L201-L208
with changes:
sipsma commentedon Feb 21, 2023
I would suspect this is related to the fact that in order to export we have to open a whole new buildkit session right now. There's an upstream issue for fixing this: moby/buildkit#1914. There's also some stuff around sharing buildkit sessions that we could look into too.
In the meantime, something along the lines of morlay's suggestion seams like a good approach to at least reduce the confusing output.
gerhard commentedon May 9, 2023
Based on your recent work on TUI, does this bug seem familiar to you @vito?
vito commentedon May 9, 2023
@gerhard Bug still exists, it just looks prettier.
Tweaked the repro to use
ubuntuto confirm we're getting repeated logs instead of repeated runs, and to useExportinstead ofPublishto avoid a registry push:Output:
mircubed commentedon Jun 27, 2023
@TomChv should we keep you assigned to this issue? Do you need any additional support? cc @gerhard
TomChv commentedon Jul 14, 2023
I opened a PR few weeks ago but it seems the issue is mostly on Buildkit side.
I think you can remove my assignment from this
vito commentedon Jul 14, 2023
I bet this will be fixed by #5415
TomChv commentedon Jul 17, 2023
That would be amazing!
sipsma commentedon Aug 3, 2023
Yes in all likelihood this should no longer be an issue in v0.8.0, though I will refrain from closing the issue until we've gotten confirmation it no longer repros
TomChv commentedon Aug 8, 2023
I can check with a repro and let you know!
TomChv commentedon Aug 9, 2023
I think this fix the issue, here's the output with the latest version, what do you think @sipsma ?
TomChv commentedon Aug 14, 2023
/cc @kpenfound @nipuna-perera reopen if you see this issue again