I am trying something a bit unconventional. Given ...
# flytekit
p
I am trying something a bit unconventional. Given that several task is performing modification to a
FlyteDirectory
and output the same
FlyteDirectory
. Is it possible to force all the
FlyteDirectory
to be backed by the same GCS path? Essentially sharing a directory content across tasks.
Copy code
@task
def task(work_dir: FlyteDirectory) -> FlyteDirectory:
    # do something in work_dir
    # potentially add files
    return work_dir

@workflow
def workflow():
    work_dir = init_workdir()
    work_dir = task(work_dir)
    work_dir = task(work_dir)
    work_dir = task(work_dir)
k
This is what will happen
Every downstream task will use the same location
p
Oh you are right!
150 Views