Uh oh!
There was an error while loading. Please reload this page.
#55020 gantt view is not getting updatedin realtime - #55130
Conversation
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
guan404ming
left a comment
There was a problem hiding this comment.
Thanks for fix, left some comments~
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
yimingpeng
commented
Sep 2, 2025
Hello @guan404ming, Thanks for all the great suggestions, I believe I have addressed them, also made a few more changes, e..g, expanding to other pending tasks ( Here is the expanded test dag from the original issue post: fromdatetimeimportdatetime, timedeltafromairflowimportDAGfromairflow.providers.standard.operators.bashimportBashOperatorfromairflow.providers.standard.operators.pythonimportPythonOperatorfromairflow.providers.standard.sensors.filesystemimportFileSensorfromairflow.utils.task_groupimportTaskGroupdeftask_that_fails():
raiseException("This task always fails for testing")
deftask_that_succeeds():
print("This task succeeds")
return"success"dag=DAG(
'test_gantt_chart_dag',
start_date=datetime(2025, 7, 1),
schedule=None,
is_paused_upon_creation=False,
catchup=False,
max_active_runs=1,
default_args={
'retries': 2,
'retry_delay': timedelta(seconds=10),
}
)
long_running_task=BashOperator(
task_id="long_running_task",
bash_command="echo 'Starting long task'; sleep 180; echo 'Long task completed'",
dag=dag
)
queued_task=BashOperator(
task_id="queued_task", bash_command="echo 'Queued task executed'; sleep 30",
dag=dag,
pool='default_pool',
pool_slots=10
)
failing_task=PythonOperator(
task_id="failing_task",
python_callable=task_that_fails,
dag=dag
)
waiting_sensor=FileSensor(
task_id="waiting_sensor",
filepath="/tmp/nonexistent_file_for_testing.txt",
timeout=300,
poke_interval=30,
dag=dag
)
scheduled_task=BashOperator(
task_id="scheduled_task",
bash_command="echo 'Scheduled task executed'; sleep 15",
dag=dag
)
quick_success_task=PythonOperator(
task_id="quick_success_task",
python_callable=task_that_succeeds,
dag=dag
)
upstream_failed_task=BashOperator(
task_id="upstream_failed_task",
bash_command="echo 'This should not run due to upstream failure'",
dag=dag
)
withTaskGroup("processing_group", dag=dag) asprocessing_group:
group_start=BashOperator(
task_id="group_start",
bash_command="echo 'Group starting'; sleep 5",
dag=dag,
)
parallel_task_1=BashOperator(
task_id="parallel_task_1", bash_command="echo 'Parallel task 1 running'; sleep 60",
dag=dag,
)
parallel_task_2=PythonOperator(
task_id="parallel_task_2",
python_callable=task_that_fails,
dag=dag,
)
parallel_task_3=BashOperator(
task_id="parallel_task_3",
bash_command="echo 'Parallel task 3 running'; sleep 45",
dag=dag,
)
group_end=BashOperator(
task_id="group_end",
bash_command="echo 'Group completed'; sleep 10",
trigger_rule="none_failed_min_one_success",
dag=dag,
)
group_start>> [parallel_task_1, parallel_task_2, parallel_task_3] >>group_endfinal_task=BashOperator(
task_id="final_task",
bash_command="echo 'All processing completed'",
dag=dag
)
long_running_task>>scheduled_taskquick_success_task>>queued_taskfailing_task>>upstream_failed_taskwaiting_sensor>>scheduled_taskprocessing_group>>final_taskHere is the new recording after the fix is applied: Screen.Recording.2025-09-02.at.11.13.34.PM.mov |
guan404ming
left a comment
There was a problem hiding this comment.
Overall looks good, one nit
Uh oh!
There was an error while loading. Please reload this page.
guan404ming
left a comment
There was a problem hiding this comment.
Overall looks good!
cc @bbovenzi@pierrejeambrun
would appreciate it if you could take another look when you have a moment, thanks!
guan404ming
commented
Sep 12, 2025
@yimingpeng please help rebase and fix the tests, thanks! |
bd88e6b to
b10c1f5CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
d177a0a to
8cfbdaeCompare8cfbdae to
b863840Compareyimingpeng
commented
Sep 14, 2025
hello @bbovenzi, thanks for the code review, I guess you meant |
Uh oh!
There was an error while loading. Please reload this page.
* Fix real-time updates for running tasks in Gantt chart view * Fix linting * Use DEFAULT_DATETIME_FORMAT_WITH_TZ as recommended * Fix linting issue
* Fix real-time updates for running tasks in Gantt chart view * Fix linting * Use DEFAULT_DATETIME_FORMAT_WITH_TZ as recommended * Fix linting issue
Hello there,
This PR is an attempt to fix#55020 where the gantt chart wasn't showing real-time progress for running tasks.
closes: #55020
After applying the fix:
Screen.Recording.2025-09-01.at.9.18.13.PM.mov
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.