-
Notifications
You must be signed in to change notification settings - Fork 34
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
Snap builds should use unbuffer for better output logging #369
Comments
@tonyespy could you please take a look at this issue and let us know if we need to consider this for Hanoi scope? Thank you. |
@jamesrgregg yes, we should consider it for Hanoi as it's a trivial change (a one-liner) to the snap build script which will make the resulting build logs easier to grok. |
Due to some libraries that snapcraft/python use for outputting, the ordering of some output gets lost when it is piped through docker. To fix this we can just run snapcraft through unbuffer, which is provided through the expect package. Fixes edgexfoundry#369 Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
Due to some libraries that snapcraft/python use for outputting, the ordering of some output gets lost when it is piped through docker. To fix this we can just run snapcraft through unbuffer, which is provided through the expect package. Fixes: edgexfoundry#369 Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
Unclear if this can be closed as done yet, I see that edgexfoundry/ci-build-images#140 was merged, but I don't know how to see any snap builds that would have been done after that was merged. @ernestojeda can you provide me with a link to a jenkins pipeline job that ran with that PR to check the build log? |
@anonymouse64 Here is the link the snap build image used in the pipeline: It has been built 3 times since the July 14 merge. I manually ran the builds each time. We have a story in our backlog to get the weekly builds setup with a cron trigger. |
@ernestojeda can you provide a link to a job that actually used that image? That link you provided just seems to be for building the image but I would like to see a snap being built with that image to confirm the bug is actually fixed |
edge-go-daily-snap runs every day. You can see the latest here: You can see the history on this page: And these are the docker images being used if you want to pull them directly:
|
Thanks for that this looks good to me now |
See https://forum.snapcraft.io/t/fixing-out-of-order-message-output-when-piping-snapcrafts-output-to-file/9176 for full explanation, but basically we should update the docker build script for the snap to use unbuffer so that the log looks a bit better as oftentimes on jenkins logs the error gets output to stderr much earlier than the corresponding output at the same time on stdout, hence one has to do some backtracking when debugging the logs.
Originally filed as edgexfoundry/edgex-go#1018 but now since the snap build scripts are here, migrating to this repo
The text was updated successfully, but these errors were encountered: