Samuel Hinton
10/03/2023, 10:55 PMprefect-aws
to launch ECS tasks for longer running compute. Im unsure how a "worker" would change or improve these two use casesNate
10/03/2023, 11:37 PMpull
step that gets attached to a deployment
so the worker picks up a deployment's flow run from a work pool, checks out the pull
step to figure out where to grab the code from (sometimes instead its just a matter of setting a directory, like if you have code baked into your flow run docker image)
commonly you'll see something like:
• this, a git_clone
pull step that applies to all deployments in my prefect.yaml
which do not have their own pull
step defined explicitly. when a worker picks the flow run, it clones the flow code down to the runtime machine
• this, a pull_from_gcs
(same for s3) pull step that applies to this particular deployment, so at runtime, the worker pulls from that gcs bucket/folder. this assumes your code is actually in that bucket, so you might want a push
step that pushes up everything not ignored by your .prefectignore
at prefect deploy
time (unless you already have some CI to push up your code to blob)
you're free to add other actions in your pull/push/build step, like pip_install_requirements
or run_shell_script
if for example, you have a 3rd party secret service that you want to grab some secrets from just before the flow run starts (the pull step) and inject those into that machine (if you don't want to keep Secret
blocks on the server or something)Samuel Hinton
10/03/2023, 11:49 PMNate
10/04/2023, 12:03 AMSamuel Hinton
10/04/2023, 12:11 AMNate
10/04/2023, 12:17 AM