Hi, I'm currently migrating from prefect 2 to pref...
# ask-community
j
Hi, I'm currently migrating from prefect 2 to prefect 3. My project structure as below: common/ └── utils.py flow1/ └── flow1.py flow2/ └── flow2.py And I host prefect worker on EC2, to pull code from S3 block. This is one of the version i tried, common module code are manually uploaded to S3. The flow deployed successfully, however return ModuleNotFoundError: No module named 'common' Wanna seek for some advance for pulling common module code from S3
n
hi @jeffreycheung - do you mind moving the big code example to a snippet in the thread? > Another question about the task dependency, in prefect 2 I use wait_for in submit(), what will be the replacement for prefect 3 to answer this question right away,
wait_for
has not changed in 3.x - its the exact same syntax
🙏 1
j
# flow1.py (simplify to show how i deploy the flow only)
n
so what type of work pool is
default-worker-pool
? it seems like what is missing is that no one is running
pip install common
or
pip install .
in your runtime environment the most typical way to solve this is to build a docker image that has your
common
lib pip installed, and then specifying that
image
in your docker/k8s work pool etc But if you have a process worker, you could pip install your common lib at runtime in a pull step (arbitrary setup a worker performs), but some people don't like this because it pollutes the python environment where your worker runs
j
thx @Nate i think i will either prepare the package for that one more question, if i manually change failed task state to completed, is there anyway to skip task run during flow retry?