summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-09-06 09:10:04 +0000
committerRémy Coutable <remy@rymai.me>2018-09-06 09:10:04 +0000
commitf965bc9e669130bd567e575db197a82270affd96 (patch)
treec2aa7c9e562aa3307d345abb2f2e20dd95827bb1
parentb92b7d822226724db76b8dfb61dca438ea8dbb1c (diff)
parent1792450978ee3766f6e9f8a8fac8117b134ae42c (diff)
downloadgitlab-ce-f965bc9e669130bd567e575db197a82270affd96.tar.gz
Merge branch 'rails5-explicit-hashed-path-check' into 'master'
Explicit hashed path check for trace, prevents background migration from… See merge request gitlab-org/gitlab-ce!21533
-rw-r--r--app/models/ci/job_artifact.rb4
-rw-r--r--changelogs/unreleased/rails5-explicit-hashed-path-check.yml6
2 files changed, 9 insertions, 1 deletions
diff --git a/app/models/ci/job_artifact.rb b/app/models/ci/job_artifact.rb
index 4853b23513c..93fc1b145b2 100644
--- a/app/models/ci/job_artifact.rb
+++ b/app/models/ci/job_artifact.rb
@@ -87,7 +87,9 @@ module Ci
end
def hashed_path?
- super || self.try(:file_location).nil?
+ return true if trace? # ArchiveLegacyTraces background migration might not have `file_location` column
+
+ super || self.file_location.nil?
end
def expire_in
diff --git a/changelogs/unreleased/rails5-explicit-hashed-path-check.yml b/changelogs/unreleased/rails5-explicit-hashed-path-check.yml
new file mode 100644
index 00000000000..93fe4a38411
--- /dev/null
+++ b/changelogs/unreleased/rails5-explicit-hashed-path-check.yml
@@ -0,0 +1,6 @@
+---
+title: Explicit hashed path check for trace, prevents background migration from accessing
+ file_location column that doesn't exist
+merge_request: 21533
+author: Jasper Maes
+type: other