tirkarthi commented on issue #44259:
URL: https://github.com/apache/airflow/issues/44259#issuecomment-2587060182
Hi, I started working on task overview page which needs UI specific APIs
with only duration fields like (start_date, end_date, state, queued_dttm). I
have the following questions.
1. How do we define the success rate interval for a given range? i.e. If
it's 24 hours, should the success/failed ratio be calculated per hour or 2
hours?
2. For all runs in the third bar chart what would be the grouping? Is it
similar to the success/failed ratio
3. For all runs what would the bar for each interval look like since there
is already success rate of red/green in second chart
IMO computing the grouping information on the server side probably in sql
itself will be more efficient than sending all the durations to frontend for
computation. Something like below that sends last 14 task instances and then
the summary info in other fields of the response
GET localhost:8000/ui/task_instances/task_instance_durations
dag_id==tutorial_taskflow_api task_id==extract
```json
{
"task_instances": [
{
"dag_id": "tutorial_taskflow_api",
"end_date": "2025-01-13T04:34:02.260203Z",
"queued_dttm": "2025-01-13T04:33:58.576995Z",
"start_date": "2025-01-13T04:34:01.982578Z",
"state": "success",
"task_id": "extract",
"try_number": 1
},
],
"success_rate": [
"2025-01-13T00:00:00": {"failed": 10, "success": 90},
"2025-01-13T02:00:00": {"failed": 40, "success": 60},
],
"total_entries": 14
}
```
Thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]