Skip to content
Snippets Groups Projects

Retry CI trace archive if left in incomplete state

Merged Sean Arnold requested to merge 296616-continue-trace-archive-if-not-complete into master
All threads resolved!
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
+ 1
1
@@ -214,7 +214,7 @@ def unsafe_archive!
@@ -214,7 +214,7 @@ def unsafe_archive!
def already_archived?
def already_archived?
# TODO check checksum to ensure archive completed successfully
# TODO check checksum to ensure archive completed successfully
# See https://gitlab.com/gitlab-org/gitlab/-/issues/259619
# See https://gitlab.com/gitlab-org/gitlab/-/issues/259619
trace_artifact&.archived_trace_exists?
trace_artifact.archived_trace_exists?
end
end
def unsafe_trace_conditionally_cleanup_before_retry!
def unsafe_trace_conditionally_cleanup_before_retry!
@@ -223,7+223,7 @@
@@ -223,7+223,7 @@
if already_archived?
if already_archived?
# An archive already exists, so make sure to remove the trace chunks
# An archive already exists, so make sure to remove the trace chunks
erase_trace_chunks!
erase_trace_chunks!
raise AlreadyArchivedError, 'Could not archive again'
raise AlreadyArchivedError, 'Could not archive again'
else
else
# An archive already exists, but its associated file is not complete, so remove it
# An archive already exists, but its associated file is not complete, so remove it
trace_artifact.destroy!
trace_artifact.destroy!
Loading