go-debos / debos

Debian OS builder
Apache License 2.0
533 stars 136 forks source link

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

Closed obbardc closed 6 months ago

obbardc commented 1 year ago

Gitlab gets confused with the apt output as apt appends \r\r\n rather then just \r\n. There was some work in https://github.com/go-debos/debos/pull/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 commented 1 year ago

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 commented 1 year ago

How this looks like in less:

image
obbardc commented 1 year ago

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 commented 1 year ago

Ah, https://github.com/go-debos/debos/commit/b1197b80b4e87c6cd1cd7b06669faa7c40798551, nice, time to upgrade my debos :)