From b51d34093f6d0147087c3deff9eda99990f5dfa1 Mon Sep 17 00:00:00 2001 From: Sienna Meridian Satterwhite Date: Thu, 9 Apr 2026 18:38:41 +0100 Subject: [PATCH] fix(wfe-kubernetes): aggregate sub-workflow logs under root workflow ID wfectl logs returned nothing because each sub-workflow's step logged under its own UUID. The LogStore is keyed by workflow_id, so querying the parent ci ID found zero entries. Now stream_logs uses root_workflow_id (the top-level ancestor) so all sub-workflow output aggregates under the ci run the user actually started. --- wfe-kubernetes/src/step.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wfe-kubernetes/src/step.rs b/wfe-kubernetes/src/step.rs index 811980e..5db4469 100644 --- a/wfe-kubernetes/src/step.rs +++ b/wfe-kubernetes/src/step.rs @@ -232,13 +232,22 @@ impl KubernetesStep { wait_for_pod_running(client, namespace, &pod_name).await?; // 8. Stream logs + capture stdout. + // Store logs under the root workflow ID so `wfectl logs ` + // aggregates output from all sub-workflows in the tree. Without + // this, each sub-workflow's logs are siloed under its own UUID + // and the user sees nothing when querying the parent. + let log_workflow_id = context + .workflow + .root_workflow_id + .as_deref() + .unwrap_or(workflow_id); let stdout = stream_logs( client, namespace, &pod_name, step_name, definition_id, - workflow_id, + log_workflow_id, context.step.id, context.log_sink, )