I’m having an issue with a subclassed Task where the initial execution gets a parameter, but subsequent retries supply None instead.
Essentially what I have is
class TaskWithCommand(ShellTask):
def __init__(self, **kwargs):
super().__init__(**kwargs)
def run(self, command, folder_1, folder_2, folder_3):
to_run = f"{command} '{folder_1}' '{folder_2}' '{folder_3}'"
output_lines = super().run(command=to_run)
return output_lines[-1]
run_command_task = TaskWithCommand(
log_stderr=True,
return_all=True,
max_retries=1,
retry_delay=datetime.timedelta(minutes=30),
)
with Flow("example_flow",) as flow:
folder_1 = Parameter("folder_1", DEFAULT_1)
folder_2 = Parameter("folder_2", DEFAULT_2)
folder_3 = generate_folder()
command_output = run_command_task(
f"script.sh",
folder_1,
folder_2,
folder_3,
)
Interestingly, folder_1 and folder_2 come through fine, but folder_3 is None on subsequent retries, and I don’t see this when my retry interval is on the order of minutes, but only on the order of 30 minutes.