18
18
19
19
import os
20
20
import sys
21
+ from base64 import b64encode
21
22
from copy import deepcopy
22
23
from dataclasses import dataclass , field
23
24
from functools import cached_property
@@ -507,6 +508,7 @@ def env_variables_for_docker_commands(self) -> dict[str, str]:
507
508
_set_var (_env , "AIRFLOW__CELERY__BROKER_URL" , self .airflow_celery_broker_url )
508
509
_set_var (_env , "AIRFLOW__CORE__EXECUTOR" , self .executor )
509
510
_set_var (_env , "AIRFLOW__API__BASE_URL" , f"http://localhost:{ WEB_HOST_PORT } " )
511
+ _set_var (_env , "AIRFLOW__WEBSERVER__SECRET_KEY" , b64encode (os .urandom (16 )).decode ("utf-8" ))
510
512
_set_var (
511
513
_env ,
512
514
"AIRFLOW__CORE__SIMPLE_AUTH_MANAGER_PASSWORDS_FILE" ,
@@ -517,6 +519,9 @@ def env_variables_for_docker_commands(self) -> dict[str, str]:
517
519
_env , "AIRFLOW__CORE__EXECUTOR" , "airflow.providers.edge.executors.edge_executor.EdgeExecutor"
518
520
)
519
521
_set_var (_env , "AIRFLOW__EDGE__API_ENABLED" , "true" )
522
+ _set_var (
523
+ _env , "AIRFLOW__CORE__INTERNAL_API_SECRET_KEY" , b64encode (os .urandom (16 )).decode ("utf-8" )
524
+ )
520
525
521
526
# For testing Edge Worker on Windows... Default Run ID is having a colon (":") from the time which is
522
527
# made into the log path template, which then fails to be used in Windows. So we replace it with a dash
0 commit comments