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

vatsrahul1001 pushed a commit to branch v3-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit ee2130aa10a8ff36db2e110a6c68bd92c7c33edd
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Nov 5 09:22:08 2026 -0500

    [v3-4-test] Restore default ELK node placement in Graph view (#76488) 
(#76492)
    
    #65031 switched every graph to ELK's SIMPLE node placement for speed.
    SIMPLE pulls nodes toward one center line and adds many edge bends,
    which made dependency graphs much harder to read after 3.2.2.
    
    Measured with elkjs, SIMPLE saves only 5-15 ms on graphs up to about
    100 nodes and is slower than the default BRANDES_KOEPF placement at
    1000 nodes. The other speedups from #65031 stay: the web worker and
    lower crossing thoroughness for large graphs.
    
    closes: #74398
    (cherry picked from commit b2f327748b867357942bdde4654db08169fa8fd3)
    
    Co-authored-by: Brent Bovenzi <[email protected]>
    Co-authored-by: bbovenzi <[email protected]>
---
 .../airflow/ui/src/components/Graph/elkGraphUtils.test.ts  | 14 ++++++++++++++
 .../src/airflow/ui/src/components/Graph/elkGraphUtils.ts   |  3 ---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git 
a/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.test.ts 
b/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.test.ts
index 6c0de8dc190..d9c5ca28dc5 100644
--- a/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.test.ts
+++ b/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.test.ts
@@ -359,3 +359,17 @@ describe("generateElkGraph — operator colors", () => {
     expect(group?.uiFgcolor).toBe("green.600");
   });
 });
+
+describe("generateElkGraph — layout options", () => {
+  it("keeps ELK's default node placement so nodes are not squeezed toward one 
line", () => {
+    const root = generateElkGraph({
+      direction: "RIGHT",
+      edges: [buildEdge("t1", "t2")],
+      font: "12px sans-serif",
+      nodes: [buildNode({ id: "t1", label: "t1" }), buildNode({ id: "t2", 
label: "t2" })],
+      openGroupIds: [],
+    });
+
+    
expect(root.layoutOptions).not.toHaveProperty("elk.layered.nodePlacement.strategy");
+  });
+});
diff --git a/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts 
b/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts
index 36af06e7f16..998c228f233 100644
--- a/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts
+++ b/airflow-core/src/airflow/ui/src/components/Graph/elkGraphUtils.ts
@@ -423,9 +423,6 @@ export const generateElkGraph = ({
     layoutOptions: {
       "elk.core.options.EdgeLabelPlacement": "CENTER",
       "elk.direction": direction,
-      // SIMPLE placement is a single-pass algorithm — much faster than the
-      // default BRANDES_KOEPF four-pass approach with acceptable quality for 
DAGs.
-      "elk.layered.nodePlacement.strategy": "SIMPLE",
       // Crossing minimisation thoroughness (default 7) controls how many 
random
       // sweeps are attempted. Drop to 3 for large graphs where the extra 
passes
       // rarely pay off and add noticeable layout latency.

Reply via email to