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
e42ca1fb
Commit
e42ca1fb
authored
Mar 31, 2020
by
Dan Davison
Committed by
Ash McKenzie
Mar 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Impossible to remove orphan artifact files"
parent
713d19c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
changelogs/unreleased/211950-impossible-to-remove-orphan-artifact-files.yml
...sed/211950-impossible-to-remove-orphan-artifact-files.yml
+5
-0
lib/gitlab/cleanup/orphan_job_artifact_files.rb
lib/gitlab/cleanup/orphan_job_artifact_files.rb
+1
-1
spec/lib/gitlab/cleanup/orphan_job_artifact_files_spec.rb
spec/lib/gitlab/cleanup/orphan_job_artifact_files_spec.rb
+6
-0
No files found.
changelogs/unreleased/211950-impossible-to-remove-orphan-artifact-files.yml
0 → 100644
View file @
e42ca1fb
---
title
:
Fix invalid class option for ionice
merge_request
:
28023
author
:
type
:
fixed
lib/gitlab/cleanup/orphan_job_artifact_files.rb
View file @
e42ca1fb
...
@@ -102,7 +102,7 @@ module Gitlab
...
@@ -102,7 +102,7 @@ module Gitlab
if
ionice
if
ionice
raise
ArgumentError
,
'Invalid niceness'
unless
VALID_NICENESS_LEVELS
.
include?
(
niceness
)
raise
ArgumentError
,
'Invalid niceness'
unless
VALID_NICENESS_LEVELS
.
include?
(
niceness
)
cmd
.
unshift
(
*
%W[
#{
ionice
}
-
-class
#{
niceness
}
]
)
cmd
.
unshift
(
*
%W[
#{
ionice
}
-
c
#{
niceness
}
]
)
end
end
log_info
(
"find command: '
#{
cmd
.
join
(
' '
)
}
'"
)
log_info
(
"find command: '
#{
cmd
.
join
(
' '
)
}
'"
)
...
...
spec/lib/gitlab/cleanup/orphan_job_artifact_files_spec.rb
View file @
e42ca1fb
...
@@ -28,6 +28,12 @@ describe Gitlab::Cleanup::OrphanJobArtifactFiles do
...
@@ -28,6 +28,12 @@ describe Gitlab::Cleanup::OrphanJobArtifactFiles do
expect
{
cleanup
.
run!
}.
to
raise_error
(
'Invalid niceness'
)
expect
{
cleanup
.
run!
}.
to
raise_error
(
'Invalid niceness'
)
end
end
it
'passes correct arguments to ionice'
do
allow
(
Gitlab
::
Utils
).
to
receive
(
:which
).
with
(
'ionice'
).
and_return
(
'/fake/ionice'
)
expect
(
Open3
).
to
receive
(
:popen3
).
with
(
'/fake/ionice'
,
'-c'
,
any_args
)
cleanup
.
run!
end
it
'finds artifacts on disk'
do
it
'finds artifacts on disk'
do
artifact
=
create
(
:ci_job_artifact
,
:archive
)
artifact
=
create
(
:ci_job_artifact
,
:archive
)
...
...
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