global_file_size_check can fail on large pushes
As described in #467556 (closed), the global_file_size_check feature flag, which limits the blob size by plan (!125956 (merged)), can prevent large pushes to GitLab.com from working:
$ git push jwyatt-rh master
Enumerating objects: 10217808, done.
Counting objects: 100% (10217808/10217808), done.
Delta compression using up to 6 threads
Compressing objects: 100% (1771773/1771773), done.
Writing objects: 100% (10217808/10217808), 2.79 GiB | 38.60 MiB/s, done.
Total 10217808 (delta 8390181), reused 10217808 (delta 8390181), pack-reused 0 (from 0)
remote: warning: object 313d78fa8a105153164c39c96d494c8ccabd8c7f: badFilemode: contains bad file modes
remote: warning: object b2758f55614503d51c777c25faeff549faf6c26c: badFilemode: contains bad file modes
remote: warning: object acafbc6b9b8ce5a90e40c673dd03abd898876929: badFilemode: contains bad file modes
remote: warning: object 8e9223ef4deb8137fd5a7722da13d753745c06aa: badFilemode: contains bad file modes
remote: warning: object 8264a1b0eeebd9cda625822a1ac6df22d631e8dc: badFilemode: contains bad file modes
remote: warning: object 956b25bd6ec3f1254affb2a47e059497e9c9d030: badFilemode: contains bad file modes
remote: warning: object ac816417fd510b93e6c95016a42400ef68a810ad: badFilemode: contains bad file modes
remote: warning: object 349794521329ca4029bdc25af77ff7a7e8aa9f83: badFilemode: contains bad file modes
remote: warning: object 602207596acf39400a6bb96fdee83b9bb8b9e0b1: badFilemode: contains bad file modes
remote: warning: object b2a05c3c518908735ce88038c0043065ef6df11e: badFilemode: contains bad file modes
remote: warning: object 2b44639ced114a28737daa6cc4812f20e26ed96e: badFilemode: contains bad file modes
remote: warning: object 8ff31038cc910c71b00524b5f38bd0ab24c55217: badFilemode: contains bad file modes
remote: warning: object d924c0ed349b7f92c528df97708cbe85d4b18f48: badFilemode: contains bad file modes
remote: Resolving deltas: 100% (8390181/8390181), done.
remote: Checking connectivity: 10217808, done.
remote: GitLab: Push operation timed out
remote:
remote: Timing information for debugging purposes:
remote: Running checks for ref: master
remote: Checking if you are allowed to push... (5.45ms)
remote: Checking if default branch is being deleted... (0.05ms)
remote: Checking if you are force pushing to a protected branch... (14.9ms)
remote: Checking if you are allowed to push to the protected branch... (5.89ms)
remote: Scanning repository for blobs stored in LFS and verifying their files have been uploaded to GitLab... (13276.96ms)
remote: Checking for blobs over the file size limit (cancelled after 30502.6ms)
remote: Running checks for 1 changes (cancelled after 43782.03ms)
To gitlab.com:jwyatt-rh/torvalds.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'gitlab.com:jwyatt-rh/torvalds.git'
You can see here that it took 30 seconds to time out here, and the user's push was blocked.
We may need to reconsider how to handle large pushes like this. For example, we might have to limit the scan for X number of blobs or seconds, and then check asynchronously.
A similar problem exists for the LFS check.
Edited by 🤖 GitLab Bot 🤖