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: workflow status progress columns #141

Merged

Conversation

dinosk
Copy link
Member

@dinosk dinosk commented Jul 27, 2018

  • ADD step column to show current running step in workflow,
    and show Job.prettified_cmd in command column.

Connects #125

Signed-off-by: Dinos Kousidis dinos.kousidis@cern.ch

@dinosk dinosk self-assigned this Jul 27, 2018
@dinosk dinosk added this to the v0.3.0 milestone Jul 27, 2018
@dinosk dinosk force-pushed the progress-columns-prettified-cmd-and-step branch from 335e02a to 1ff9898 Compare July 27, 2018 14:14
@@ -324,62 +364,15 @@ def workflow_status(ctx, workflow, _filter, output_format,
access_token)
verbose_headers = ['id', 'user']
headers = ['name', 'run_number', 'created',
'status', 'progress', 'command']
'status', 'progress']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we add progress only if the status response contains progress info? To handle the case in which progress is not still there?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this won't raise an error but show 0/0 as the progress fields are initialized to 0 when a row gets added in Job table. I also think it shouldn't be shown in this case nonetheless.

row['status'],
'{0}/{1}'.
format(
row['progress']['succeeded'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you reproduce?

$ export REANA_WORKON=$(reana-client create -f reana-yadage.yaml)
$ reana-client status
Workflow status could not be retrieved:
'succeeded'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I'm working on it I forgot to set the label

* ADD step column to show current running step in workflow,
  and show Job.prettified_cmd to command column.

Signed-off-by: Dinos Kousidis <dinos.kousidis@cern.ch>
@dinosk dinosk force-pushed the progress-columns-prettified-cmd-and-step branch from 5b8f4f8 to 5e64a03 Compare July 27, 2018 16:02
Signed-off-by: Dinos Kousidis <dinos.kousidis@cern.ch>
@dinosk dinosk force-pushed the progress-columns-prettified-cmd-and-step branch from b5bf961 to 7156be3 Compare July 30, 2018 14:41
else:
return '-/-'

def _get_data_from_row(row, data, headers):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we maybe remove data as parameter, and return a new list every time? So down, in workflow_status scope, when we call it we are always in control of what goes inside data making it easier to debug?

@tiborsimko tiborsimko merged commit 7156be3 into reanahub:master Aug 1, 2018
@tiborsimko tiborsimko added this to Done in v0.3.0 Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v0.3.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants