Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nomad-FAIR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nomad-lab
nomad-FAIR
Commits
f4aa174e
Commit
f4aa174e
authored
3 years ago
by
Markus Scheidgen
Browse files
Options
Downloads
Patches
Plain Diff
Fixed repack cli after rebase.
parent
a64348e1
No related branches found
No related tags found
3 merge requests
!548
Release v1
,
!487
Fixes after reprocessing #689 #690
,
!465
v1-process
Pipeline
#117976
passed
3 years ago
Stage: build
Stage: test
Stage: release
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
nomad/cli/admin/uploads.py
+9
-5
9 additions, 5 deletions
nomad/cli/admin/uploads.py
tests/test_cli.py
+1
-1
1 addition, 1 deletion
tests/test_cli.py
with
10 additions
and
6 deletions
nomad/cli/admin/uploads.py
+
9
−
5
View file @
f4aa174e
...
@@ -461,13 +461,17 @@ def process(ctx, uploads, parallel: int, process_running: bool, setting: typing.
...
@@ -461,13 +461,17 @@ def process(ctx, uploads, parallel: int, process_running: bool, setting: typing.
@uploads.command
(
help
=
'
Repack selected uploads.
'
)
@uploads.command
(
help
=
'
Repack selected uploads.
'
)
@click.argument
(
'
UPLOADS
'
,
nargs
=-
1
)
@click.argument
(
'
UPLOADS
'
,
nargs
=-
1
)
@click.option
(
'
--parallel
'
,
default
=
1
,
type
=
int
,
help
=
'
Use the given amount of parallel processes. Default is 1.
'
)
@click.pass_context
@click.pass_context
def
re_pack
(
ctx
,
uploads
,
parallel
:
int
):
def
re_pack
(
ctx
,
uploads
):
_
,
uploads
=
_query_uploads
(
uploads
,
**
ctx
.
obj
.
uploads_kwargs
)
_
,
uploads
=
_query_uploads
(
uploads
,
**
ctx
.
obj
.
uploads_kwargs
)
_run_processing
(
uploads
,
parallel
,
lambda
upload
:
upload
.
re_pack
(),
'
re-packing
'
,
for
upload
in
uploads
:
wait_until_complete
=
False
)
if
not
upload
.
published
:
print
(
f
'
Cannot repack unpublished upload
{
upload
.
upload_id
}
'
)
continue
upload
.
upload_files
.
re_pack
(
upload
.
with_embargo
)
print
(
f
'
successfully re-packed
{
upload
.
upload_id
}
'
)
@uploads.command
(
help
=
'
Attempt to abort the processing of uploads.
'
)
@uploads.command
(
help
=
'
Attempt to abort the processing of uploads.
'
)
...
...
This diff is collapsed.
Click to expand it.
tests/test_cli.py
+
1
−
1
View file @
f4aa174e
...
@@ -233,7 +233,7 @@ class TestAdminUploads:
...
@@ -233,7 +233,7 @@ class TestAdminUploads:
published
.
save
()
published
.
save
()
result
=
invoke_cli
(
result
=
invoke_cli
(
cli
,
[
'
admin
'
,
'
uploads
'
,
'
re-pack
'
,
'
--parallel
'
,
'
2
'
,
upload_id
],
catch_exceptions
=
False
)
cli
,
[
'
admin
'
,
'
uploads
'
,
'
re-pack
'
,
upload_id
],
catch_exceptions
=
False
)
assert
result
.
exit_code
==
0
assert
result
.
exit_code
==
0
assert
'
re-pack
'
in
result
.
stdout
assert
'
re-pack
'
in
result
.
stdout
...
...
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