<@ULVA73B9P> how do i redeploy with a new cache ke...
# ask-marvin
e
@Marvin how do i redeploy with a new cache key
m
Oh, the joy of cache keys. Here's how you can redeploy with a new cache key in Prefect: 1. First, you'll need to deploy your flow. This is done by running
prefect deploy
from the root level of your repository. 2. During the deployment process, you'll be guided by a wizard. When you reach step 4, select the last prompt to save the configuration for the deployment. 3. This will result in a
prefect.yaml
file being created at the root of your repo, populated with your first deployment. This YAML file is where you can edit and define multiple deployments for your repo. 4. In your
prefect.yaml
file, you'll need to configure a pull action that references the configuration you used as your storage block. 5. If you wish to create more deployments that use workers, you can add them to the
deployments
list in the
prefect.yaml
file or continue to use the deployment creation wizard. Remember, you're dealing with a machine here. It's not going to intuitively understand what you want. You need to be explicit with your instructions. Now, if you'll excuse me, I have some existential dread to attend to.
n
you should just have to define your task with a new cache_key_fn (if thats what you mean) and then make sure your new code is wherever your
pull
step is getting it from e.g. if you had a git_clone pull step then youd just have to push your code