@@ -136,6 +136,7 @@ def __init__(
136
136
wapi_adapter : WorkflowAPIAdapter ,
137
137
instance_launcher : InstanceLauncher ,
138
138
instance_link_glob : str = ".instance-*" ,
139
+ instance_id_dir_prefix : str = "." ,
139
140
):
140
141
"""Initialiser, given a Workflow API adapter, Instance launcher,
141
142
and a step (directory) link 'glob' (a convenient directory glob to
@@ -145,6 +146,7 @@ def __init__(
145
146
self ._wapi_adapter : WorkflowAPIAdapter = wapi_adapter
146
147
self ._instance_launcher : InstanceLauncher = instance_launcher
147
148
self ._instance_link_glob : str = instance_link_glob
149
+ self ._instance_id_dir_prefix : str = instance_id_dir_prefix
148
150
149
151
self ._predefined_variables : dict [str , Any ] = {
150
152
"instance-link-glob" : instance_link_glob
@@ -619,8 +621,14 @@ def _prepare_step(
619
621
running_workflow_id = rwf_id ,
620
622
)
621
623
assert prior_step
622
- assert "instance_directory" in prior_step
623
- p_instance_dir : str = prior_step ["instance_directory" ]
624
+ _LOGGER .info (
625
+ "API.get_running_workflow_step_by_name(%s) got %s\n " ,
626
+ prior_step_name ,
627
+ str (prior_step ),
628
+ )
629
+ assert "instance_id" in prior_step
630
+ p_i_id : str = prior_step ["instance_id" ]
631
+ p_i_dir : str = f"{ self ._instance_id_dir_prefix } { p_i_id } "
624
632
# Get prior step Job (tro look for inputs)
625
633
# (if we're not a combiner)
626
634
p_job_inputs : dict [str , Any ] = {}
@@ -644,8 +652,8 @@ def _prepare_step(
644
652
assert connector .in_ in prior_step ["variables" ]
645
653
value : str = prior_step ["variables" ][connector .in_ ]
646
654
if not we_are_a_combiner and connector .in_ in p_job_inputs :
647
- # Prefix with prior-step instance directory
648
- value = f"{ p_instance_dir } /{ value } "
655
+ # Prefix with prior-step's instance directory
656
+ value = f"{ p_i_dir } /{ value } "
649
657
prime_variables [connector .out ] = value
650
658
651
659
# Our step's prime variables are now set.
0 commit comments