I'm on 0.14.22, which i know is quite behind the times at this point (definitely want to migrate to v2, but not had a chance yet)....
i'm trying to use Github for storage, and need the complete repo, not just one file. According to the docs the
Git
storage clones the full repo, so I'm trying to use that rather than the
GitHub
storage as that looks to just clone the one flow file (having looked at the code). However, when using
Git
storage I get the following error as the only log in my flow:
Copy code
{'type': ['Unsupported value: Git']}
Daniel Manson
07/29/2022, 12:29 PM
For reference, this is how I created the flow:
Copy code
@task
def hello_task():
logger = prefect.context.get("logger")
<http://logger.info|logger.info>("Hello world")
store = Git(
repo="Company/repo",
flow_path="/pipelines/hello-world.py",
branch_name='my-branch',
repo_host="<http://github.com|github.com>",
git_token_secret_name="GITHUB_ACCESS_TOKEN"
)
with Flow("hello-world", storage=store) as flow:
hello_task()
flow.run_config = KubernetesRun()
Daniel Manson
07/29/2022, 12:30 PM
Any help on this much appreciated, thanks!
a
Anna Geller
07/29/2022, 12:50 PM
it doesn't clone the full repo, you should treat it as cloning only the flow code and other dependencies must be packaged separately
one of the reasons for 2.0 deployments
technically speaking it clones the whole repo, but it only keeps the flow code
It's complicated, confusing and one of the reasons we changed that behavior in 2.0 with much cooler deployments UX
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.