Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b0eebb17
Commit
b0eebb17
authored
Feb 01, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix static analysys
parent
1f398679
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
12 deletions
+16
-12
app/services/ci/create_trace_artifact_service.rb
app/services/ci/create_trace_artifact_service.rb
+6
-4
app/uploaders/job_artifact_uploader.rb
app/uploaders/job_artifact_uploader.rb
+1
-1
lib/gitlab/ci/trace/http_io.rb
lib/gitlab/ci/trace/http_io.rb
+7
-6
spec/services/ci/retry_build_service_spec.rb
spec/services/ci/retry_build_service_spec.rb
+2
-1
No files found.
app/services/ci/create_trace_artifact_service.rb
View file @
b0eebb17
...
...
@@ -4,10 +4,12 @@ module Ci
return
if
job
.
job_artifacts_trace
job
.
trace
.
read
do
|
stream
|
job
.
create_job_artifacts_trace!
(
project:
job
.
project
,
file_type: :trace
,
file:
stream
)
if
stream
.
file?
if
stream
.
file?
job
.
create_job_artifacts_trace!
(
project:
job
.
project
,
file_type: :trace
,
file:
stream
)
end
end
end
end
...
...
app/uploaders/job_artifact_uploader.rb
View file @
b0eebb17
...
...
@@ -18,7 +18,7 @@ class JobArtifactUploader < GitlabUploader
if
file_storage?
File
.
open
(
path
,
"rb"
)
if
path
else
Gitlab
::
Ci
::
Trace
::
H
TTP_
IO
.
new
(
url
,
size
)
Gitlab
::
Ci
::
Trace
::
H
ttp
IO
.
new
(
url
,
size
)
end
end
...
...
lib/gitlab/ci/trace/http_io.rb
View file @
b0eebb17
...
...
@@ -4,7 +4,7 @@
module
Gitlab
module
Ci
class
Trace
class
H
TTP_
IO
class
H
ttp
IO
BUFFER_SIZE
=
128
.
kilobytes
attr_reader
:uri
,
:size
...
...
@@ -30,7 +30,7 @@ module Gitlab
@uri
.
to_s
end
def
seek
(
pos
,
where
=
IO
::
SEEK_SET
)
def
seek
(
pos
,
where
=
IO
::
SEEK_SET
)
new_pos
=
case
where
when
IO
::
SEEK_END
...
...
@@ -53,7 +53,7 @@ module Gitlab
end
def
each_line
while
!
eof?
do
loop
!
eof?
do
line
=
readline
yield
(
line
)
end
...
...
@@ -65,6 +65,7 @@ module Gitlab
while
length
.
nil?
||
out
.
length
<
length
data
=
get_chunk
break
if
data
.
empty?
out
+=
data
@tell
+=
data
.
bytesize
end
...
...
@@ -80,13 +81,13 @@ module Gitlab
def
readline
out
=
""
while
!
eof?
do
loop
!
eof?
do
data
=
get_chunk
new_line
=
data
.
index
(
"
\n
"
)
if
!
new_line
.
nil?
out
+=
data
[
0
..
new_line
]
@tell
+=
new_line
+
1
@tell
+=
new_line
+
1
break
else
out
+=
data
...
...
@@ -132,7 +133,7 @@ module Gitlab
@chunk_range
=
response
.
content_range
end
@chunk
[
chunk_offset
..
BUFFER_SIZE
]
@chunk
[
chunk_offset
..
BUFFER_SIZE
]
end
def
request
...
...
spec/services/ci/retry_build_service_spec.rb
View file @
b0eebb17
...
...
@@ -17,7 +17,8 @@ describe Ci::RetryBuildService do
%i[id status user token coverage trace runner artifacts_expire_at
artifacts_file artifacts_metadata artifacts_size created_at
updated_at started_at finished_at queued_at erased_by
erased_at auto_canceled_by job_artifacts job_artifacts_archive job_artifacts_metadata]
.
freeze
erased_at auto_canceled_by job_artifacts job_artifacts_archive
job_artifacts_metadata job_artifacts_trace]
.
freeze
IGNORE_ACCESSORS
=
%i[type lock_version target_url base_tags trace_sections
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment