diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-04 12:08:38 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-04 12:08:38 +0000 |
commit | 13f961dce9cbed0a684d694fb1cb9d85946e3be4 (patch) | |
tree | 5205e5af13605a2cddbbb1d2153e0b2d68b7fb6a /app/services/ci | |
parent | c5a33b5d2b6d0e0622fd12ffeb17b7e859cfc0a8 (diff) | |
download | gitlab-ce-13f961dce9cbed0a684d694fb1cb9d85946e3be4.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/ci')
-rw-r--r-- | app/services/ci/job_artifacts/destroy_batch_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/ci/job_artifacts/destroy_batch_service.rb b/app/services/ci/job_artifacts/destroy_batch_service.rb index d5a0a2dd885..5801ba1633c 100644 --- a/app/services/ci/job_artifacts/destroy_batch_service.rb +++ b/app/services/ci/job_artifacts/destroy_batch_service.rb @@ -127,7 +127,9 @@ module Ci def wrongly_expired?(artifact) return false unless artifact.expire_at.present? - match_date?(artifact.expire_at) && match_time?(artifact.expire_at) + # Although traces should never have expiration dates that don't match time & date here. + # we can explicitly exclude them by type since they should never be destroyed. + artifact.trace? || (match_date?(artifact.expire_at) && match_time?(artifact.expire_at)) end def match_date?(expire_at) |