From f55e719d127af77242e9f10dddf8e359b176c29f Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 14 Jul 2026 16:39:14 +0000 Subject: [PATCH 1/3] fix(runner/traces): return empty result (no error) when ClickHouse is off api_traces_enricher_v2 set error="clickhouse: not configured" when the agent has no ClickHouse client. The backend traces parser treats that as a hard error and surfaces it to the user, even though "ClickHouse not configured" just means this cluster has no OTel trace store. Return the successful, empty traces payload with no `error` key so the parser renders the normal "no traces" empty state, matching the legacy get_application_traces behavior when the trace store is absent. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01L2HAXQH1gEtX7h4sUJsi9j --- runner/pkg/enrichers/api_traces.go | 9 +++++---- runner/pkg/enrichers/api_traces_test.go | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/runner/pkg/enrichers/api_traces.go b/runner/pkg/enrichers/api_traces.go index 278aa486..739c62e4 100644 --- a/runner/pkg/enrichers/api_traces.go +++ b/runner/pkg/enrichers/api_traces.go @@ -55,10 +55,11 @@ func buildTracesPayload(ctx context.Context, ch *clickhouse.Client, params map[s "data": []map[string]any{}, } if ch == nil { - // The legacy get_application_traces would raise on the run_query call - // if CH were down; we surface the same `error` field so the caller - // can show it in the UI. - out["error"] = "clickhouse: not configured" + // ClickHouse isn't configured on this agent. Return an empty—but + // successful—traces payload (no `error` key) so the backend traces + // parser renders "no traces" instead of surfacing a hard error to + // the user. Matches the legacy nudgebee_actions.get_application_traces, + // which returns an empty result when the trace store is absent. return out } diff --git a/runner/pkg/enrichers/api_traces_test.go b/runner/pkg/enrichers/api_traces_test.go index 166ac73f..34fab0c0 100644 --- a/runner/pkg/enrichers/api_traces_test.go +++ b/runner/pkg/enrichers/api_traces_test.go @@ -12,9 +12,10 @@ import ( ) // TestApiTraces_NoClickHouseReturnsEmpty covers the "CH not configured" -// path. The legacy get_application_traces would crash on the run_query -// call in that case; we surface a clean empty Finding with `error` set -// so the api-server caller can render the empty state. +// path. We return a clean, successful empty Finding with NO `error` key, +// so the backend traces parser renders "no traces" rather than surfacing +// a hard error. Matches the legacy get_application_traces empty-result +// behavior when the trace store is absent. func TestApiTraces_NoClickHouseReturnsEmpty(t *testing.T) { a := NewAPITracesEnricher(nil, "acc-1") resp, err := a.Handler()(context.Background(), map[string]any{ @@ -35,8 +36,8 @@ func TestApiTraces_NoClickHouseReturnsEmpty(t *testing.T) { if rows := body["data"].([]any); len(rows) != 0 { t.Errorf("data = %v; want []", rows) } - if body["error"] != "clickhouse: not configured" { - t.Errorf("error = %v", body["error"]) + if _, hasErr := body["error"]; hasErr { + t.Errorf("expected no error key when CH unconfigured; got error = %v", body["error"]) } } From 97aa51d5cbd3e28c90a89f61e4c6b0ae7f7d650e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 Jul 2026 19:29:24 +0000 Subject: [PATCH 2/3] chore: update image tags for main release --- charts/nudgebee-agent/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/nudgebee-agent/values.yaml b/charts/nudgebee-agent/values.yaml index 2491e5fa..b5c16937 100644 --- a/charts/nudgebee-agent/values.yaml +++ b/charts/nudgebee-agent/values.yaml @@ -65,7 +65,7 @@ runnerServiceAccount: runner: image: repository: ghcr.io/nudgebee/nudgebee-agent - tag: 2026-07-14T03-38-04_fbc9436d684526a0b45488ac510a33e5168b5ae7 + tag: 2026-07-14T09-20-14_17a3cbad58bd80c14dee85a158cc4ec2de19e09f # Image template the pod_profiler action launches debugger pods from. # The agent substitutes `{}` for the variant (bpf, jvm, python, perf, ruby). # Surfaces as PROFILER_IMAGE; leave empty to fall back to the binary default. From 6e1c24bf9a930678bcd5645644de5b20aa8dac8c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Aug 2026 08:31:43 +0000 Subject: [PATCH 3/3] chore: update image tags for main release --- charts/nudgebee-agent/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/nudgebee-agent/values.yaml b/charts/nudgebee-agent/values.yaml index bbf14b10..e3beaa5d 100644 --- a/charts/nudgebee-agent/values.yaml +++ b/charts/nudgebee-agent/values.yaml @@ -65,7 +65,7 @@ runnerServiceAccount: runner: image: repository: ghcr.io/nudgebee/nudgebee-agent - tag: 2026-08-12T06-01-54_7ec58f7701909a3ce172ad2a9235f8b15255e363 + tag: 2026-08-12T08-10-04_e13ce92bc8c238e883d050b1276c6128b2c8fb44 # Image template the pod_profiler action launches debugger pods from. # The agent substitutes `{}` for the variant (bpf, jvm, python, perf, ruby). # Surfaces as PROFILER_IMAGE; leave empty to fall back to the binary default.