https://prefect.io logo
#prefect-community
Title
# prefect-community
m

Max

09/21/2022, 6:00 PM
Hi, I'm wondering if there's a simple solution to updating flows in prefect? For example, I have a flow script, I create the manifest of the flow, and then apply the deployment to prefect server. If for some reason I have to update that specific flows script, how do I go about letting prefect know that there's an update for the flow I previously deployed? Can prefect pull updates from github or any other third party service? Do I have to remove the flow and re-do the manifest and apply a new deployment? I'm just looking to understand if this type of functionality currently exists or if someone can point me to the right documentation when it comes to this type of functionality.
โœ… 1
k

Khuyen Tran

09/21/2022, 6:14 PM
You donโ€™t have to remove the flow. After updating the flow, you can update the deployment with the
prefect deployment build
command
๐Ÿ‘ 1
a

Anna Geller

09/21/2022, 6:16 PM
the storage block only points to the location on remote storage -- this means that as soon as you reupload your code to S3 (you can do it using build CLI as Khuyen mentioned or upload it yourself), Prefect will automatically pick up the changes; in the same way if you use GitHub block, Prefect always clones the repo at runtime so you only need to remember to commit and push your code
๐Ÿ‘ 1
m

Max

09/21/2022, 6:22 PM
So if I'm storing my flows in github and I have an a agent already running -- it clones done the flow from github and runs it. Then 5 minutes later I update the flow in github, the agent will not pull down the new changes from github until I re-run prefect deployment build once again? Am I tracking correctly what is being said?
a

Anna Geller

09/21/2022, 6:24 PM
you only need to commit + push your code, deployment only points to the storage
m

Max

09/21/2022, 6:24 PM
ahhh okay, gotcha. Thanks!
๐Ÿ‘ 1
Is the github repo credentials block available? I just saw the video with Khuyen on youtube, going over the block storage feature in 2.3.0 and the dev eng said something about a github credential block, but it doesn't seem to be shown in the block listings when I try to add it. I'm looking to connect a private flow repo. video reference -

https://www.youtube.com/watch?v=Nv1eD0VDedAโ–พ

a

Anna Geller

09/23/2022, 11:39 AM
you can either follow this issue https://github.com/PrefectHQ/prefect/issues/6669 or use the workaround shared there