Noise in plaintext failed pipeline email

Summary

Pipeline failure logs sent by email are different in text/plain and text/html.

Steps to reproduce

  • In /admin/application_settings/preferences, check Enable HTML emails.
  • Have gitlab send a failed pipeline email.

What is the current bug behavior?

Example of text/plain logs:

Stage: deploy                                                                                                                                                                                                                                                                    
Name: pages                                                                                                                                                                                                                                                                      
Trace: ^[[0KUsing docker image sha256:196d12cf6ab19273823e700516e98eb1910b03b17840f9d5509f03858484d321 for alpine:latest ...                                                                                                                                                     
section_start:1544227711:prepare_script^M^[[0KRunning on runner-c0b953ab-project-2-concurrent-0 via runner1...                                                                                                                                                                     
section_end:1544227713:prepare_script^M^[[0Ksection_start:1544227713:get_sources^M^[[0KFetching changes...                                                                                                                                                                       
Removing html/                                                                                                                                                                                                                                                                   
HEAD is now at 8edf2fb Make it fail.                                                                                                                                                                                                                                             
Checking out 8edf2fb5 as master...                                                                                                                                                                                                                                               
Skipping Git submodules setup                                                                                                                                                                                                                                                    
section_end:1544227714:get_sources^M^[[0Ksection_start:1544227714:restore_cache^M^[[0Ksection_end:1544227716:restore_cache^M^[[0Ksection_start:1544227716:download_artifacts^M^[[0Ksection_end:1544227718:download_artifacts^M^[[0Ksection_start:1544227718:build_script^M^[[0K$ 
exit 1                                                                                                                                                                                                                                                                           
section_end:1544227719:build_script^M^[[0Ksection_start:1544227719:after_script^M^[[0Ksection_end:1544227721:after_script^M^[[0Ksection_start:1544227721:upload_artifacts_on_failure^M^[[0Ksection_end:1544227722:upload_artifacts_on_failure^M^[[0KERROR: Job failed: exit code 
1

What is the expected correct behavior?

Example of text/html logs:

Using docker image sha256:196d12cf6ab19273823e700516e98eb1910b03b17840f9d5509f03858484d321 for alpine:latest ...
Running on runner-c0b953ab-project-2-concurrent-0 via runner1...
Fetching changes...
Removing html/
HEAD is now at 8edf2fb Make it fail.
Checking out 8edf2fb5 as master...
Skipping Git submodules setup
$ exit 1
ERROR: Job failed: exit code 1

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:
Current User:   git
Using RVM:      no
Ruby Version:   2.4.5p335
Gem Version:    2.7.6
Bundler Version:1.16.6
Rake Version:   12.3.1
Redis Version:  3.2.12
Git Version:    2.18.1
Sidekiq Version:5.2.1
Go Version:     unknown

GitLab information Version: 11.5.3 Revision: aa11737 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://test.gitlab.example.com HTTP Clone URL: https://test.gitlab.example.com/some-group/some-project.git SSH Clone URL: git@test.gitlab.example.com:some-group/some-project.git Using LDAP: yes Using Omniauth: yes Omniauth Providers: phabricator

GitLab Shell Version: 8.4.1 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check
Checking GitLab Shell ...                                                                                                                                                                                                                                                        

GitLab Shell version >= 8.4.1 ? ... OK (8.4.1)
hooks directories in repos are links: ...
4/1 ... ok
3/2 ... ok
3/3 ... ok
3/4 ... ok
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 ...

default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Reply by email is disabled in config/gitlab.yml Checking LDAP ...

Server: ldapmain LDAP authentication... Success [..] Checking LDAP ... Finished

Checking GitLab ...

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: ... 4/1 ... yes 3/2 ... yes 3/3 ... yes 3/4 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.5) Git version >= 2.9.5 ? ... yes (2.18.1) Git user has default SSH configuration? ... yes Active users: ... 5

Checking GitLab ... Finished

Possible fixes

I assume the additional parts that appear in the plaintext version are gitlab-ci details. Why are the parts being hidden in the html in the first place?

They don't seem to appear in the jobs on GitLab themselves, maybe they should be removed from the plaintext version altogether.

Assignee Loading
Time tracking Loading