New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: in case of restart returns proper run number #364
Conversation
roksys
commented
Jan 28, 2020
•
edited
edited
- Addresses refactor: workflow restart/rerun using the same workspace reana-workflow-controller#289
3647869
to
ca07729
Compare
ffe4fb9
to
800ea03
Compare
When I test it I get the following: $ reana-client run
[INFO] Creating a workflow...
workflow.1.0
[INFO] Uploading files...
File code/helloworld.py was successfully uploaded.
File data/names.txt was successfully uploaded.
[INFO] Starting workflow...
workflow.1.0 is running
$ reana-client create -w workflow
workflow.2.0
$ reana-client start --restart -w workflow.1
workflow.3.0 is running
$ reana-client list
NAME RUN_NUMBER CREATED STATUS
workflow 3.0 2020-02-03T14:30:19 finished
workflow 2.0 2020-02-03T14:29:46 created
workflow 1.0 2020-02-03T14:26:24 finished However, I would expect: $ reana-client list
NAME RUN_NUMBER CREATED STATUS
workflow 1.1 2020-02-03T14:30:19 finished
workflow 2.0 2020-02-03T14:29:46 created
workflow 1.0 2020-02-03T14:26:24 finished Or with https://github.com/reanahub/reana-db/pull/57/files#r374135702 I would expect: $ reana-client list
NAME RUN_NUMBER CREATED STATUS
workflow 1.1 2020-02-03T14:30:19 finished
workflow 2 2020-02-03T14:29:46 created
workflow 1 2020-02-03T14:26:24 finished Another observation is that one can still mess with past workflow run workspaces. $ reana-client ls -w workflow.1
NAME SIZE LAST-MODIFIED
results/greetings.txt 68 2020-02-03T14:30:32
data/names.txt 20 2020-02-03T14:26:25
code/helloworld.py 3253 2020-02-03T14:26:25
$ reana-client ls -w workflow.3
NAME SIZE LAST-MODIFIED
results/greetings.txt 68 2020-02-03T14:30:32
data/names.txt 20 2020-02-03T14:26:25
code/helloworld.py 3253 2020-02-03T14:26:25
$ reana-client upload README.rst -w workflow.1
File README.rst was successfully uploaded.
$ reana-client ls -w workflow.3
NAME SIZE LAST-MODIFIED
README.rst 6493 2020-02-03T14:43:47
results/greetings.txt 68 2020-02-03T14:30:32
data/names.txt 20 2020-02-03T14:26:25
code/helloworld.py 3253 2020-02-03T14:26:25 Blocking past restarted workflows workspaces from edition can be done in a different issue. |
99b272a
to
67bab47
Compare
reana_client/cli/workflow.py
Outdated
@@ -142,7 +142,10 @@ def workflow_workflows(ctx, sessions, _filter, output_format, access_token, | |||
name, run_number = get_workflow_name_and_run_number( | |||
workflow['name']) | |||
workflow['name'] = name | |||
workflow['run_number'] = int(run_number) | |||
workflow['run_number'] = run_number | |||
# workflow['run_number'] = float(run_number) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commented code can go away now, right?
67bab47
to
9335c2a
Compare
75fb86e
to
d361f38
Compare