<@ULVA73B9P> i get this error: eploymentApplyError...
# ask-marvin
f
@Marvin i get this error: eploymentApplyError( prefect.deployments.runner.DeploymentApplyError: Error while applying deployment: 1 validation error for DeploymentCreate pull_steps.0 Input should be a valid dictionary [type=dict_type, input_value='...', input_type=str] For further information visit https://errors.pydantic.dev/2.11/v/dict_type for # Welcome to your prefect.yaml file! You can use this file for storing and managing # configuration for deploying your flows. We recommend committing this file to source # control along with your flow code. # Generic metadata about this project name: prefect prefect-version: 3.4.7 # build section allows you to manage and build docker images build: ... # - prefect_docker.deployments.steps.build_docker_image: # id: build_image # requires: prefect-docker>=0.3.1 # image_name: fugotakefusaptml/prefect-docker-repo # tag: 2 # dockerfile: auto # push section allows you to manage if and how this project is uploaded to remote locations push: null # - prefect_docker.deployments.steps.push_docker_image: # requires: prefect-docker>=0.3.1 # image_name: '{{ build_image.image_name }}' # tag: '{{ build_image.tag }}' # pull section allows you to provide instructions for cloning this project in remote locations pull: ... # - prefect.deployments.steps.set_working_directory: # directory: /opt/prefect/prefect 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: &docker_build_config id: build_image requires: prefect-docker>=0.3.0 image_name: fugotakefusaptml/prefect-docker-repo tag: dev dockerfile: auto docker_push: &docker_push - prefect_docker.deployments.steps.push_docker_image: &docker_push_config requires: prefect-docker>=0.3.1 image_name: fugotakefusaptml/prefect-docker-repo tag: dev # the deployments section allows you to provide configuration for deploying flows 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
m
thought for 241.4 seconds
Thanks for sharing the YAML and the error — the root cause is the
pull
(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
Copy code
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.