configure debug printing

This commit is contained in:
Kiara Grouwstra 2025-04-12 16:45:52 +02:00
parent 45c53ec150
commit 2cc96eb530
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU

View file

@ -146,11 +146,13 @@ class DeploymentStatus(ConfigurationForm):
# in local dev, it will just reject the `/tmp` and make it in HOME after all. # in local dev, it will just reject the `/tmp` and make it in HOME after all.
"HOME": "/tmp", "HOME": "/tmp",
"XDG_CACHE_HOME": "/tmp", "XDG_CACHE_HOME": "/tmp",
# "TF_LOG": "info",
} | { } | {
# pass in form info to our deployment # pass in form info to our deployment
# FIXME: ensure sensitive info is protected # FIXME: ensure sensitive info is protected
f"TF_VAR_{k}": v if isinstance(v, str) else json.dumps(v) for k, v in (settings.ENV_VARS | deployment_params).items() f"TF_VAR_{k}": v if isinstance(v, str) else json.dumps(v) for k, v in (settings.ENV_VARS | deployment_params).items()
} }
logger.info("env: %s", env)
cwd = f"{settings.repo_dir}/launch" cwd = f"{settings.repo_dir}/launch"
cmd = [ cmd = [
"tofu", "tofu",
@ -161,5 +163,5 @@ class DeploymentStatus(ConfigurationForm):
"-lock=false", "-lock=false",
] ]
deployment_result = subprocess.run(cmd, cwd=cwd, env=env) deployment_result = subprocess.run(cmd, cwd=cwd, env=env)
logging.info(deployment_result) logger.debug("deployment_result: %s", deployment_result)
return deployment_result, deployment_params return deployment_result, deployment_params