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

rest: add include_command flag to get_workflow and get_workflow_status endpoints #536

Conversation

giuseppe-steduto
Copy link
Member

@giuseppe-steduto giuseppe-steduto force-pushed the improve-include-progress branch from 85a0e13 to 5cfd227 Compare November 1, 2023 14:54
Copy link

codecov bot commented Nov 1, 2023

Codecov Report

Merging #536 (6181379) into master (98e6c9a) will decrease coverage by 0.68%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

❗ Current head 6181379 differs from pull request most recent head 9a6b388. Consider uploading reports for the commit 9a6b388 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #536      +/-   ##
==========================================
- Coverage   72.23%   71.55%   -0.68%     
==========================================
  Files          15       15              
  Lines        1390     1406      +16     
==========================================
+ Hits         1004     1006       +2     
- Misses        386      400      +14     
Files Coverage Δ
reana_workflow_controller/rest/utils.py 81.23% <100.00%> (+0.05%) ⬆️
reana_workflow_controller/rest/workflows.py 66.11% <100.00%> (+0.18%) ⬆️
reana_workflow_controller/rest/workflows_status.py 83.33% <100.00%> (+0.20%) ⬆️

... and 2 files with indirect coverage changes

@giuseppe-steduto giuseppe-steduto force-pushed the improve-include-progress branch 2 times, most recently from 6181379 to 39bd12a Compare November 2, 2023 09:33
@giuseppe-steduto giuseppe-steduto changed the title improve include progress rest: add include_command flag to get_workflow and get_workflow_status endpoints Nov 2, 2023
Comment on lines 286 to 288
include_last_command = json.loads(
request.args.get("include_last_command", "false").lower()
)
Copy link
Member

Choose a reason for hiding this comment

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

What about validating and parsing parameters with use_args, as done in the other endpoint?

@giuseppe-steduto giuseppe-steduto force-pushed the improve-include-progress branch 2 times, most recently from 5778363 to 8618891 Compare November 22, 2023 15:01
CHANGES.rst Outdated
Version 0.9.2 (UNRELEASED)
--------------------------

- Changes ``get_workflow_status``, ``get_workflows`` endpoints to add a ``include_command`` optional parameter to show info about currently executing command.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- Changes ``get_workflow_status``, ``get_workflows`` endpoints to add a ``include_command`` optional parameter to show info about currently executing command.
- Changes ``get_workflow_status``, ``get_workflows`` endpoints to add a ``include_last_command`` optional parameter to show info about currently executing command.

requirements.txt Outdated
@@ -52,8 +52,8 @@ pyrsistent==0.19.3 # via jsonschema
python-dateutil==2.8.2 # via bravado, bravado-core, kubernetes
pytz==2023.3.post1 # via bravado-core
pyyaml==6.0.1 # via bravado, bravado-core, kubernetes, reana-commons, swagger-spec-validator
reana-commons[kubernetes]==0.9.4a2 # via reana-commons, reana-db, reana-workflow-controller (setup.py)
reana-db==0.9.2 # via reana-workflow-controller (setup.py)
reana-commons[kubernetes]==0.9.4a2 # via reana-commons, reana-db, reana-workflow-controller (setup.py)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
reana-commons[kubernetes]==0.9.4a2 # via reana-commons, reana-db, reana-workflow-controller (setup.py)
reana-commons[kubernetes]==0.9.4a3 # via reana-commons, reana-db, reana-workflow-controller (setup.py)

@mdonadoni
Copy link
Member

No need to change API after performance improvements of reanahub/reana-db#213

@mdonadoni mdonadoni closed this Nov 28, 2023
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.

rest: optimise include_progress functionality
2 participants