-
Notifications
You must be signed in to change notification settings - Fork 38
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
rest: optimise include_progress
functionality
#486
Comments
Add `--include-command` flag to the `list` and `status` commands that, when set, will display info about the command currently being executed by the workflow (or the last command). In case there is no info about the command, the step name will be displayed, if possible. Closes reanahub/reana-workflow-controller#486.
Add `--include-command` flag to the `list` and `status` commands that, when set, will display info about the command currently being executed by the workflow (or the last command). In case there is no info about the command, the step name will be displayed, if possible. Closes reanahub/reana-workflow-controller#486.
Several considerations: (1) Naming-wise, "command" may not be understandable. It would be better to call it "last-command" or "last-run-command", or "last-started-command", or "most-recently-started-command", or some such. (2) The origin of the need "show which command runs" comes notably from the Serial workflow engine where showing the progress via single command makes the most sense. For CWL/Snakemake/Yadage workflows, there can be many commands that run concurrently in parallel, possibly for hours. Hence the notion of a single "command" to show could be very ambiguous. This underlines the need for naming clarity. For now, changing the naming to something more self-understandable, such as "last-started-command", should be enough. For the future though, we may want to display progress of all the "commands" of the workflow differently, via ASCII tables such as:
Anyway, this is something for another issue later. Just illustrating the full picture here of where we might be heading later. (3) The "command" information can be multi-line, for example: $ rcg status -watlas-recast-yadage-kubernetes --verbose
NAME RUN_NUMBER CREATED STARTED ENDED STATUS PROGRESS ID USER COMMAND DURATION
atlas-recast-yadage-kubernetes 31 2023-09-28T06:05:16 2023-09-28T06:05:42 2023-09-28T06:06:48 finished 2/2 3f064760-04e8-403c-b4dd-6379ca016f78 eeeeeeee-dddd-cccc-bbbb-aaaaaaaaaaaa source /home/atlas/release_setup.sh 66
python /code/make_ws.py /code/data/data.root /var/reana/users/eeeeeeee-dddd-cccc-bbbb-aaaaaaaaaaaa/workflows/3f064760-04e8-403c-b4dd-6379ca016f78/eventselection/submitDir/hist-sample.root /code/data/background.root
mkdir -p /var/reana/users/eeeeeeee-dddd-cccc-bbbb-aaaaaaaaaaaa/workflows/3f064760-04e8-403c-b4dd-6379ca016f78/statanalysis/fitresults
python /code/plot.py results/meas_combined_meas_model.root /var/reana/users/eeeeeeee-dddd-cccc-bbbb-aaaaaaaaaaaa/workflows/3f064760-04e8-403c-b4dd-6379ca016f78/statanalysis/fitresults/pre.png /var/reana/users/eeeeeeee-dddd-cccc-bbbb-aaaaaaaaaaaa/workflows/3f064760-04e8-403c-b4dd-6379ca016f78/statanalysis/fitresults/post.png
python /code/set_limit.py results/meas_combined_meas_model.root \
/var/reana/users/eeeeeeee-dddd-cccc-bbbb-aaaaaaaaaaaa/workflows/3f064760-04e8-403c-b4dd-6379ca016f78/statanalysis/fitresults/limit.png /var/reana/users/eeeeeeee-dddd-cccc-bbbb-aaaaaaaaaaaa/workflows/3f064760-04e8-403c-b4dd-6379ca016f78/statanalysis/fitresults/limit_data.json \
/var/reana/users/eeeeeeee-dddd-cccc-bbbb-aaaaaaaaaaaa/workflows/3f064760-04e8-403c-b4dd-6379ca016f78/statanalysis/fitresults/limit_data_nomsignal.json This is not good, especially for the There are several possible solutions to the formatting issue, such as:
(4) Note also that DURATION is displayed last, after the COMMAND, which makes it hard to see etc. I guess COMMAND should be shown last. (5) We don't want to break the API much at this 0.9.2 release times, so "command" and "current_command" are probably here to stay in the JSON output as is... However we can perhaps at least name the new |
Add `--include-last-command` flag to the `list` and `status` commands that, when set, will display info about the command currently being executed by the workflow (or the last submitted command). In case there is no info about the command, the step name will be displayed, if possible. Closes reanahub/reana-workflow-controller#486.
Add `--include-last-command` flag to the `list` and `status` commands that, when set, will display info about the command currently being executed by the workflow (or the last submitted command). In case there is no info about the command, the step name will be displayed, if possible. Closes reanahub/reana-workflow-controller#486.
Add `--include-last-command` flag to the `list` and `status` commands that, when set, will display info about the command currently being executed by the workflow (or the last submitted command). In case there is no info about the command, the step name will be displayed, if possible. Closes reanahub/reana-workflow-controller#486.
Add `--include-last-command` flag to the `list` and `status` commands that, when set, will display info about the command currently being executed by the workflow (or the last submitted command). In case there is no info about the command, the step name will be displayed, if possible. Closes reanahub/reana-workflow-controller#486.
Add `--include-last-command` flag to the `list` and `status` commands that, when set, will display info about the command currently being executed by the workflow (or the last submitted command). In case there is no info about the command, the step name will be displayed, if possible. Closes reanahub/reana-workflow-controller#486.
Add `--include-last-command` flag to the `list` and `status` commands that, when set, will display info about the command currently being executed by the workflow (or the last submitted command). In case there is no info about the command, the step name will be displayed, if possible. Closes reanahub/reana-workflow-controller#486.
Note that the situation has improved after the performance improvements of reanahub/reana-db#213 |
Right now we have
include_progress
flag in get_workflows endpoint and also use it by default in get_workflow_status endpoint. While returning workflow progress data we are using mainly a job_progress JSON field ofWorkflow
DB table. In addition to that we also query for the most recent Job command and step name.This is an example of how
progress
field ofget_workflows
response looks like forbsm
workflow:This additional DB query to get
current_command
andcurrent_step_name
could be optimised. Currently it's not being used inreana-ui
at all, the only usage of these two fields happens inreana-client
while doing:reana-client status -w workflow -v
. Note that in this case we are callingget_workflow_status
endpoint (this data fromget_workflows
is not being used)One way to optimise this would be to introduce an additional flag to fetch this information and use it only in
reana-client status --verbose
command. This would save us an additional DB query for each of the workflow (especially on UI home page) and some bandwidth while transferringcurrent_command
over the networkThe text was updated successfully, but these errors were encountered: