Add an endpoint to track action/workflow executions belong to a certain task
We currently dont' have any support for tracking parent-child relationship between workflows. From DB model perspective there's the field "task_execution_id" for all executions (actions, workflows) that expresses this relationship. This field is also present in REST resources that we can get using /executions endpoint (to get workflow executions). This help us answer the question "What task do this workflow execution belong to?" (=> "What workflow does this workflow execution belong to?" or simply "What is the parent workflow execution of this workflow execution?".
However, practically we also need to be able to answer the question "What are the child workflow executions of this task execution?". It's needed to build a convenient UI (e.g. we see a task and would like to expand a tree associated with this task) and CLI commands.
Proposed solution:
* Add a new endpoint that would allow us to get all child executions of the given task execution
/tasks/
The result would be a list of objects of two possible types: 1) workflow executions (similar to /executions) in case if the task is configured to run workflow 2) action executions (similar to /action_executions) in case if the task is configured to run actions
* Modify /v2/tasks endpoint so that objects returned by it also include field "task_type" with two possible values: action, workflow. That would allow to know what type of objects to expect from new endpoint /tasks/
Blueprint information
- Status:
- Complete
- Approver:
- Renat Akhmerov
- Priority:
- High
- Drafter:
- Renat Akhmerov
- Direction:
- Approved
- Assignee:
- Michal Gershenzon
- Definition:
- Approved
- Series goal:
- Accepted for ocata
- Implementation:
- Implemented
- Milestone target:
- ocata-1
- Started by
- Renat Akhmerov
- Completed by
- Renat Akhmerov
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
WIP: moving REST resources to resources.py
Addressed by: https:/
Move the remainder of REST resources to resources.py
Addressed by: https:/
Add the new endpoint /v2/tasks/
renat: May be we even don't need this shortcut /executions endpoint but instead just add something like 'task_type' (action | workflow) into task itself so that on the client side we knew what exact subendpoint to call
Addressed by: https:/
Add type to tasks API