Skip to content
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

Merged
merged 2 commits into from Feb 5, 2020

Conversation

roksys
Copy link
Contributor

@roksys roksys commented Jan 28, 2020

@roksys roksys force-pushed the restart-wf-number branch 4 times, most recently from ffe4fb9 to 800ea03 Compare February 3, 2020 11:48
@diegodelemos
Copy link
Member

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.

@roksys roksys force-pushed the restart-wf-number branch 2 times, most recently from 99b272a to 67bab47 Compare February 4, 2020 15:27
@@ -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)
Copy link
Member

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?

@tiborsimko tiborsimko merged commit d361f38 into reanahub:master Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants