Constantino Schillebeeckx
08/05/2021, 5:28 PMGithub
storage. I'm configuring it like
GitHub(
repo="some_org/repo_name",
path="path/to/flow.py",
access_token_secret="secret_name",
ref="stg"
)
When I execute the flow I get the following failure:
Failed to load and execute Flow's environment: GithubException(422, {'message': 'No commit found for SHA: stg', 'documentation_url': '<https://docs.github.com/rest/reference/repos#get-a-commit'}>).
That repo definitely has the branch, do I need to reference it in a special way?Kevin Kho
Constantino Schillebeeckx
08/05/2021, 5:34 PMFailed to load and execute Flow's environment: KeyError(b'refs/remotes/origin/stg')
Kevin Kho
Constantino Schillebeeckx
08/05/2021, 5:36 PMKevin Kho
Kevin Kho
Constantino Schillebeeckx
08/05/2021, 5:43 PMConstantino Schillebeeckx
08/05/2021, 5:43 PMConstantino Schillebeeckx
08/05/2021, 5:47 PMConstantino Schillebeeckx
08/05/2021, 6:07 PMKevin Kho
Jake Place
08/06/2021, 2:34 PMKevin Kho
Jake Place
08/06/2021, 2:38 PMJake Place
08/06/2021, 2:43 PMimport prefect
from prefect import task, Flow
from prefect.storage.gitlab import GitLab
import os
@task
def say_hi():
logger = prefect.context.get("logger")
<http://logger.info|logger.info>("This worked")
with Flow("test1") as flow:
say_hi()
flow.storage = GitLab(
repo="{my_org}/{my_project}",
host="<https://gitlab>.{my_on_prem_server_address}.{TLD}",
path="flows/test/test.py", #it finds this correctly
ref=os.getenv("BRANCH"), #this resolves correctly
access_token_secret="GitLab", #secret in Prefect Cloud
)
Error retrieving file contents at flows/test/test.py in {my_org}/{my_project}@{branch}. Ensure the project and file exist.
Failed to load and execute Flow's environment: GitlabGetError('404 Commit Not Found')
Jake Place
08/06/2021, 2:50 PMpython-gitlab > 2.6.0
, would it be possible / advisable for the time being to use git
storage?Kevin Kho