Commit Graph

18 Commits

Author SHA1 Message Date
Kamil Trzcinski 05683f313b Fix filename method of GitlabUploader to return always real filename 2017-06-13 00:37:12 +02:00
Kamil Trzciński de6c116530 Merge branch 'sh-fix-refactor-uploader-work-dir' into 'master'
Set artifact working directory to be in the destination store to prevent unnecessary I/O

Closes #33274

See merge request !11905
2017-06-12 19:31:00 +00:00
DJ Mountney 1d1363e2bb Bring in security changes from the 9.2.5 release
Ran:
 - git format-patch v9.2.2..v9.2.5 --stdout > patchfile.patch
 - git checkout -b 9-2-5-security-patch origin/v9.2.2
 - git apply patchfile.patch
 - git commit
 - [Got the sha ref for the commit]
 - git checkout -b upstream-9-2-security master
 - git cherry-pick <SHA of the patchfile commit>
 - [Resolved conflicts]
 - git cherry-pick --continue
2017-06-07 21:16:20 -07:00
Phil Hughes 563ea34692 Merge branch '12910-snippets-description' into 'master'
Support descriptions for snippets

Closes #31894

See merge request !11071
2017-06-07 09:26:48 +00:00
Jarka Kadlecova 2e311d9d1a Support uploads for newly created personal snippets 2017-06-07 07:52:41 +02:00
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
Kamil Trzcinski 6185d12c18 Add missing specs 2017-06-01 16:34:48 +02:00
Jarka Kadlecova 4464c22d6d Support descriptions for snippets 2017-05-31 07:17:03 +02:00
Jarka Kadlecova 43ff738641 Support uploaders for personal snippets comments 2017-05-02 15:22:24 +02:00
Robert Speicher 5c41338fa3 Handle relative and absolute Upload paths in the Uploaders 2017-03-06 14:41:10 -05:00
Robert Speicher 3a0be1c5fc Add `RecordsUploads` module to record Upload records via callbacks 2017-03-06 14:41:09 -05:00
Robert Speicher a8c62dfe5c Minor refactoring of Uploaders
- Moves a duplicate `file_storage?` definition into the common
  `GitlabUploader` ancestor.
- Get the `uploads` base directory from a class method rather than
  hard-coding it where it's needed. This will be used in a subsequent MR
  to store Uploads in the database.
- Improves the specs for uploaders.
2017-02-24 16:41:27 -05:00
Jacob Vosmaer 0406a3579f Don't delete files from spec/fixtures 2017-01-03 15:37:32 +01:00
Jacob Vosmaer ec273b8d06 Copy, don't move uploaded avatar files 2017-01-03 15:37:32 +01:00
Jacob Vosmaer 6731ab5d76 Add Gitlab::Middleware::Multipart 2016-12-15 12:26:36 +01:00
Rémy Coutable 6b7e9c7655
Remove VideoJS and clean the integration
Handle videos in:
- MD preview in notes: commit, issue/MR, MR diff
- New notes in: commit, issue/MR, MR diff
- Persisted notes in: commit, issue/MR, MR diff

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-20 11:36:42 +02:00
Eric Hayes c266c7fa18 First support of videos in issues, MRs and notes
* Registered video MIME types
* Currently supporting browser-supported formats with extensions that match the mime type
2016-07-19 18:51:09 +02:00