From 4b6f4f182d779d91af071b8fb6ae591c814efead Mon Sep 17 00:00:00 2001 From: Vinyl-Davyl Date: Mon, 23 Mar 2026 14:40:38 +0100 Subject: [PATCH 1/2] feat: exposes the `is_inside_foreach` boolean for DAG steps in endpoint --- services/ui_backend_service/data/cache/custom_flowgraph.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/ui_backend_service/data/cache/custom_flowgraph.py b/services/ui_backend_service/data/cache/custom_flowgraph.py index cc67f4030..53c45bd0d 100644 --- a/services/ui_backend_service/data/cache/custom_flowgraph.py +++ b/services/ui_backend_service/data/cache/custom_flowgraph.py @@ -250,6 +250,7 @@ def node_to_dict(name, node): "doc": node.doc, "next": node.out_funcs, "foreach_artifact": node.foreach_param, + "is_inside_foreach": node.is_inside_foreach, } def populate_block(start_name, end_name): @@ -280,4 +281,4 @@ def populate_block(start_name, end_name): steps_info["end"] = node_to_dict("end", self.nodes["end"]) graph_structure.append("end") - return steps_info, graph_structure + return steps_info, graph_structure \ No newline at end of file From 70aa66b783c291a0646e0899f2ef6df62d29b996 Mon Sep 17 00:00:00 2001 From: Vinyl-Davyl Date: Mon, 23 Mar 2026 14:40:54 +0100 Subject: [PATCH 2/2] chore: updatted tests --- .../tests/unit_tests/custom_flowgraph_test.py | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/services/ui_backend_service/tests/unit_tests/custom_flowgraph_test.py b/services/ui_backend_service/tests/unit_tests/custom_flowgraph_test.py index 16554c43a..0c1e2cc6b 100644 --- a/services/ui_backend_service/tests/unit_tests/custom_flowgraph_test.py +++ b/services/ui_backend_service/tests/unit_tests/custom_flowgraph_test.py @@ -87,7 +87,8 @@ def end(self): "next": [ "regular_step" ], - "foreach_artifact": None + "foreach_artifact": None, + "is_inside_foreach": False }, "regular_step": { "name": "regular_step", @@ -98,7 +99,8 @@ def end(self): "prepare_foreach", "prepare_foreach2" ], - "foreach_artifact": None + "foreach_artifact": None, + "is_inside_foreach": False }, "prepare_foreach": { "name": "prepare_foreach", @@ -108,7 +110,8 @@ def end(self): "next": [ "process_foreach" ], - "foreach_artifact": "things" + "foreach_artifact": "things", + "is_inside_foreach": False }, "process_foreach": { "name": "process_foreach", @@ -118,7 +121,8 @@ def end(self): "next": [ "join" ], - "foreach_artifact": None + "foreach_artifact": None, + "is_inside_foreach": True }, "join": { "name": "join", @@ -128,7 +132,8 @@ def end(self): "next": [ "ultimate_join" ], - "foreach_artifact": None + "foreach_artifact": None, + "is_inside_foreach": False }, "prepare_foreach2": { "name": "prepare_foreach2", @@ -138,7 +143,8 @@ def end(self): "next": [ "process_foreach2" ], - "foreach_artifact": "things" + "foreach_artifact": "things", + "is_inside_foreach": False }, "process_foreach2": { "name": "process_foreach2", @@ -148,7 +154,8 @@ def end(self): "next": [ "join2" ], - "foreach_artifact": None + "foreach_artifact": None, + "is_inside_foreach": True }, "join2": { "name": "join2", @@ -158,7 +165,8 @@ def end(self): "next": [ "after_join" ], - "foreach_artifact": None + "foreach_artifact": None, + "is_inside_foreach": False }, "after_join": { "name": "after_join", @@ -168,7 +176,8 @@ def end(self): "next": [ "ultimate_join" ], - "foreach_artifact": None + "foreach_artifact": None, + "is_inside_foreach": False }, "ultimate_join": { "name": "ultimate_join", @@ -178,7 +187,8 @@ def end(self): "next": [ "end" ], - "foreach_artifact": None + "foreach_artifact": None, + "is_inside_foreach": False }, "end": { "name": "end", @@ -186,7 +196,8 @@ def end(self): "line": 65, "doc": "", "next": [], - "foreach_artifact": None + "foreach_artifact": None, + "is_inside_foreach": False } }, "graph_structure": [ @@ -273,3 +284,4 @@ def end(self): pass # expect a raised exception else: assert False # Parsing should have failed +