Commit graph

7 commits

Author SHA1 Message Date
Stan Hu
8a417f5ae8 Set artifact working directory to be in the destination store to prevent unnecessary I/O
Similar to #33218, build artifacts were being uploaded into a CarrierWave
temporary directory in the Rails root directory before moved to their
final destination, which could cause a copy across filesystems. This
merge request refactors the work in !11866 so that any uploader can
just override `work_dir` to change the default implementation.

Closes #33274
2017-06-06 09:51:28 -07:00
Stan Hu
37dd073782 Fix LFS timeouts when trying to save large files
The following was happening:

1. Workhorse stores an LFS file in /var/opt/gitlab/gitlab-rails/shared/lfs-objects
2. CarrierWave then renames the file to a temporary directory (e.g. /opt/gitlab/embedded/service/gitlab-rails/tmp)
3. CarrierWave then renames the file to its final location (e.g. /var/opt/gitlab/gitlab-rails/shared/lfs-objects)

When the LFS upload path was on a different filesystem than the Rails
installation, step 2 could take a longer than 10 seconds, at which point Workhorse
would time out with "badgateway: failed after 10s: context canceled".

This change makes the work path in the same root as the LFS storage path, preventing moves
across filesystems.

Closes #33218
2017-06-04 21:51:59 -07:00
Jarka Kadlecova
43ff738641 Support uploaders for personal snippets comments 2017-05-02 15:22:24 +02:00
Jacob Vosmaer
6731ab5d76 Add Gitlab::Middleware::Multipart 2016-12-15 12:26:36 +01:00
winniehell
58c562a951 Remove magic comments from Ruby files (!5456) 2016-07-24 07:08:45 +02:00
Grzegorz Bizon
28bafd5354 Enable Style/SpaceAfterComma Rubocop cop 2016-06-29 15:23:44 +02:00
Marin Jankovski
14032d8eb1 Add support for git lfs. 2015-11-16 12:39:13 +01:00