https://prefect.io logo
Title
m

Miller Jiang

04/05/2023, 12:11 AM
Hi Team, when I try to use
Deployment.build_from_flow
from
prefect.deployments
to deploy flow to Prefect cloud, the process is stuck without erroring out and yet didn’t give any verbose status/progress. I checked the code was uploaded to S3 bucket but the deployment never happened on the Prefect cloud. Do you know what might be the root cause? and is it possible to add more verbose loggings for the
Deployment.build_from_flow
method?
r

redsquare

04/05/2023, 5:42 AM
Have you applied it?
👀 1
m

Miller Jiang

04/06/2023, 5:01 PM
what should I apply?
r

redsquare

04/06/2023, 5:02 PM
the deployment
m

Miller Jiang

04/06/2023, 5:07 PM
Yes below is the script I used to do the deployment, it worked before but after reinstall prefect agent on EKS, running this script will get stuck indefinitely
from start_aggregration_process import start_aggregation_process
from prefect.deployments import Deployment
from prefect.filesystems import S3

deployment = Deployment.build_from_flow(
    flow=start_aggregation_process,
    name="test",
    version="2",
    tags=["TEST_PIPELINE"],
    storage=S3.load("myawss3block"),
    work_queue_name="prefect-dev"
)

if __name__ == "__main__":
    deployment.apply()
    print("deployment done")
r

redsquare

04/06/2023, 5:12 PM
are you running that locally or from the agent?
m

Miller Jiang

04/06/2023, 5:13 PM
locally
r

redsquare

04/06/2023, 5:16 PM
odd, is it prefect cloud or self hosted
m

Miller Jiang

04/06/2023, 5:17 PM
it’s prefect cloud, and I can make all API calls to the cloud
r

redsquare

04/06/2023, 5:18 PM
does the cli work
m

Miller Jiang

04/06/2023, 5:20 PM
Yes
r

redsquare

04/06/2023, 5:23 PM
I would run in vscode, debug into the prefect code and see where it is getting stuck
maybe some s3fs weirdness