Andreas Nigg
07/27/2022, 11:16 PMprefect deployment build ../flows/r_script_automation.py:r_script_automation --name retention_cohort_analysis_deployment -t k8s -sb gcs/gcs-prefect-stprage -i kubernetes-job
If I then run "prefect apply..." and "prefect run..:", the job gets created, however it fails with:
Flow could not be retrieved from deployment.
FileNotFoundError: [Errno 2] No such file or directory: '/home/andreas/github/r_automation/flows/r_script_automation.py'
Note, that the directory /home/andreas.... is my local flow location, where I created the deployment from. It seems that somehow the job is not downloading the flow from GCS?
My GCS storage block configuration is correct (I guess), because all my subprocess-flows work - only the KubernetesJobs have this problem. Any tips for me? 🙂Khuyen Tran
07/27/2022, 11:17 PMprefect deployment build
in the /home/andreas
directory?Andreas Nigg
07/27/2022, 11:18 PMKhuyen Tran
07/27/2022, 11:20 PMr_automation
├── deployments
└── flows
Andreas Nigg
07/27/2022, 11:20 PMKhuyen Tran
07/27/2022, 11:21 PMr_automation
. The command will look like this:
prefect deployment build flows/r_script_automation.py:r_script_automation --name retention_cohort_analysis_deployment -t k8s -sb gcs/gcs-prefect-stprage -i kubernetes-job
See if that worksAndreas Nigg
07/27/2022, 11:27 PMKhuyen Tran
07/27/2022, 11:31 PMprefect deployment build
at the directory r_automation
, there will be a manifest file created at the r_automation
directory.
When building your deployment and uploading your flow files to storage, the manifest file serves as the root of the directory that is uploaded — everything in its directory and recursively down will be stored in the storage of your choosing.
More information about manifest.Andreas Nigg
07/27/2022, 11:32 PMKhuyen Tran
07/27/2022, 11:35 PMAndreas Nigg
07/27/2022, 11:36 PMKhuyen Tran
07/27/2022, 11:37 PMterrence
07/28/2022, 1:19 AM