Skip to content
GitLab
Next
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
GitLab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
GitLab.org
GitLab
Commits
35b1c1a5
Commit
35b1c1a5
authored
3 years ago
by
Sean Arnold
Browse files
Options
Downloads
Patches
Plain Diff
Rename method, remove change to worker scope
parent
dda6ed2b
No related branches found
No related tags found
1 merge request
!68906
Retry CI trace archive if left in incomplete state
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/workers/ci/archive_trace_worker.rb
+1
-11
1 addition, 11 deletions
app/workers/ci/archive_trace_worker.rb
lib/gitlab/ci/trace.rb
+2
-2
2 additions, 2 deletions
lib/gitlab/ci/trace.rb
with
3 additions
and
13 deletions
app/workers/ci/archive_trace_worker.rb
+
1
−
11
View file @
35b1c1a5
...
...
@@ -11,20 +11,10 @@ class ArchiveTraceWorker # rubocop:disable Scalability/IdempotentWorker
# rubocop: disable CodeReuse/ActiveRecord
def
perform
(
job_id
)
ci_build_scop
e
.
find_by
(
id:
job_id
).
try
do
|
job
|
Ci
::
Build
.
without_archived_trac
e
.
find_by
(
id:
job_id
).
try
do
|
job
|
Ci
::
ArchiveTraceService
.
new
.
execute
(
job
,
worker_name:
self
.
class
.
name
)
end
end
# rubocop: enable CodeReuse/ActiveRecord
private
def
ci_build_scope
if
Feature
.
enabled?
(
:ci_enable_live_trace
)
Ci
::
Build
.
with_live_trace
else
Ci
::
Build
.
without_archived_trace
end
end
end
end
This diff is collapsed.
Click to expand it.
lib/gitlab/ci/trace.rb
+
2
−
2
View file @
35b1c1a5
...
...
@@ -191,7 +191,7 @@ def unsafe_write!(mode, &blk)
def
unsafe_archive!
raise
ArchiveError
,
'Job is not finished yet'
unless
job
.
complete?
unsafe_trace_c
leanup
!
unsafe_trace_c
onditionally_cleanup_before_retry
!
if
job
.
trace_chunks
.
any?
Gitlab
::
Ci
::
Trace
::
ChunkedIO
.
new
(
job
)
do
|
stream
|
...
...
@@ -217,7 +217,7 @@ def already_archived?
trace_artifact
&
.
archived_trace_exists?
end
def
unsafe_trace_c
leanup
!
def
unsafe_trace_c
onditionally_cleanup_before_retry
!
return
unless
trace_artifact
if
already_archived?
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment