Job log adds new lines on ANSI CSI sequences
Summary
When tools output ANSI CSI sequences, the job log adds a new line with each sequence. This bug is recent, it appeared probably in a release from this summer (I'm sorry, I can not tell exactly which one).
Steps to reproduce
Use anything that can write an ANSI CSI sequence, such as
This shoud \x1B[32mfit\x1B[0m on one line
.
What is the current bug behavior?
Currently it adds new lines at each CSI sequence.
What is the expected correct behavior?
It should now :)
Relevant logs and/or screenshots
For example
Shows from the raw log below:
[1444/1453] BlockEncryptDecrypt10000CBCTest : [32mOK[0m ( 8ms)
[1445/1453] Test : [32mOK[0m ( 234ms)
[1446/1453] TestBlowfishEasy : [32mOK[0m ( 247ms)
[1447/1453] TestBlowfishStream : [32mOK[0m ( 321ms)
[1448/1453] Test : [32mOK[0m ( 377ms)
[1449/1453] TestCryptoStreams : [32mOK[0m ( 445ms)
[1450/1453] SimpleCompressionTest : [32mOK[0m ( 120ms)
[1451/1453] DecompressionOverReadTest : [32mOK[0m ( 108ms)
[1452/1453] CompressionDecompressionSmallBufferTest : [32mOK[0m ( 108ms)
[1453/1453] CompressionDecompressionTest : [32mOK[0m ( 108ms)
Total tests : 1453
- succeeded tests : 1452
- inconclusive tests : 1
- failed tests : 0
- timeout tests : 0
Total time : 7mn24s
section_end:1565710678:build_script
[0Ksection_start:1565710678:archive_cache
[0Ksection_end:1565710678:archive_cache
[0Ksection_start:1565710678:upload_artifacts_on_success
[0Ksection_end:1565710679:upload_artifacts_on_success
[0K[32;1mJob succeeded
[0;m
(also attached) job.log
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 9.9 Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.21.0 Sidekiq Version:5.2.7 Go Version: unknown
GitLab information Version: 12.1.6 Revision: 4016bcac51d Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.7 URL: http://git.arx.one HTTP Clone URL: http://git.arx.one/some-group/some-project.git SSH Clone URL: ssh://git@git.arx.one:2304/some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 9.3.0 Repository storage paths: - default: /arx/.git/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 9.3.0 ? ... OK (9.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/2 ... yes 2/3 ... yes 2/5 ... yes 2/6 ... yes 2/7 ... yes 2/8 ... yes 2/9 ... yes 2/10 ... yes 2/11 ... yes 2/12 ... yes 2/13 ... yes 2/14 ... yes 2/15 ... yes 2/17 ... yes 2/18 ... yes 2/19 ... yes 2/20 ... yes 2/21 ... yes 2/22 ... yes 2/24 ... yes 2/25 ... yes 2/26 ... yes 2/27 ... yes 2/28 ... yes 2/29 ... yes 2/30 ... yes 2/31 ... yes 2/32 ... yes 2/33 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.21.0 ? ... yes (2.21.0) Git user has default SSH configuration? ... yes Active users: ... 7
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished