Not sure if I'm missing something small or what, but I am getting a FileNotFoundError when using Git Store for my flows. From what I can see, the temporary directory is being deleted before the flow can actually be extracted. I replicated it with the below code. Anyone know what I'm doing wrong?
Copy code
clone_url = "XXXXXXX"
with TemporaryGitRepo(clone_url) as temp_repo:
flow = extract_flow_from_file(
file_path=os.path.join(
temp_repo.temp_dir.name,
"path/to/flow/fil.py",
),
flow_name="flow_name",
)
r
Rainer Schülke
08/09/2022, 3:00 PM
Hello 🙂 not sure which Prefect version you are using but you can try to setup a github_storage variable:
Copy code
gh_storage = GitHub(
repo="your-organization/your-project",
path="your/path/to-your-flow/your_flow.py",
ref="master"
)
.....
with Flow(
'your_flow',
storage=gh_storage,
....
) as flow:
.....
The GitHub access token can be provided by your environment variables. I am not from Prefect but I use it a lot 😄
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.