This is an automated email from the ASF dual-hosted git repository.

utkarsharma pushed a commit to branch sync_2-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit c98da8bef432e374a610e111cd8aa6f153317bd9
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Nov 30 22:07:25 2024 +0100

    [v2-10-test] fix gantt flickering #42215 (#44488) (#44517)
    
    (cherry picked from commit 0c354e7f6a34ab05b4ce239ece77fd05bbffe9a5)
    
    Co-authored-by: darkag <[email protected]>
---
 airflow/www/static/js/dag/details/gantt/index.tsx | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/airflow/www/static/js/dag/details/gantt/index.tsx 
b/airflow/www/static/js/dag/details/gantt/index.tsx
index 45c10d2b525..1ed5c353deb 100644
--- a/airflow/www/static/js/dag/details/gantt/index.tsx
+++ b/airflow/www/static/js/dag/details/gantt/index.tsx
@@ -144,20 +144,10 @@ const Gantt = ({
 
   // Reset state when the dagrun changes
   useEffect(() => {
-    if (startDate !== dagRun?.queuedAt && startDate !== dagRun?.startDate) {
-      setStartDate(dagRun?.queuedAt || dagRun?.startDate);
-    }
-    if (!endDate || endDate !== dagRun?.endDate) {
-      // @ts-ignore
-      setEndDate(dagRun?.endDate ?? moment().add(1, "s").toString());
-    }
-  }, [
-    dagRun?.queuedAt,
-    dagRun?.startDate,
-    dagRun?.endDate,
-    startDate,
-    endDate,
-  ]);
+    setStartDate(dagRun?.queuedAt || dagRun?.startDate);
+    // @ts-ignore
+    setEndDate(dagRun?.endDate ?? moment().add(1, "s").toString());
+  }, [dagRun?.queuedAt, dagRun?.startDate, dagRun?.endDate]);
 
   const numBars = Math.round(width / 100);
   const runDuration = getDuration(startDate, endDate);

Reply via email to