chore: expose DWH preprocessing failure detail under P2 debug

This commit is contained in:
2026-08-11 19:58:28 +02:00
parent e197ba1fd4
commit ff9c87bfc7
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -781,6 +781,7 @@ async function writeInstallationFiles(ctx) {
image: ctx.coreImageTag, image: ctx.coreImageTag,
environment: { environment: {
P2_CHILD_DEBUG: "1", P2_CHILD_DEBUG: "1",
THT_P2_DEBUG: "1",
THT_EVIDENCE_PRIVATE_HOST_ALLOWLIST: "host.docker.internal", THT_EVIDENCE_PRIVATE_HOST_ALLOWLIST: "host.docker.internal",
}, },
extra_hosts: ["host.docker.internal:host-gateway"], extra_hosts: ["host.docker.internal:host-gateway"],
+4 -1
View File
@@ -4,6 +4,7 @@ from __future__ import annotations
import hashlib import hashlib
import json import json
import os
import re import re
from pathlib import Path from pathlib import Path
@@ -259,8 +260,10 @@ def dwh_cmd(
raise typer.Exit(code=2) raise typer.Exit(code=2)
try: try:
result = run_dwh_from_config(config, steps=selected, resume=resume) result = run_dwh_from_config(config, steps=selected, resume=resume)
except Exception: # noqa: BLE001 except Exception as exc: # noqa: BLE001
payload = {"status": "failed", "error": "DWH preprocessing failed"} payload = {"status": "failed", "error": "DWH preprocessing failed"}
if os.environ.get("THT_P2_DEBUG") == "1":
payload["error"] = f"DWH preprocessing failed: {type(exc).__name__}: {exc}"
if json_output: if json_output:
typer.echo(json.dumps(payload, sort_keys=True)) typer.echo(json.dumps(payload, sort_keys=True))
else: else: