Hi all! I have been playing around with dependant...
# ask-community
e
Hi all! I have been playing around with dependant flows, and was looking at using
get_task_run_result
to retrieve task results from the child flow, however I was getting errors where it couldn't find a task with the provided slug (which I had set to 'output') - I thought it was an issue with my results location until I realized that despite annotating the child task like so:
@task(slug="output",result=GCSResult(...
the slug name (as visible in the context) was
output-copy
. I now got
get_task_run_result
working by grabbing the task with slug
output-copy
but was unsure of how the
-copy
came about. Is this documented anywhere?
k
Hey @Elijah Moreau-Arnott, first, this isn’t documented because slugs are primarily internal facing things that users don’t have to worry about. The specific answer to your question is that there is a specific case where if you provide a
slug
to
task
and use it inside a Flow block
with Flow…
, then it will generate the copy. If you don’t provide the slug, the
copy
won’t appear.
e
If slugs are primarily internal facing - am I doing this as intended? I assumed that using
get_task_run_result
from a separate flow required the use of named slugs to determine the desired task
k
Hey Elijah, I see your point. Will ask the team about this and see what we can do about it.
z
I think I would consider this a bug in slug generation
Generally, the way they're generated is a bit overzealous in ensuring that the tasks are safe to use in multiple flows
Slugs are the only way I could reasonably write
get_task_run_result
but they are indeed a bit hard to work with right now. The next step in subflow result retrieval is making task slugs easier to find 🙂