Non-deterministic ordering of buildpack stdout/stderr #2330
Labels
status/triage
Issue or PR that requires contributor attention.
type/bug
Issue that reports an unexpected behaviour.
Summary
The
pack build
ordering of stdout vs stderr output from buildpacks is non-deterministic, which breaks the readability of build logs that contain a mixture of stdout and stderr.This affects the following common use-cases:
We hadn't discovered this until now since out CNB test runner captures stdout and stderr separately (to allow for finer grained test assertions), which masks the fact that when rendered to the user, the combined/interleaved ordering of the two is incorrect.
I'm not sure if this is a Pack CLI bug, or a
lifecycle
bug (our builder image is using the latest lifecycle,v0.20.5
), but filing against Pack CLI for now (feel free to move the issue over if needed). I'm presuming this is related to buffering of some sort.Reproduction
Steps
mkdir testcase && cd $_
pack build testcase
Current behavior
The log lines (a) do not appear in the expected order, (b) the order varies from build to build.
Expected behavior
For the buildpack log lines to appear in this order:
Environment
pack info
Note: The builder image used above is using lifecycle
v0.20.5
.docker info
The text was updated successfully, but these errors were encountered: