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

Make gantt view to show also retries #17487

Closed
alexInhert opened this issue Aug 7, 2021 · 12 comments
Closed

Make gantt view to show also retries #17487

alexInhert opened this issue Aug 7, 2021 · 12 comments
Labels
area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues kind:feature Feature Requests

Comments

@alexInhert
Copy link

Description

Currently Gantt View shows only the last successful task retry.
This means that if we have t1 >> t2 >> t3
if we had:
t1 started on 08:00 finished 09:00
t2 1st retry started 09:01 failed on 13:00
t2 2nd retry started on 13:02 finished on 15:00
t3 started on 15:01 finished on 15:02

What the gantt view will show us is
t1 08:00-09:00
t2 13:02-15:00
t3 15:01-15:02

This makes it really hard to understand what really happen because it doesn't show what really happened.
This is very annoying for DAGs with so many tasks because you can't tell if the problem is due to tasks not being scheduled or this is something else. I understand the value of the current display but maybe it can add some toggle to consider also all the task instances?

Use case / motivation

The gantt somehow should show the actual information.

Are you willing to submit a PR?

Don't have the skills for that.

@alexInhert alexInhert added the kind:feature Feature Requests label Aug 7, 2021
@bbovenzi bbovenzi added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Aug 9, 2021
@bbovenzi
Copy link
Contributor

I've been thinking about how to make the gantt view more useful (I think it has a lot of potential). Showing the full state history of a task instance would be a great part of that.

@ShakaibKhan
Copy link
Contributor

I would like to try implementing this

@bbovenzi
Copy link
Contributor

Sweet. Just assigned you. Feel free to reach out if you need anything!

@ShakaibKhan
Copy link
Contributor

A little confused as to what is being asked for as it look like task retries are shown in the gantt view. So is the focus of this issue to have a toggle to choose which task history to display?
Screen Shot 2021-10-24 at 7 31 37 PM

@alexInhert
Copy link
Author

@ShakaibKhan @bbovenzi see this example
Screen Shot 2021-11-30 at 20 27 28

As you can see there is significant gap between the tasks. When you hover over the task you see it is the 2nd retry. If going into the log it shown that the first retry run for the duration of the purple rectangle.
My request is to add the purple rectangle. I want to see also the retries in the gantt without it - the Gantt just looks like the scheduler didn't schedule anything during this time which is incorrect view of what really happened.
I think the current setup is useful I'm asking for a way to enrich it also with the retries of the tasks to show the full picture.

@ShakaibKhan
Copy link
Contributor

@alexInhert make sense to me and agree that retries should be shown; could you please share the DAG you used to make the above gantt chart

@ShakaibKhan
Copy link
Contributor

Sorry I do not think I can take on this issue at this time. Unassigning to myself

@ShakaibKhan ShakaibKhan removed their assignment Jan 19, 2022
@yxiao1996
Copy link
Contributor

Reproduce the scenario described in this issue with a python operator which causes failed task at 50% chance

@task(task_id=f"sleep_and_randomly_fail", retries=1)
def my_sleeping_function():
    time.sleep(5)
    if random.uniform(0, 1) > 0.5:
        raise ValueError("Mock Exception.")

From the DAG run results it seems to me this issue is already addressed, as in the following snapshot we can see both failed 1st run and successful 2nd run in gantt chart. Under the hood, reruns of a tasks are stored as different task instances.
Screenshot_20230108_112349

Screenshot_20230108_112408

@bbovenzi
Copy link
Contributor

bbovenzi commented Feb 3, 2023

Yes, we record Task Fails should be included in the Gantt chart. We also record Task Reschedules which would probably be helpful. But I think that's the most we could do with the existing tables in Airflow.

@eladkal eladkal mentioned this issue Jun 9, 2023
@tirkarthi
Copy link
Contributor

TaskFail entries are now displayed in gantt chart with #37918

@bbovenzi
Copy link
Contributor

Any other improvements will come with AIP-64

@jscheffl
Copy link
Contributor

Implemented in #40304 and #40357 - will be part of Airflow 2.10!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues kind:feature Feature Requests
Projects
None yet
Development

No branches or pull requests

6 participants