Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-04-05 21:33:32 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-04-05 21:33:32 +0300
commit160b4827edad1984ddb4339622b93ace17870cb1 (patch)
tree2ceaf492f689cfa7a1e4fc39c4ff7685d14a3913 /lib
parent6b3585d8ea15a7ee1a5cd2f5799caace48ab0c32 (diff)
parent373f6a9bb20497eebe4cdf41be18eb2399424a59 (diff)
Merge branch '44665-fix-db-trace-stream-by-raw-access' into 'master'
Fix `JobsController#raw` endpoint can not read traces in database Closes #44665 See merge request gitlab-org/gitlab-ce!18101
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/ci/trace/stream.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/ci/trace/stream.rb b/lib/gitlab/ci/trace/stream.rb
index b3fe3ef1c4d..54894a46077 100644
--- a/lib/gitlab/ci/trace/stream.rb
+++ b/lib/gitlab/ci/trace/stream.rb
@@ -8,7 +8,7 @@ module Gitlab
attr_reader :stream
- delegate :close, :tell, :seek, :size, :path, :url, :truncate, to: :stream, allow_nil: true
+ delegate :close, :tell, :seek, :size, :url, :truncate, to: :stream, allow_nil: true
delegate :valid?, to: :stream, as: :present?, allow_nil: true
@@ -25,6 +25,10 @@ module Gitlab
self.path.present?
end
+ def path
+ self.stream.path if self.stream.respond_to?(:path)
+ end
+
def limit(last_bytes = LIMIT_SIZE)
if last_bytes < size
stream.seek(-last_bytes, IO::SEEK_END)