Commit Graph

24 Commits

Author SHA1 Message Date
Kamil Trzciński 9bb7abedf5 Fix file_store for artifacts and lfs when saving 2018-05-01 22:27:54 +02:00
Kamil Trzciński a28f25b565 Fix direct_upload when records with null file_store are used
Old records have a null value of file_store column.
This causes the problems with current direct_upload implementation,
as this makes it to choose Store::REMOTE instead of Store::LOCAL.

This change moves the store save when change saving the object.
2018-04-19 12:09:51 +02:00
Yorick Peterse 6f292eaa69
Revert the addition of goldiloader
This reverts the addition of the "goldiloader" Gem and all use of it.
While this Gem is very promising it's causing a variety of problems on
GitLab.com due to it eager-loading too much data in places where we
don't expect/can handle this. At least for the time being this means we
have to go back to manually fixing N+1 query problems, but at least
those should not cause a negative impact on availability.
2018-04-18 15:51:39 +02:00
Sean McGivern 4ef3e3491e Add cop for has_many :through without disabled autoloading
Goldiloader is great, but has several issues with has_many :through relations:

* https://github.com/salsify/goldiloader/issues/12
* https://github.com/salsify/goldiloader/issues/14
* https://github.com/salsify/goldiloader/issues/18

Rather than try to figure out which applies in each case, we should just do the
drudge work of manually disabling autoloading for all relations of this type. We
can always use regular preloading for specific cases, but this way we avoid
generating invalid queries through Goldiloader's magic.
2018-04-09 12:47:04 +01:00
Alessio Caiazza 04c5e637f8
Port LFS direct_upload from EE 2018-03-27 10:32:48 +02:00
Sean McGivern edbcde8877 [cherry-pick] '4862-verify-file-checksums'
See merge request gitlab-org/gitlab-ee!4753
2018-03-08 10:20:40 -05:00
Micaël Bergeron b03b31659b fixing some broken merges 2018-03-02 16:19:17 -05:00
Micaël Bergeron 0d458b96e8 remove geo specific code 2018-03-01 16:30:31 -05:00
Micaël Bergeron 0f1d348d68 port the object storage to CE 2018-03-01 10:34:30 -05:00
Sean McGivern a7dae52e9d Merge branch '4163-move-uploads-to-object-storage' into 'master'
Move uploads to object storage

Closes #4163

See merge request gitlab-org/gitlab-ee!3867
2018-02-28 20:58:15 +01:00
Kamil Trzciński 87f11d2cf5 Merge branch 'zj-auto-upload-job-artifacts' into 'master'
Transfer job archives after creation

See merge request gitlab-org/gitlab-ee!3646
2018-02-28 20:45:07 +01:00
Kamil Trzciński 965dc28691 Merge commit '7fabc892f251740dbd9a4755baede662e6854870' into object-storage-ee-to-ce-backport 2018-02-28 20:36:55 +01:00
Douwe Maan bc76062774 Merge branch 'jej/lfs-object-storage' into 'master'
Can migrate LFS objects to S3 style object storage

Closes #2841

See merge request !2760
2018-02-28 20:29:37 +01:00
James Edwards-Jones ebd5174472 Handle forks in Gitlab::Checks::LfsIntegrity 2017-11-09 13:44:20 +00:00
Yorick Peterse 8fbbf41e29
Added Cop to blacklist the use of `dependent:`
This is allowed for existing instances so we don't end up 76 offenses
right away, but for new code one should _only_ use this if they _have_
to remove non database data. Even then it's usually better to do this in
a service class as this gives you more control over how to remove the
data (e.g. in bulk).
2017-07-06 12:01:36 +02:00
Frank Groeneveld 17a97ef2fa Remove unreferenced LFS objects from DB and fs 2016-10-28 19:39:20 +02:00
Jeroen van Baarsen f1479b56b7
Remove the annotate gem and delete old annotations
In 8278b763d9 the default behaviour of annotation
has changes, which was causing a lot of noise in diffs. We decided in #17382
that it is better to get rid of the whole annotate gem, and instead let people
look at schema.rb for the columns in a table.

Fixes: #17382
2016-05-09 18:00:28 +02:00
Zeger-Jan van de Weg 47da013cf8 Annotate the models 2016-05-06 08:27:46 +02:00
Stan Hu 9dbc768db8 Update annotations 2015-12-08 21:00:01 -08:00
Marin Jankovski e53b350cb6 Add specs for showing lfs object in UI. 2015-12-07 15:03:50 +01:00
Marin Jankovski b2c4675cb0 Recursivity needed if a fork is a fork of a fork. 2015-12-04 12:32:13 +01:00
Marin Jankovski b9a0f96d42 Don't show diffs for lfs pointers. 2015-12-04 12:01:08 +01:00
Marin Jankovski 0a081e7eff If a user clicks on the LFS object, it should be served if the user has access to the object. 2015-12-03 14:59:10 +01:00
Marin Jankovski 14032d8eb1 Add support for git lfs. 2015-11-16 12:39:13 +01:00