From fa2fec1d18330e4cd9803ff164db19e7367e3838 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 30 Oct 2020 15:16:56 +0000 Subject: Add latest changes from gitlab-org/security/gitlab@13-5-stable-ee --- app/uploaders/job_artifact_uploader.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/uploaders/job_artifact_uploader.rb') diff --git a/app/uploaders/job_artifact_uploader.rb b/app/uploaders/job_artifact_uploader.rb index 47976c909e8..83dc1030606 100644 --- a/app/uploaders/job_artifact_uploader.rb +++ b/app/uploaders/job_artifact_uploader.rb @@ -4,7 +4,6 @@ class JobArtifactUploader < GitlabUploader extend Workhorse::UploadPath include ObjectStorage::Concern - ObjectNotReadyError = Class.new(StandardError) UnknownFileLocationError = Class.new(StandardError) storage_options Gitlab.config.artifacts @@ -24,7 +23,9 @@ class JobArtifactUploader < GitlabUploader private def dynamic_segment - raise ObjectNotReadyError, 'JobArtifact is not ready' unless model.id + # This now tests model.created_at because it can for some reason be nil in the test suite, + # and it's not clear if this is intentional or not + raise ObjectNotReadyError, 'JobArtifact is not ready' unless model.id && model.created_at if model.hashed_path? hashed_path -- cgit v1.2.3