Hello all, I have been reading about github storage and had a few questions regarding it's use: currently we use docker images that we build with docker-compose and have a minimal task to create, start, and gather the logs. This has the disadvantage of not having logs in the Prefect UI and I was investigating github storage as a way to allow us to have logs in the UI. My question is, with using the github storage, what is the minimum that I need in the flow.py file for it to pull down the actual flow from github? And does it automatically create tasks based off of the tasks contained in the flow stored in github? I am trying to wrap my head around how it works and appreciate any advice and guidance with this
k
Kevin Kho
04/30/2021, 7:37 PM
Hi @Matthew Blau! I am honestly not sure that this will fix your logger issues. I know you’ve asked about the Docker logs a couple time. You don’t need anything special in the flow.py. You agent must have the dependencies needed to run the flow. Yes it will just run the tasks specified in the flow.
m
Matthew Blau
04/30/2021, 7:43 PM
@Kevin Kho so for the flow I would just need to set the storage to github, pass in the access token, repo, etc, and that is it? as long as that file lives in the docker image, it should just work, yes?
k
Kevin Kho
04/30/2021, 7:46 PM
The file doesn’t need to be in the Docker image as it gets pulled. The dependencies have to be in the image.
m
Matthew Blau
04/30/2021, 7:49 PM
That is where I get a little confused with how that works; say I have a docker image that I build with docker-compose with a Dockerfile that installs all the dependencies, including Prefect into the image. How does the Prefect know I want to run the flow that I pull from Github on that same image/container that I previously built?
k
Kevin Kho
04/30/2021, 7:55 PM
It adds commands to the Docker container when the agent runs the Flow including pulling it from storage.
m
Matthew Blau
04/30/2021, 8:01 PM
That makes sense to me, but how does it know which container to use? I am looking at the github storage examples and haven't seen any docs that show where the docker image is defined for it to know where to look for the dependencies