chore: expose DWH preprocessing failure detail under P2 debug
This commit is contained in:
@@ -781,6 +781,7 @@ async function writeInstallationFiles(ctx) {
|
||||
image: ctx.coreImageTag,
|
||||
environment: {
|
||||
P2_CHILD_DEBUG: "1",
|
||||
THT_P2_DEBUG: "1",
|
||||
THT_EVIDENCE_PRIVATE_HOST_ALLOWLIST: "host.docker.internal",
|
||||
},
|
||||
extra_hosts: ["host.docker.internal:host-gateway"],
|
||||
|
||||
@@ -4,6 +4,7 @@ from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
@@ -259,8 +260,10 @@ def dwh_cmd(
|
||||
raise typer.Exit(code=2)
|
||||
try:
|
||||
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"}
|
||||
if os.environ.get("THT_P2_DEBUG") == "1":
|
||||
payload["error"] = f"DWH preprocessing failed: {type(exc).__name__}: {exc}"
|
||||
if json_output:
|
||||
typer.echo(json.dumps(payload, sort_keys=True))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user