Skip to content
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

GitLab CI runner doesn't show apt command output in log #416

Closed
obbardc opened this issue Jul 11, 2023 · 4 comments · Fixed by #479
Closed

GitLab CI runner doesn't show apt command output in log #416

obbardc opened this issue Jul 11, 2023 · 4 comments · Fixed by #479
Labels

Comments

@obbardc
Copy link
Member

obbardc commented Jul 11, 2023

Gitlab gets confused with the apt output as apt appends \r\r\n rather then just \r\n.
There was some work in #281 to modify the output of apt but we are fixing this in the wrong place. It would be better to fix this in the GitLab CI runner.

We should post this issue upstream to GitLab CI or find an existing issue upstream.

Also, the log is still shown, it is just that GitLab Runner seems to hide certain lines ending in certain newline character sequences.
You can get to the full apt actions logs by going to the job and pressing the "Show complete raw" button at the top next to the Search bar.

@jakob-tsd
Copy link
Contributor

Maybe adding "-o=quiet::NoUpdate=1" makes sense in any case? If the output is not a terminal, we currently get stuff like this:

2023/07/28 08:09:50 apt | Reading package lists... 0%Reading package lists... 0%Reading package lists... 0%Reading package lists... 13%Reading package lists... 27%Reading package lists... 41%Reading package lists... 53%Reading package lists... 60%Reading package lists... 60%Reading package lists... 85%Reading package lists... 99%Reading package lists... 99%Reading package lists... Done

@jakob-tsd
Copy link
Contributor

How this looks like in less:
image

@obbardc
Copy link
Member Author

obbardc commented Jul 28, 2023

Maybe adding "-o=quiet::NoUpdate=1" makes sense in any case? If the output is not a terminal, we currently get stuff like ...

We already add that flag: https://github.com/go-debos/debos/blob/main/actions/apt_action.go#L52
I have a note to re-check what adding -o=Dpkg::Progress-Fancy=0 does

@jakob-tsd
Copy link
Contributor

Ah, b1197b8, nice, time to upgrade my debos :)

obbardc added a commit that referenced this issue Feb 6, 2024
Currently the default nspawn console mode for nspawn is interactive which
means that /dev/console is created inside the nspawn container and the
command can assume it is running in an interactive session.

With console mode set to pipe, nspawn doesn't create /dev/console inside
the container and scripts assume they are running in an interactive
environment

This has the benefit of forcing some commands (e.g. apt) to not show things
like progress bars which only work in interactive terminals.

Fixes: #411
Fixes: #416
Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants