diff --git a/6103.fix.md b/6103.fix.md new file mode 100644 index 00000000000..47844cd1ea6 --- /dev/null +++ b/6103.fix.md @@ -0,0 +1,2 @@ +Absolute dependencies (dependencies on tasks in a specified cycle rather than at a specified offset) are now visible in the GUI beyond the specified cycle. + diff --git a/cylc/flow/taskdef.py b/cylc/flow/taskdef.py index 68f754277d8..448844c8cc3 100644 --- a/cylc/flow/taskdef.py +++ b/cylc/flow/taskdef.py @@ -101,11 +101,7 @@ def generate_graph_parents(tdef, point, taskdefs): # where (point -Px) does not land on a valid point for woo. # TODO ideally validation would flag this as an error. continue - is_abs = (trigger.offset_is_absolute or - trigger.offset_is_from_icp) - if is_abs and parent_point != point: - # If 'foo[^] => bar' only spawn off of '^'. - continue + is_abs = trigger.offset_is_absolute or trigger.offset_is_from_icp graph_parents[seq].append((parent_name, parent_point, is_abs)) if tdef.sequential: diff --git a/tests/integration/test_data_store_mgr.py b/tests/integration/test_data_store_mgr.py index 4d808bacc0a..906b1ac052d 100644 --- a/tests/integration/test_data_store_mgr.py +++ b/tests/integration/test_data_store_mgr.py @@ -18,6 +18,7 @@ from typing import TYPE_CHECKING from cylc.flow.data_store_mgr import ( + EDGES, FAMILY_PROXIES, JOBS, TASKS, @@ -316,3 +317,36 @@ def test_delta_task_prerequisite(harness): p.satisfied for t in schd.data_store_mgr.updated[TASK_PROXIES].values() for p in t.prerequisites}) + + +async def test_absolute_graph_edges(flow, scheduler, start): + """It should add absolute graph edges to the store. + + See: https://github.com/cylc/cylc-flow/issues/5845 + """ + runahead_cycles = 1 + id_ = flow({ + 'scheduling': { + 'initial cycle point': '1', + 'cycling mode': 'integer', + 'runahead limit': f'P{runahead_cycles}', + 'graph': { + 'R1': 'build', + 'P1': 'build[^] => run', + }, + }, + }) + schd = scheduler(id_) + + async with start(schd): + await schd.update_data_structure() + + assert { + (Tokens(edge.source).relative_id, Tokens(edge.target).relative_id) + for edge in schd.data_store_mgr.data[schd.id][EDGES].values() + } == { + ('1/build', f'{cycle}/run') + # +1 for Python's range() + # +2 for Cylc's runahead + for cycle in range(1, runahead_cycles + 3) + }