Jeff S
02/24/2025, 11:09 PMJeff S
02/25/2025, 4:18 PMNate
02/25/2025, 4:49 PMThere've been multiple posts in here in the past couple of days about pulling from github repos. Can one of the prefect folks please confirm whether deploying like this should result in the flow pulling the repo on each flow run?hi @Jeff S itd be helpful if you could describe what you're seeing but yes if a deployment has a
git_clone
pull step, then it will pull the specified git repoJeff S
02/25/2025, 4:58 PMflow.from_source(
source="<https://github.com/org/my-public-repo.git>",
entrypoint="gh_no_block.py:my_flow",
).deploy(
name="my-github-deployment",
work_pool_name="my_pool",
)
Jeff S
02/25/2025, 4:59 PMNate
02/25/2025, 4:59 PMJeff S
02/25/2025, 5:00 PMJeff S
02/25/2025, 5:01 PMJeff S
02/25/2025, 5:41 PMAfter creating a deployment, you may need to change your flow code. If baking your flow code into a Docker image, you will need to rebuild your image. If storing your flow code in a git-based version control platform or a cloud-based storage location, often you can update your flow code without rebuilding your deployment.
The exception is when something the server needs to know about has changed, such as the flow entrypoint parameters.
Rerun the Python script with deploy or run prefect deploy from the CLI for YAML-based deployments to update your deployment with the new flow code.
@Nate do I have to re-deploy when the code changes? Or will the next scheduled run of the deployment automatically fetch the new code? Because the latter is what hasn't been working for me.Nate
02/25/2025, 6:41 PM