From e02b646564f039e4f60a851ce29f41da6b94d884 Mon Sep 17 00:00:00 2001 From: Thomas Stallinger Date: Sat, 18 Jul 2026 10:48:50 +0200 Subject: [PATCH] fix: return backend/workspace key instead of internal UUID in resolved Runtime Blueprint runtime_blueprint.backend_id/workspace_id must be the stable, distro-neutral key (e.g. "fedora") as documented in 08-provisioning-api.md, not the internal database UUID - the installer's backend dispatch (backends/${backend_id}/backend.sh) depends on it being a directory-safe key. --- app.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index 52dd316..e0fdba2 100644 --- a/app.py +++ b/app.py @@ -382,9 +382,12 @@ def resolve_template(template_id: str, payload: ResolveRequest): with conn.cursor() as cur: cur.execute( """ - SELECT workspace_id, backend_id, disk_encryption, partitioning, secure_boot_required - FROM bereitstellungsvorlagen - WHERE id = %s + SELECT bv.workspace_id, bv.backend_id, w.key, b.key, + bv.disk_encryption, bv.partitioning, bv.secure_boot_required + FROM bereitstellungsvorlagen bv + JOIN workspaces w ON w.id = bv.workspace_id + JOIN backends b ON b.id = bv.backend_id + WHERE bv.id = %s """, (template_id,), ) @@ -397,7 +400,10 @@ def resolve_template(template_id: str, payload: ResolveRequest): "message": "Die angeforderte Bereitstellungsvorlage wurde nicht gefunden." } - workspace_id, backend_id, disk_encryption, partitioning, secure_boot_required = template_row + ( + workspace_id, backend_id, workspace_key, backend_key, + disk_encryption, partitioning, secure_boot_required, + ) = template_row cur.execute( """ @@ -427,8 +433,8 @@ def resolve_template(template_id: str, payload: ResolveRequest): return { "success": True, "runtime_blueprint": { - "workspace_id": str(workspace_id), - "backend_id": str(backend_id), + "workspace_id": workspace_key, + "backend_id": backend_key, "blueprints": blueprints, "installation_directives": { "disk_encryption": disk_encryption,