add sandbox extra env config

This commit is contained in:
Азамат Нураев 2026-05-08 15:24:15 +03:00
parent 32793de992
commit 9ed24b1ae9
7 changed files with 28 additions and 1 deletions

View file

@ -324,9 +324,24 @@ def _load_sandbox_config(
env,
'APP_SANDBOX_VOLUME_MOUNT_PATH',
),
extra_env=_load_sandbox_extra_env(section),
)
def _load_sandbox_extra_env(section: Mapping[str, object]) -> dict[str, str]:
raw = section.get('env')
if raw is None:
return {}
if not isinstance(raw, dict):
raise ConfigError('invalid sandbox.env')
result: dict[str, str] = {}
for key, value in raw.items():
if not isinstance(key, str):
raise ConfigError('invalid sandbox.env key')
result[key] = str(value)
return result
def _load_otel_config(
data: Mapping[str, object],
env: Mapping[str, str],