Incorrect text colors in CI job output log
Summary
When viewing the log of a CI job in the GitLab web interface, the emulated terminal incorrectly colors some of the text in the log. This is a regression introduced recently.
Steps to reproduce
CI logs for my fork of gitlab.com/unboundedsystems/adapt show this issue. An example URL that shows the issue is https://gitlab.com/mterrel/adapt/-/jobs/350258360
Example Project
Please see mterrel/adapt. If I need to provide permissions, I'm happy to do that.
What is the current bug behavior?
This is a regression. The behavior was correct until recently.
The output shown on the job log web page, in the emulated terminal (with the black background) shows text colors that are different than if I download the job log from the "Show complete raw" button on that page and cat
it in a terminal. Specifically, the output rendered in the browser's "terminal" shows large sections of green text and large sections of blue text that should be without non-standard color. See attached file for what the current behavior is:
What is the expected correct behavior?
The text colors of the output in the web browser "terminal" should look similar to what a standard ANSI-escape-sequence compatible terminal would show. Specifically, in the URL above for the mterrel/adapt project, it should look more like what is shown in the attached file:
This screen capture is the downloaded "Show complete raw" file from the above URL displayed on a Linux terminal. Note that the following text SHOULD be blue and is CORRECT on both:
*****
utils: build START
*****
However, the next line should NOT be blue:
make -C utils build
It is correctly shown in normal (white) text in the expected screen cap, but is incorrectly shown in blue in the actual screen cap.
Relevant logs and/or screenshots
Buggy color behavior from web interface:
Correct color behavior from Linux terminal for same log:
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)