John Kang

04/07/2023, 2:45 PM
Hi all, I need help setting up deployments using a docker container as infrastructure (rather than the local environment in which the agent is running). For context, the deployment works when I don't specify infrastructure. The error I receive is: 14:31:42.716 | INFO | Flow run 'enigmatic-octopus' - Downloading flow code from storage at 'generic_wholesale_cert_folder' 14:31:43.776 | ERROR | Flow run 'enigmatic-octopus' - Flow could not be retrieved from deployment. Traceback (most recent call last): File "<frozen importlib._bootstrap_external>", line 839, in exec_module File "<frozen importlib._bootstrap_external>", line 975, in get_code File "<frozen importlib._bootstrap_external>", line 1032, in get_data FileNotFoundError: [Errno 2] No such file or directory: 'sql_queries/' The above exception was the direct cause of the following exception:
For some more context I am building each deployment out programmatically:
storage = GCS.load("gcs-site-analytics-code")
docker_infrastructure = DockerContainer.load("site-analytics-cert-pull")
generic_wholesale_cert_update_deployment = Deployment.build_from_flow(
        CronSchedule(cron="0 1/8 * * *", timezone="America/New_York")
    ),  # At minute 0 past Every 8 hours starting at 1am
My prefect version is: Version: 2.8.6 API version: 0.8.4 Python version: 3.11.2 Git commit: 061d877b Built: Thu, Mar 16, 2023 2:58 PM OS/Arch: win32/AMD64 Profile: default Server type: cloud
What is odd is that I don't receive any errors when I don't use docker infrastructure
The file I use to build the prefect deployment is at the root of the project, but the actual flow is in a sub-directory of the project.