Fugo Takefusa
09/18/2025, 1:40 AMMarvin
09/18/2025, 1:40 AMMarvin
09/18/2025, 1:44 AMpull (and build) sections set to .... In YAML, ... is just a scalar string, but Prefect expects these sections to be a list of step dictionaries (or null/empty list). When Prefect tries to apply your deployment, it turns pull into pull_steps and expects the first item to be a dict; instead it finds the string '...', hence:
pull_steps.0 Input should be a valid dictionary
What to change
- Replace build: ... and pull: ... with either:
- an empty list [] if you don’t need any steps, or
- a proper list of step dictionaries
- Alternatively, remove the top-level build/push/pull keys if you set them per-deployment (which you do for build).
Also double-check your actual file doesn’t contain HTML entities like & or > — those are from Slack formatting. In YAML you must use & for anchors and >= in the requires string.
Minimal fixed example based on your file
yaml
# Generic metadata about this project
name: prefect
prefect-version: 3.4.7
# If you don't want global defaults for steps, omit these or set to empty lists
build: []
push: null
pull: []
definitions:
work_pools:
docker_worker_pool: &docker_worker_pool
name: docker-worker-pool
work_queue_name: null
job_variables:
image: '{{ build_image.image }}'
actions:
docker_build: &docker_build
- prefect_docker.deployments.steps.build_docker_image:
id: build_image
requires: prefect-docker>=0.3.1
image_name: fugotakefusaptml/prefect-docker-repo
tag: dev
dockerfile: auto
docker_push: &docker_push
- prefect_docker.deployments.steps.push_docker_image:
requires: prefect-docker>=0.3.1
image_name: '{{ build_image.image_name }}'
tag: '{{ build_image.tag }}'
deployments:
- name: deploy_buy1
flow_name: deploybuy
entrypoint: data_flows/deploy_buy.py:buy
work_pool: *docker_worker_pool
build: *docker_build
# push: *docker_push
pull: [] # No pull steps needed if code is baked into the image
# If you do want pull steps, use something like:
# pull:
# - prefect.deployments.steps.set_working_directory:
# directory: /opt/prefect/prefect
# - prefect.deployments.steps.git_clone:
# repository: <https://github.com/owner/repo.git>
# branch: main
Notes
- Use [] (empty list) or null for sections you don’t use; don’t use ....
- Each step must be a dictionary in the form:
- <import.path.to.step>: followed by a nested dict of its parameters.
- If your Docker image already contains your code, pull can be [].
- If you plan to clone code at runtime, add git_clone and optionally set_working_directory steps as shown.
Try updating your file with the above and re-running prefect deploy. If you still see errors, please paste the current prefect.yaml (as a file snippet if possible) and the full traceback so I can pinpoint the next issue.