-
Notifications
You must be signed in to change notification settings - Fork 1
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
[IBCDPE-691] Adds Ability to Retrieve Workflow Task Logs from Tower #29
Conversation
✅ Linked to Story IBCDPE-691 · Extract hundreds of tower execution logs easily |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #29 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 28 28
Lines 874 920 +46
Branches 138 140 +2
=========================================
+ Hits 874 920 +46
☔ View full report in Codecov by Sentry. |
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.
Changes LGTM!
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.
🔥
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This PR adds functionality to the
nextflowtower
service to retrieve metadata for the individual tasks in a Tower workflow run, and then to retrieve the execution logs for those individual tasks.To do this, I implemented the
get_workflow_tasks
methods inNextflowTowerClient
andNextflowTowerOps
.client.get_workflow_tasks
uses the/workflow/{workflow_id}/tasks
Tower API endpoint to retrieve information about all of the tasks. Each individual task dictionary is then converted into amodels.WorkflowTask
object.Task logs can now be retrieved by using the
get_task_logs
methods inclient
andops
.client.get_task_logs
uses the/workflow/{workflow_id}/log/{task_id}
Tower API endpoint to retrieve execution logs for an individual task.Tests and example responses have also been added where necessary for all new methods.
Finally, I have included
demo_nf_logs.py
as an example of a Metaflow DAG that users can follow to retrieve task logs and evaluate why a workflow task has failed. I am unsure whether this script should belong in this repo, or inorca-recipes
, however.