-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prefect deploy --all
only needs to run build steps once - does it for each deployment
#9921
Comments
@serinamarie - one for you to consider |
+1 I am facing this same annoyance edit: I have also noticed a strange behavior (which may be on the docker side? or the AWS ECR side?) where when i run the @jonaslb have you encountered this? Even if prefect wants to attempt to rebuild and repush the docker image for each flow, i wish i could figure out what is causing it to sometimes actually push that image, vs realize it has already been pushed so pushing an identical image is not necessary. Actually pushing each identical image wastes a lot of time... |
I decided the prefect build/push etc steps were inappropriate for docker-based projects due to this bug, so build/push in my project now happens with separate commands and a Dockerfile before running |
First check
Prefect Version
2.x
Describe the current behavior
I'm trying to set up a project with multiple flows/deployments which will use the
prefect_docker.projects.steps.build_docker_image
build step in the project levelprefect.yaml
file.But as I am testing it now, it seems that the build (and push) of the docker image is performed for each deployment, in spite of being project level defined?
Fortunately docker does know one or two things about caching, but it still seems to take several seconds to go through all the steps and attempt to do a push to the registry - for each deployment. This hardly makes sense since the image is project-wide, so it'll be the same for each deployment.
Describe the proposed behavior
Currently the build steps are executed in
prefect.cli.deploy._run_single_deploy
which is executed for every deployment. Here I would probably move it intoprefect.cli.deploy.deploy
and call it only once either before or after actually creating the deployments.Example Use
This would just be a pain relief, saving time for anyone (e.g. CD) running
prefect deploy --all
Additional context
No response
The text was updated successfully, but these errors were encountered: