Closed alco closed 5 years ago
Another occurrence of this race:
==> Running validation checks..
> Mix.Releases.Checks.Erts * WARN
> Mix.Releases.Checks.Cookie * PASS
> Mix.Releases.Checks.LoadedOrphanedApps * PASS
IMPORTANT: You have opted to *not* include the Erlang runtime system (ERTS).
You must ensure that the version of Erlang this release is built with matches
the version the release will be run with once deployed. It will fail to run otherwise.
Thanks! I've updated Artificery to provide a bit more control here and use :stdio
by default for all output
The race is happening when printing
Hooks
andCustom commands
. Here's one invocation ofbin/myapp describe
:Here's another one:
I believe the problem is that Erlang's
:stdio
and:standard_error
devices and not synchronized, so one can output data concurrently with the other. Not sure if it's OS-specific, I'm running the release on Alpine Linux (Kernel version 4.15.0). Distillery version: 2.0.12.In this code from Artificery
https://github.com/bitwalker/distillery/blob/ed4deb7415373094d29c335d0282f68ed0ed4a7c/lib/mix/lib/releases/runtime/control.ex#L232-L245
Console.info
callsIO.write(:stdio, ...)
andConsole.warn
callsIO.write(:standard_error, ...)
, that's why they are stepping on each other's toes.