Commit graph

11 commits

Author SHA1 Message Date
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
Dylan Griffith
03b020f2e4 Update ProjectStatistics#build_artifacts_size synchronously without summing (#41059)
Previously we scheduled a worker to just some this but we were running
into performance issues when the build table was getting too large. So
now we've updated the code such that this column is updated immediately
and incremented/decremented by the correct amount whenever artifacts are
created or deleted.

We've also added the performance optimization that we do not update this
statistic if a project is deleted because it could result in many
updates for a project with many builds.
2018-04-19 18:35:40 +10:00
Micaël Bergeron
2bf29a0c81 fix yet other specs 2018-03-07 13:27:49 -05:00
Micaël Bergeron
a85948862e fix some broken specs 2018-03-06 16:19:24 -05:00
Micaël Bergeron
0d458b96e8 remove geo specific code 2018-03-01 16:30:31 -05:00
Kamil Trzciński
999118f0ec Merge branch 'feature/sm/artifacts-trace-ee' into 'master'
EE: Trace as artifacts (FileStorage and ObjectStorage)

Closes #4171

See merge request gitlab-org/gitlab-ee!4258
2018-02-28 20:59:25 +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 Trzcinski
dd0e341203 Fix Rubocop 2017-12-03 19:16:56 +01:00
Kamil Trzcinski
0464c25f60 Store expire_at in ci_job_artifacts 2017-12-03 12:05:23 +01:00
Kamil Trzcinski
38c61ab6df Fix specs failures, and use factory with :ci_job_artifact, :archive 2017-12-03 12:04:49 +01:00
Zeger-Jan van de Weg
61864a5a5b Rename Artifact to JobArtifact, split metadata out
Two things at ones, as there was no clean way to seperate the commit and
give me feedback from the tests.

But the model Artifact is now JobArtifact, and the table does not have a
type anymore, but the metadata is now its own model:
Ci::JobArtifactMetadata.
2017-12-03 12:04:48 +01:00