Skip to content

Code Coverage Badge shows wrong percentages

Summary

Generated code coverage badge shows wrong percentages. This feature worked well in 8.14.5

Steps to reproduce

  1. Open detail pipeline build page (<gitlab.host>/<group>/<project>/builds/10277)
  2. 100% is displayed on right side in section Test coverage
  3. Generated badge shows 82% (<gitlab.host>/<group>/<project>/badges/master/coverage.svg?job=test)

Expected behavior

100% in generated badge

Actual behavior

82% in generated badge

Relevant screenshots

Screen_Shot_2016-12-23_at_10.06.18 Screen_Shot_2016-12-23_at_10.06.55

Results of GitLab application Check

[root@gitlab8 ~]# gitlab-rake gitlab:check SANITIZE=true
Checking GitLab Shell ...

GitLab Shell version >= 4.1.1 ? ... OK (4.1.1)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by git:git?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ...
4/2 ... ok
5/3 ... ok
2/4 ... ok
5/5 ... ok
8/8 ... repository is empty
10/11 ... ok
11/12 ... ok
8/13 ... ok
5/14 ... ok
11/19 ... ok
17/20 ... ok
17/21 ... ok
17/22 ... ok
17/23 ... ok
17/24 ... ok
10/25 ... ok
10/26 ... ok
10/27 ... ok
11/30 ... ok
2/31 ... ok
11/34 ... ok
19/37 ... ok
10/38 ... ok
20/41 ... ok
20/42 ... ok
20/43 ... ok
7/45 ... ok
17/47 ... ok
17/48 ... ok
22/49 ... ok
20/50 ... ok
22/51 ... ok
10/53 ... ok
2/54 ... ok
17/56 ... ok
3/61 ... ok
22/62 ... ok
27/64 ... ok
3/65 ... ok
10/66 ... ok
7/68 ... ok
4/71 ... ok
28/72 ... ok
39/73 ... ok
39/74 ... ok
40/75 ... ok
40/76 ... ok
40/77 ... ok
40/78 ... ok
11/79 ... ok
11/80 ... ok
39/82 ... ok
39/83 ... ok
39/84 ... ok
7/85 ... ok
7/87 ... ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

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

Checking Sidekiq ... Finished

Checking Reply by email ...

Reply by email is disabled in config/gitlab.yml

Checking Reply by email ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... 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/2 ... yes
5/3 ... yes
2/4 ... yes
5/5 ... yes
8/8 ... yes
10/11 ... yes
11/12 ... yes
8/13 ... yes
5/14 ... yes
11/19 ... yes
17/20 ... yes
17/21 ... yes
17/22 ... yes
17/23 ... yes
17/24 ... yes
10/25 ... yes
10/26 ... yes
10/27 ... yes
11/30 ... yes
2/31 ... yes
11/34 ... yes
19/37 ... yes
10/38 ... yes
20/41 ... yes
20/42 ... yes
20/43 ... yes
7/45 ... yes
17/47 ... yes
17/48 ... yes
22/49 ... yes
20/50 ... yes
22/51 ... yes
10/53 ... yes
2/54 ... yes
17/56 ... yes
3/61 ... yes
22/62 ... yes
27/64 ... yes
3/65 ... yes
10/66 ... yes
7/68 ... yes
4/71 ... yes
28/72 ... yes
39/73 ... yes
39/74 ... yes
40/75 ... yes
40/76 ... yes
40/77 ... yes
40/78 ... yes
11/79 ... yes
11/80 ... yes
39/82 ... yes
39/83 ... yes
39/84 ... yes
7/85 ... yes
7/87 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.3)
Your git bin path is "/opt/gitlab/embedded/bin/git"
Git version >= 2.7.3 ? ... yes (2.8.4)
Active users: 20

Checking GitLab ... Finished

Results of GitLab environment info

[root@gitlab8 ~]# gitlab-rake gitlab:env:info

System information
System:
Current User:	git
Using RVM:	no
Ruby Version:	2.3.3p222
Gem Version:	2.6.6
Bundler Version:1.13.6
Rake Version:	10.5.0
Sidekiq Version:4.2.7

GitLab information
Version:	8.15.0
Revision:	54850bf
Directory:	/opt/gitlab/embedded/service/gitlab-rails
DB Adapter:	postgresql
URL:		
HTTP Clone URL:	
SSH Clone URL:	
Using LDAP:	no
Using Omniauth:	no

GitLab Shell
Version:	4.1.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