Santiago Gonzalez
08/18/2023, 5:09 PM2.11.0
recently, and I've found an issue regarding deployments
. This is the error I got
Running deployment push steps...
21:45:36 > Running tag step...
21:45:36 An exception occurred.
21:45:36 Traceback (most recent call last):
21:45:36 File "/usr/local/lib/python3.8/site-packages/prefect/deployments/steps/core.py", line 124, in run_steps
21:45:36 step_output = await run_step(step, upstream_outputs)
21:45:36 File "/usr/local/lib/python3.8/site-packages/prefect/deployments/steps/core.py", line 80, in run_step
21:45:36 raise ValueError(
21:45:36 ValueError: Step has unexpected additional keys: requires, image_name, tag
These are the commands that caused this.
prefect init --recipe docker-git -f image_name=image -f tag=latest -f repository=git_repo_url -f branch=master
prefect deploy flow_path:flow_function_name -n deploy_name -p pool
Its weird, since it used to work on 2.10.9
version (with project
word between prefect
and init
)alex
08/18/2023, 6:28 PMprefect.yaml
file that is created after your prefect init
command?Santiago Gonzalez
08/18/2023, 6:30 PM# Welcome to your prefect.yaml file! You can you 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: automation-flows-v2
prefect-version: 2.11.0
# 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: image
tag: latest
dockerfile: Dockerfile
# push section allows you to manage if and how this project is uploaded to remote locations
push:
- prefect_docker.deployments.steps.push_docker_image: null
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.git_clone:
repository: git_repo_url
branch: master
access_token: null
# the deployments section allows you to provide configuration for deploying flows
deployments:
- name: null
version: null
tags: []
description: null
schedule: {}
flow_name: null
entrypoint: null
parameters: {}
work_pool:
name: null
work_queue_name: null
job_variables:
image: '{{ build_image.image }}'
Santiago Gonzalez
08/18/2023, 6:31 PMprefect-docker
module to 0.3.1
alex
08/18/2023, 6:32 PMnull
and the indentation is off here:
- prefect_docker.deployments.steps.push_docker_image: null
requires: prefect-docker>=0.3.1
image_name: '{{ build_image.image_name }}'
tag: '{{ build_image.tag }}'
You can update it to
- prefect_docker.deployments.steps.push_docker_image:
requires: prefect-docker>=0.3.1
image_name: '{{ build_image.image_name }}'
tag: '{{ build_image.tag }}'
Looks like we’ll need to fix that recipe. Thanks for bringing this to our attention!Santiago Gonzalez
08/18/2023, 6:42 PMalex
08/18/2023, 6:43 PMrequires
, image_name
, and tag
all need to be indented under
prefect_docker.deployments.steps.push_docker_image
. Have you tried that change?Santiago Gonzalez
08/18/2023, 6:44 PMSantiago Gonzalez
08/22/2023, 1:39 PM