Commit Graph

10 Commits

Author SHA1 Message Date
Shinya Maeda 387a4f4b2c Remove legacy artifact related code
We've already migrated all the legacy artifacts to the new realm,
which is ci_job_artifacts table.
It's time to remove the old code base that is no longer used.
2019-05-31 10:49:17 +07:00
Thong Kuah d6b952ad3e
Add frozen_string_literal to spec/workers
Adds `# frozen_string_literal: true` to spec/workers ruby files
2019-04-01 13:35:22 -03:00
Kamil Trzcinski ab02bd6942 Use `job_artifacts_archive|metadata` 2017-12-03 12:04:49 +01:00
Kamil Trzcinski 8f01e67980 Revert "Rename `job_archive|metadata` to `artifacts_archive|metadata`"
This reverts commit 714082e65304ae2ec5c5400c59a68ab63e724aa9.
2017-12-03 12:04:49 +01:00
Kamil Trzcinski 2045a771bf Rename `job_archive|metadata` to `artifacts_archive|metadata` 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
Yorick Peterse c63e322158
Add many foreign keys to the projects table
This removes the need for relying on Rails' "dependent" option for data
removal, which is _incredibly_ slow (even when using :delete_all) when
deleting large amounts of data. This also ensures data consistency is
enforced on DB level and not on application level (something Rails is
really bad at).

This commit also includes various migrations to add foreign keys to
tables that eventually point to "projects" to ensure no rows get
orphaned upon removing a project.
2017-07-06 12:01:36 +02:00
Zeger-Jan van de Weg d261f83626 Update Carrierwave and fog-core 2017-05-01 20:15:16 +00:00
Grzegorz Bizon 22ef066862 Avoid race condition when expiring artifacts
It may happen that job meant to remove expired artifacts will be
executed asynchronously when, in the meantime, project associated with
given build gets removed by another asynchronous job. In that case we
should not remove artifacts because such build will be removed anyway,
when project removal is complete.
2016-10-17 19:47:03 +02:00
Paco Guzman 9afb2dac5c ExpireBuildArtifactsWorker query builds table without ordering enqueuing one job per build to cleanup
We use Sidekiq::Client.push_bulk to avoid Redis round trips
2016-10-07 15:33:58 +02:00