Brian Mesick
05/07/2021, 5:30 PMZanie
GithubStorage
will try to pull an access token from the GITHUB_ACCESS_TOKEN
environment variable if a secret name isn't set.Brian Mesick
05/07/2021, 5:38 PMZanie
PREFECT__CONTEXT__SECRETS__<SECRET_NAME>=<SECRET_VALUE>
Brian Mesick
05/07/2021, 5:39 PMTroy Sankey
05/07/2021, 8:16 PMTroy Sankey
05/07/2021, 8:23 PMZanie
Secret
class to use vault instead and just run the agent on your modified version of Prefect. I'll open an issue for first-class support for custom secret loading at flow setup time.Zanie
Marvin
05/07/2021, 8:26 PMTroy Sankey
05/07/2021, 8:29 PMJazib Humayun
05/11/2021, 11:12 AMflow.storage = GitHub(repo="my/repo", path="/flows/flow.py")
but when I add a new task in my existing flow Prefect flows and push it to GitHub my Prefect-flow fails
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 445, in _request
response = self._send_request(
File "/usr/local/lib/python3.8/site-packages/prefect/client/client.py", line 374, in _send_request
raise ClientError(f"{exc}\n{graphql_msg}") from exc
prefect.utilities.exceptions.ClientError: 400 Client Error: Bad Request for url: <https://api.prefect.io/graphql>
The following error messages were provided by the GraphQL server:
INTERNAL_SERVER_ERROR: Variable "$input" got invalid value null at
"input.states[0].task_run_id"; Expected non-nullable type UUID! not to be null.
The GraphQL query was:
mutation($input: set_task_run_states_input!) {
set_task_run_states(input: $input) {
states {
status
id
message
}
}
}
The passed variables were:
{"input": {"states": [{"state": {"_result": {"__version__": "0.14.5", "type": "NoResultType"}, "cached_inputs": {}, "message": "Starting task run.", "context": {"tags": []}, "__version__": "0.14.5", "type": "Running"}, "task_run_id": null, "version": null}]}}
Jazib Humayun
05/11/2021, 11:46 AMprefecthq/prefect:latest-python3.
base image. Now I am trying to use Github storage should I remove the Docker storage ? if yes how the python dependencies can be managed in GitHub storage, can we use both Docker storage and Github storage together ?Brian Mesick
05/11/2021, 2:17 PMZanie
prefect register
again so the DAG is registered with the backend. That error indicates that there's a task that we don't have a UUID for.
You cannot use both types of storage, but you can use a Github
storage with a DockerRun
run config. Your flow script will be pulled from github then executed on the docker image. This is one of the better ways to set up a project. There's an example repo (WIP but still helpful) at https://github.com/jcrist/prefect-github-example
If you do not specify a run config, your flow will run on K8s in the default prefect container. Storage does not determine how/where your flow is run.Jazib Humayun
05/11/2021, 3:58 PMJazib Humayun
05/11/2021, 4:50 PMdocker storage
by passing those in python_dependencies
can we do similar kind of thing with github storage
? I can't see python_dependencies
in github storage @ZanieZanie
Dockerfile
that you manage separately and reference with your DockerRun
Zanie
Jazib Humayun
05/11/2021, 8:32 PMZanie
Jazib Humayun
05/19/2021, 4:41 PMPREFECT__USER_CONFIG_PATH=prod.toml
but due to change in behavior how make command works after GitHub storage now our flows throwing following error
Failed to load and execute Flow's environment: BoxKeyError("'Config' object has no attribute 'snowflake'")
Because config.snowflake
should be coming from the prod.toml
can you tell how I can refer it in my flow ?Brian Mesick
05/19/2021, 4:43 PM