Commit b9692501 authored by Shinya Maeda's avatar Shinya Maeda

Check existance of the file when trace_artifact is read

parent 1d983024
...@@ -65,7 +65,7 @@ module Gitlab ...@@ -65,7 +65,7 @@ module Gitlab
def read def read
stream = Gitlab::Ci::Trace::Stream.new do stream = Gitlab::Ci::Trace::Stream.new do
if trace_artifact if trace_artifact&.exists?
trace_artifact.open trace_artifact.open
elsif current_path elsif current_path
File.open(current_path, "rb") File.open(current_path, "rb")
...@@ -92,7 +92,7 @@ module Gitlab ...@@ -92,7 +92,7 @@ module Gitlab
end end
def erase! def erase!
job.job_artifacts_trace&.destory trace_artifact&.destory
paths.each do |trace_path| paths.each do |trace_path|
FileUtils.rm(trace_path, force: true) FileUtils.rm(trace_path, force: true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment