Force-pushing to self-hosted GitLab does not always update MR diff
Summary
Force-pushing to self-hosted GitLab does not always update MR diff
Steps to reproduce
- Create a feature branch in a forked project
- Push up changes to it.
- Create a merge request.
- Make more changes to the project.
git commit --amend
git push --force-with-lease
Note: This does not happen every time, only about 1 times of perhaps 50 or so.
Example Project
N/A
What is the current bug behavior?
What is the expected correct behavior?
The commit c214623755
should be visible in the GitLab UI after these changes have been pushed. For whatever reason, it is not.
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 18.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.6.6p146 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 5.0.9 Git Version: 2.28.0 Sidekiq Version:5.2.9 Go Version: unknown GitLab information Version: 13.4.1-ee Revision: 4b9c8135cd9 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 11.9 URL: https://git.some-domain.tld HTTP Clone URL: https://git.some-domain.tld/some-group/some-project.git SSH Clone URL: git@git.some-domain.tld:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.7.0 Repository storage paths: - default: /var/opt/gitlab/git-data/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 >= 13.7.0 ? ... OK (13.7.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: 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: ... Server: ldapmain LDAP authentication... Anonymous. No
bind_dn
orpassword
configured LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 51 users of 100 limit.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: ... 4/1 ... yes 4/2 ... yes 5/3 ... yes 5/4 ... yes 4/5 ... yes 6/6 ... yes 4/7 ... yes 6/8 ... yes 6/9 ... yes 4/10 ... yes 4/11 ... yes 4/12 ... yes 6/13 ... yes 4/14 ... yes 5/15 ... yes 4/16 ... yes 6/17 ... yes 4/18 ... yes 4/19 ... yes 4/20 ... yes 4/21 ... yes 66/22 ... yes 4/23 ... yes 6/24 ... yes 4/25 ... yes 4/26 ... yes 8/27 ... yes 10/28 ... yes 16/29 ... yes 18/30 ... yes 22/31 ... yes 23/32 ... yes 24/33 ... yes 29/34 ... yes 30/35 ... yes 34/36 ... yes 35/37 ... yes 37/38 ... yes 40/39 ... yes 41/40 ... yes 43/41 ... yes 45/42 ... yes 50/43 ... yes 45/44 ... yes 7/45 ... yes 4/46 ... yes 4/47 ... yes 45/51 ... yes 4/52 ... yes 45/53 ... yes 39/54 ... yes 45/55 ... yes 45/56 ... yes 41/57 ... yes 4/58 ... yes 54/59 ... yes 15/60 ... yes 24/61 ... yes 23/62 ... yes 56/63 ... yes 4/64 ... yes 4/65 ... yes 4/66 ... yes 4/67 ... yes 59/68 ... yes 51/71 ... yes 65/72 ... yes 61/73 ... yes 59/74 ... yes 4/75 ... yes 62/76 ... yes 4/77 ... yes 24/78 ... yes 4/79 ... yes 45/80 ... yes 56/81 ... yes 4/82 ... yes 66/83 ... yes 18/84 ... yes 41/85 ... yes 45/87 ... yes 4/88 ... yes 59/89 ... yes 4/90 ... yes 35/91 ... yes 18/92 ... yes 50/93 ... yes 41/94 ... yes 45/95 ... yes 5/96 ... yes 45/97 ... yes 68/98 ... yes 37/99 ... yes 4/100 ... yes 41/101 ... yes 16/102 ... yes 70/103 ... yes 45/104 ... yes 71/105 ... yes 69/106 ... yes 35/107 ... yes 66/108 ... yes 18/109 ... yes 8/110 ... yes 41/111 ... yes 62/112 ... yes 69/113 ... yes 62/114 ... yes 70/115 ... yes 45/116 ... yes 70/117 ... yes 72/118 ... yes 41/119 ... yes 45/120 ... yes 74/121 ... yes 4/122 ... yes 4/123 ... yes 34/124 ... yes 4/125 ... yes 41/126 ... yes 69/127 ... yes 41/128 ... yes 68/129 ... yes 65/130 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.6) Git version >= 2.24.0 ? ... yes (2.28.0) Git user has default SSH configuration? ... yes Active users: ... 38 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 6.x - 7.x? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
Refreshing the page in the browser did not make the changes be visible.
However, waiting 15-20 minutes made the changes appear after browser refresh. Perhaps the TTL in Redis for the data for the MR expired during this time?
What we usually do when this happens is to git commit --amend && git push -f
one more time. That usually resolves the problem, but it's still an annoying problem. Multiple users in our GitLab EE org have been seeing this occasional bug.