Changes tab and REST API show incomplete file differences
Summary
When creating a merge request, the changes tab shows an incorrect number of changes and when the changes tab fully loads it shows a different incorrect number, this incorrect number is consistent with the REST API response.
Steps to reproduce
I wish I knew, we've only seen this occur once but it has only happened since our upgrade to 8.15.2. We have one data point here, but this particular merge request had two commits with 431 changes, so a significant change set containing deletions, removals, and renames.
Expected behavior
The changes tab and REST API should show the same number of changes as a manual comparison under Repository / Compare and the results produced by a normal evaluation with git
toolset, in this case that number should be 431.
Actual behavior
When creating a merge request, the changes tab shows an incorrect number of changes (15) and when the changes tab fully loads it shows a different incorrect number (248) for a situation where 431 changes exist between the source branch and it's last merge with the target branch. This incorrect 248 number is consistent with the REST API response, which I confirmed by accessing http://path.to.our.gitlab/api/v3/projects/68/merge_request/1743/changes
Relevant logs and/or screenshots
Output of checks
Results of GitLab application Check
# sudo 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: ...
5/1 ... ok
4/2 ... ok
7/3 ... ok
14/8 ... ok
7/9 ... ok
5/11 ... ok
16/14 ... ok
16/15 ... ok
16/16 ... ok
16/17 ... ok
16/18 ... ok
16/19 ... ok
16/20 ... ok
17/22 ... ok
19/23 ... ok
19/24 ... ok
19/26 ... ok
19/27 ... ok
5/28 ... ok
108/29 ... ok
23/30 ... ok
25/31 ... ok
25/32 ... ok
25/34 ... ok
25/35 ... ok
25/36 ... ok
25/37 ... ok
25/38 ... ok
25/39 ... ok
25/40 ... ok
25/41 ... ok
25/42 ... ok
25/43 ... ok
25/44 ... ok
25/45 ... ok
25/46 ... ok
19/47 ... ok
9/49 ... ok
9/50 ... ok
9/51 ... ok
7/59 ... ok
9/62 ... ok
88/64 ... ok
8/65 ... ok
19/66 ... ok
92/67 ... repository is empty
19/68 ... ok
14/69 ... ok
5/71 ... ok
5/76 ... ok
5/79 ... ok
12/80 ... ok
9/81 ... ok
141/82 ... ok
142/85 ... repository is empty
9/86 ... ok
9/87 ... repository is empty
7/88 ... ok
7/89 ... ok
109/90 ... ok
168/91 ... ok
9/92 ... ok
9/93 ... ok
161/94 ... ok
164/95 ... ok
164/96 ... ok
19/98 ... ok
165/99 ... ok
7/100 ... repository is empty
170/101 ... ok
101/103 ... ok
168/104 ... ok
168/106 ... ok
192/107 ... ok
7/108 ... ok
62/109 ... ok
197/110 ... ok
197/111 ... ok
197/112 ... ok
197/113 ... ok
197/114 ... ok
199/115 ... repository is empty
7/116 ... ok
101/117 ... ok
14/118 ... ok
14/119 ... ok
185/120 ... ok
165/121 ... ok
206/122 ... ok
7/123 ... ok
206/124 ... repository is empty
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 ...
Server: ldapmain
LDAP authentication... Success
LDAP users with access to your GitLab server (only showing the first 100 results)
Checking LDAP ... Finished
....................................User info removed..................
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? ... no
Try fixing it:
sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads
sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} \;
sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} \;
For more information see:
doc/install/installation.md in section "GitLab"
Please fix the error above and rerun the checks.
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: ...
5/1 ... yes
4/2 ... yes
7/3 ... yes
14/8 ... yes
7/9 ... yes
5/11 ... yes
16/14 ... yes
16/15 ... yes
16/16 ... yes
16/17 ... yes
16/18 ... yes
16/19 ... yes
16/20 ... yes
17/22 ... yes
19/23 ... yes
19/24 ... yes
19/26 ... yes
19/27 ... yes
5/28 ... yes
108/29 ... yes
23/30 ... yes
25/31 ... yes
25/32 ... yes
25/34 ... yes
25/35 ... yes
25/36 ... yes
25/37 ... yes
25/38 ... yes
25/39 ... yes
25/40 ... yes
25/41 ... yes
25/42 ... yes
25/43 ... yes
25/44 ... yes
25/45 ... yes
25/46 ... yes
19/47 ... yes
9/49 ... yes
9/50 ... yes
9/51 ... yes
7/59 ... yes
9/62 ... yes
88/64 ... yes
8/65 ... yes
19/66 ... yes
92/67 ... yes
19/68 ... yes
14/69 ... yes
5/71 ... yes
5/76 ... yes
5/79 ... yes
12/80 ... yes
9/81 ... yes
141/82 ... yes
142/85 ... yes
9/86 ... yes
9/87 ... yes
7/88 ... yes
7/89 ... yes
109/90 ... yes
168/91 ... yes
9/92 ... yes
9/93 ... yes
161/94 ... yes
164/95 ... yes
164/96 ... yes
19/98 ... yes
165/99 ... yes
7/100 ... yes
170/101 ... yes
101/103 ... yes
168/104 ... yes
168/106 ... yes
192/107 ... yes
7/108 ... yes
62/109 ... yes
197/110 ... yes
197/111 ... yes
197/112 ... yes
197/113 ... yes
197/114 ... yes
199/115 ... yes
7/116 ... yes
101/117 ... yes
14/118 ... yes
14/119 ... yes
185/120 ... yes
165/121 ... yes
206/122 ... yes
7/123 ... yes
206/124 ... 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: 185
Checking GitLab ... Finished
Results of GitLab environment info
# sudo gitlab-rake gitlab:env:info
System information
System: CentOS 6.7
Current User: git
Using RVM: no
Ruby Version: 2.3.3p222
Gem Version: 2.6.6
Bundler Version:1.13.7
Rake Version: 10.5.0
Sidekiq Version:4.2.7
GitLab information
Version: 8.15.2
Revision: 790035f
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: http://xxxxxxxxxxxxxxxxxx
HTTP Clone URL: http://xxxxxxxxxxxxxxxxxx
SSH Clone URL: git@xxxxxxxx:some-group/some-project.git
Using LDAP: yes
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
Possible fixes
Unknown. I have a branch that consistently produces this behavior, so it's reproducible in our system but I am not knowledgeable in gitlab source.