Billy McMonagle
01/11/2021, 7:18 PMprefect agent <AGENT TYPE> start --env KEY=VALUE --env KEY2=VALUE2
Instead, is it possible to do this by setting an environment variable on the agent, similar to how labels are set?
- name: PREFECT__CLOUD__AGENT__LABELS
value: "[]"
Kyle Moon-Wright
01/11/2021, 7:35 PMBilly McMonagle
01/11/2021, 7:39 PMAny lowercase Prefect configuration key can be set by environment variable. In order to do so, prefix the variable withand use two underscores (PREFECT__
) to separate each part of the key.__
For example, if you setBut it doesn't look like the flow environment variables are ever set like, thenPREFECT__TASKS__DEFAULTS__MAX_RETRIES=4
.prefect.config.tasks.defaults.max_retries == 4
prefect.config.agent.env
--env Key=VALUE
thing.Kyle Moon-Wright
01/11/2021, 7:49 PMPREFECT__TASKS__DEFAULTS__MAX_RETRIES=4
will apply to all your flows globally, rather than be delegated to an individual Agent, whose env vars would need to be configured independently by one of the means mentioned above.