Gitlab allows incomplete export download
Steps to reproduce
- Export a project (Preferably a large one)
- Keep refreshing page until the export button appears
- Click export button
- Note output of
top
command on Gitlab server, cpu is still pegged at ~99% withgzip
command - Note export tarball size
- Wait until
gzip
command is complete intop
- Click export button
- Note size differential in tarball size
For me, first time was 400MB, second time was ~1.5GB (expected)
What is the current bug behavior?
Export can be downloaded before the archive is complete
What is the expected correct behavior?
Export button does not appear in UI until archive is complete
Relevant logs and/or screenshots
ls -hl
1.5G May 15 21:33 2018-05-15_21-02-086_project_export(1).tar.gz
400M May 15 21:09 2018-05-15_21-02-086_project_export.tar.gz
Note: I'm not sure if the "export is ready" email is sent out before the archive is complete. If so, this bug is even worse.
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: CentOS 7.3.1611 Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknownGitLab information Version: 10.7.3 Revision: 2555d6c Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://git.company.com HTTP Clone URL: https://git.company.com/some-group/some-project.git SSH Clone URL: git@git.company.com:some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 7.1.2 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
System information System: CentOS 7.3.1611 Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknownGitLab information Version: 10.7.3 Revision: 2555d6c Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://git.company.com HTTP Clone URL: https://git.company.com/some-group/some-project.git SSH Clone URL: git@git.company.com:some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 7.1.2 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git [root@git blobs]# sudo gitlab-rake gitlab:check SANITIZE=true Checking GitLab Shell ...
GitLab Shell version >= 7.1.2 ? ... OK (7.1.2) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 4/3 ... ok 4/4 ... ok 4/5 ... ok 4/6 ... ok 4/7 ... ok 4/8 ... ok 4/9 ... ok 4/10 ... ok 4/12 ... ok 4/13 ... ok 6/14 ... ok 4/15 ... ok 4/16 ... ok 4/17 ... ok 4/18 ... ok 4/19 ... ok 4/20 ... ok 4/21 ... ok 4/22 ... ok 4/25 ... ok 4/26 ... ok 4/27 ... ok 3/28 ... ok 4/29 ... ok 4/30 ... ok 4/31 ... ok 14/32 ... ok 3/33 ... ok 4/34 ... ok 4/35 ... ok 4/36 ... ok 4/37 ... ok 4/38 ... ok 4/39 ... ok 4/40 ... ok 4/42 ... ok 4/43 ... ok 4/44 ... ok 3/45 ... 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 Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
LDAP is disabled in config/gitlab.yml
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/3 ... yes 4/4 ... yes 4/5 ... yes 4/6 ... yes 4/7 ... yes 4/8 ... yes 4/9 ... yes 4/10 ... yes 4/12 ... yes 4/13 ... yes 6/14 ... yes 4/15 ... yes 4/16 ... yes 4/17 ... yes 4/18 ... yes 4/19 ... yes 4/20 ... yes 4/21 ... yes 4/22 ... yes 4/25 ... yes 4/26 ... yes 4/27 ... yes 3/28 ... yes 4/29 ... yes 4/30 ... yes 4/31 ... yes 14/32 ... yes 3/33 ... yes 4/34 ... yes 4/35 ... yes 4/36 ... yes 4/37 ... yes 4/38 ... yes 4/39 ... yes 4/40 ... yes 4/42 ... yes 4/43 ... yes 4/44 ... yes 3/45 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.6) Git version >= 2.9.5 ? ... yes (2.14.3) Git user has default SSH configuration? ... yes Active users: ... 11
Checking GitLab ... Finished