Hi! I've encountered a couple of issues while work...
# ask-community
k
Hi! I've encountered a couple of issues while working with some of my flows in prefect 2.0 : 1. Issue with dbt Run and Wait_for: In some flows, I'm utilizing the map function to iterate tasks, followed by a dbt run. Surprisingly, the dbt run doesn't seem to wait for the previous tasks to complete, despite using the wait_for function. I'm unsure if I've missed something in the configuration. 2. Flow Update Recognition Problem: I made updates to one of my flows and re-deployed it. However, the flow doesn't seem to recognize the new changes and is still referencing the old configuration. I'd greatly appreciate your guidance in troubleshooting these issues.
n
hey @ketan - can you share your code using
wait_for
? and on 2, can you share where your flow code lives?
k
Wait_for code
2. prefect cloud
n
i think for the DbtCoreOperation you actually want wait_for=write_to_s3 because the task that generates that result is being mapped, so write_to_s3 is already a list
k
Thanks Nate, i will update it and check
And what's about the redeployment , its still taking the old changes
n
and your flow code must be saved somewhere (prefect cloud doesnt store flow code) like github, s3 or a local file system. how did you create your deployment?
k
Sorry, its local file system
n
okay, how are you running your deployment when you notice that your changes are not taking effect ?
k
Basically the code currently present in the agent machine
Copy code
prefect deploy --name ocrolus_analytics_flow
n
okay, and then you run a worker locally and trigger a flow run from your deployment?
k
I wanted to share that I am responsible for maintaining the
prefect.yaml
file, which serves as the foundation for my deployments.
Copy code
prefect deploy --name ocrolus_analytics_flow
And then using the above command i deploy the flow. Once the deployment process is complete, I'm able to execute tasks directly from the user interface (UI).
n
hmm, in order to run a deployment, you must have a worker someplace thats picking up the flow runs created from your deployment (when you click quick run / custom run in the UI) - do you know where thats running / can you see its logs?
k
yes, while deployment i have mentioned the worker pool, in which the flow should run
and
prefect worker start --pool 'prod-agent-1'
using this command my worker is running in the backed
n
do you happen to have the worker logs? when a flow runs, the worker logs should include where its pulling the flow code from
k
let me check
I have tested the
wait_for=write_to_s3
, its still not working
n
hmm, okay i will look more tomorrow