I'm currently working on a flow that triggers seve...
# ask-community
j
I'm currently working on a flow that triggers several flows via StartFlowRun, and I'm seeing that the RunConfig that I pass is being ignored s.t. the run config for flow on Prefect UI is just an empty dict (IE the default). Is this a known issue? I'm on a slightly older version,
0.14.22
, but a quick dig through github issues didn't reveal any known problem with this (or any changes to that task definition for quite a while), so I may just being doing something wrong.
a
Hi @Jeff Baatz, that’s indeed a bit weird - could you share how it’s defined in your flow, which storage parent and child flows are using and what run configuration you are passing to it? (asking about storage because maybe it has something to do with pickle vs. script based storage) In general, if it’s possible for you to upgrade to a newer version, starting from 0.15.0 there is even a better option to trigger child flow runs using the create_flow_run task rather than StartFlowRun.
j
Upgrading is a bit of an effort at the moment, unfortunately, but it's in the short term agenda to fix that. The primary flow is running via ECSRun with S3Storage. I'm able to replicate the same behavior via a local flow.run(). The run config that's being overridden is a DockerRun. I've tried creating the DockerRun config object at runtime within a task, as well as statically prior to flow creation. I also dug into the source a bit and can confirm that the serialized run config makes it all the way to the graphql call, so the issue would probably be on the receiving end of that trigger?
To clarify: The primary flow (the one invoking
StartFlowRun
) is an ECSRun with S3Storage. The flow being triggered is a DockerRun, also with S3Storage.
Ahh. Okay, interesting. The labels in the RunConfig override are making it through. But the image that I'm supplying as part of the DockerRun is NOT making it through.
I think you're right, I think my storage configuration is causing some problems for me. I will dig into it a little bit more!
upvote 1
a
@Jeff Baatz Do you use ECS agent only, or both ECS agent and Docker agent? DockerRun has the effect that a Flow gets executed on the Docker agent’s instance as a Docker container (not on ECS). What could be causing issues is what gets executed where - because you have both ECSRun and DockerRun. It could be helpful to store your Flow as script on S3 to ensure that there is no confusion about what happens at build time vs. run time, i.e. your RunConfiguration defined in a Flow on S3 gets evaluated at each FlowRun rather than only at registration time.
j
I'm definitely going to look at that flag, yeah. That's a good tip. Because of our setup, the ECSRun/DockerRun combo is actually a workaround to dispatch CPU jobs to ECS but GPU jobs to an on-prem server. We have some eventual plans to just move to Kube altogether but it's a ways off.
One of the big reasons we selected prefect, actually, was because it was relatively easy to stand something up in this ad-hoc and non-homogenous compute environment.
But of course there are still some headaches when it comes to actually dealing with this type of fragmented system in practice. It's to be expected.
a
@Jeff Baatz I totally get it, flexibility comes at a price 🙂 Sounds like a really nice setup with the GPU vs CPU jobs! And definitely, it’s a perfect use case for Prefect combining the on-prem and cloud workflows. Good luck and LMK if there is anything I can help with.