From f2091d8d0a14c6b305e5cdfd58f343e739fa0fae Mon Sep 17 00:00:00 2001 From: aswink <1014642+aswink@users.noreply.github.com> Date: Mon, 16 Nov 2026 18:17:57 +0000 Subject: [PATCH 1/2] Remove obsolete BTQL audit log settings --- braintrust/README.md | 4 + .../examples/google-autopilot/values.yaml | 9 --- braintrust/templates/api-configmap.yaml | 21 ------ braintrust/tests/api-configmap_test.yaml | 75 +++++++++++++------ braintrust/values.yaml | 13 ---- 5 files changed, 57 insertions(+), 65 deletions(-) diff --git a/braintrust/README.md b/braintrust/README.md index cf9c0a6..63f4b63 100644 --- a/braintrust/README.md +++ b/braintrust/README.md @@ -504,6 +504,10 @@ missing pool fields are filled from the chart defaults. Set This option is not recommended for most deployments; enable it only with guidance from Braintrust support. +## Removed BTQL audit log settings + +Data plane v2.23.0 no longer uses `BTQL_AUDIT_LOGS_STRICT_ORG_IDS` or `BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS`. The chart ignores the old `btqlAuditLogsStrictOrgIds` and `btqlAuditLogsBestEffortOrgIds` values, including values retained by `helm upgrade --reuse-values`. Remove them from your values files. + ## Testing This Helm chart includes comprehensive automated unit tests. diff --git a/braintrust/examples/google-autopilot/values.yaml b/braintrust/examples/google-autopilot/values.yaml index 6b790bc..96998bf 100644 --- a/braintrust/examples/google-autopilot/values.yaml +++ b/braintrust/examples/google-autopilot/values.yaml @@ -18,15 +18,6 @@ objectStorage: brainstoreBucket: "" apiBucket: "" -# BTQL query.read audit logging (requires data plane v2.6.0+). -# Uncomment exactly one block to enable audit logging for specific orgs. -# Strict mode writes the audit row before returning results; best-effort -# writes asynchronously and logs failures. Setting both is a template error. -# -# btqlAuditLogsStrictOrgIds: [""] -# -# btqlAuditLogsBestEffortOrgIds: [""] - api: name: "braintrust-api" annotations: diff --git a/braintrust/templates/api-configmap.yaml b/braintrust/templates/api-configmap.yaml index 72d9217..9b41eec 100644 --- a/braintrust/templates/api-configmap.yaml +++ b/braintrust/templates/api-configmap.yaml @@ -10,22 +10,7 @@ {{- fail "global.primaryOrgName or api.extraEnvVars PRIMARY_ORG_NAME is required when global.orgName is empty or \"*\"; self-hosted service-token management needs a primary organization." -}} {{- end -}} {{- $allowedOrgIds := .Values.global.allowedOrgIds | default "" | toString | trim -}} -{{- $btqlStrictOrgIds := .Values.btqlAuditLogsStrictOrgIds | default list -}} -{{- $btqlBestEffortOrgIds := .Values.btqlAuditLogsBestEffortOrgIds | default list -}} -{{- if and (gt (len $btqlStrictOrgIds) 0) (gt (len $btqlBestEffortOrgIds) 0) -}} -{{- fail "Set either btqlAuditLogsStrictOrgIds or btqlAuditLogsBestEffortOrgIds, not both." -}} -{{- end -}} {{- include "braintrust.loopRuntime.validate" . -}} -{{- range $btqlStrictOrgIds -}} -{{- if not (regexMatch "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" .) -}} -{{- fail (printf "btqlAuditLogsStrictOrgIds: %q is not a valid UUID" .) -}} -{{- end -}} -{{- end -}} -{{- range $btqlBestEffortOrgIds -}} -{{- if not (regexMatch "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" .) -}} -{{- fail (printf "btqlAuditLogsBestEffortOrgIds: %q is not a valid UUID" .) -}} -{{- end -}} -{{- end -}} --- apiVersion: v1 kind: ConfigMap @@ -117,9 +102,3 @@ data: {{- if include "braintrust.loopRuntime.enabled" . }} LOOP_RUNTIME_URL: {{ include "braintrust.loopRuntimeInternalUrl" . | quote }} {{- end }} - {{- if $btqlStrictOrgIds }} - BTQL_AUDIT_LOGS_STRICT_ORG_IDS: {{ $btqlStrictOrgIds | join "," | quote }} - {{- end }} - {{- if $btqlBestEffortOrgIds }} - BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS: {{ $btqlBestEffortOrgIds | join "," | quote }} - {{- end }} diff --git a/braintrust/tests/api-configmap_test.yaml b/braintrust/tests/api-configmap_test.yaml index 1f5fde0..8b74ab9 100644 --- a/braintrust/tests/api-configmap_test.yaml +++ b/braintrust/tests/api-configmap_test.yaml @@ -506,7 +506,7 @@ tests: path: data.SKIP_PG_FOR_BRAINSTORE_OBJECTS value: "exclude:project_logs:abc123" - - it: should omit BTQL audit log env vars when both lists are empty + - it: should omit obsolete BTQL audit log env vars by default values: - __fixtures__/base-values.yaml release: @@ -517,23 +517,21 @@ tests: - isNull: path: data.BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS - - it: should set BTQL_AUDIT_LOGS_STRICT_ORG_IDS when strict org IDs are configured + - it: should ignore legacy strict audit log values retained during upgrades values: - __fixtures__/base-values.yaml set: btqlAuditLogsStrictOrgIds: - "00000000-0000-4000-8000-000000000001" - - "00000000-0000-4000-8000-000000000002" release: namespace: "braintrust" asserts: - - equal: + - isNull: path: data.BTQL_AUDIT_LOGS_STRICT_ORG_IDS - value: "00000000-0000-4000-8000-000000000001,00000000-0000-4000-8000-000000000002" - isNull: path: data.BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS - - it: should set BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS when best-effort org IDs are configured + - it: should ignore legacy best-effort audit log values retained during upgrades values: - __fixtures__/base-values.yaml set: @@ -542,13 +540,12 @@ tests: release: namespace: "braintrust" asserts: - - equal: - path: data.BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS - value: "00000000-0000-4000-8000-000000000001" - isNull: path: data.BTQL_AUDIT_LOGS_STRICT_ORG_IDS + - isNull: + path: data.BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS - - it: should fail when both strict and best-effort org IDs are set + - it: should ignore both legacy audit log lists without rejecting upgrades values: - __fixtures__/base-values.yaml set: @@ -559,32 +556,66 @@ tests: release: namespace: "braintrust" asserts: - - failedTemplate: - errorMessage: "Set either btqlAuditLogsStrictOrgIds or btqlAuditLogsBestEffortOrgIds, not both." + - isNull: + path: data.BTQL_AUDIT_LOGS_STRICT_ORG_IDS + - isNull: + path: data.BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS - - it: should fail when a strict org ID is not a valid UUID + - it: should ignore malformed legacy audit log values without validating them values: - __fixtures__/base-values.yaml set: - btqlAuditLogsStrictOrgIds: - - "not-a-uuid" + btqlAuditLogsStrictOrgIds: ["not-a-uuid"] + btqlAuditLogsBestEffortOrgIds: ["not-a-uuid"] release: namespace: "braintrust" asserts: - - failedTemplate: - errorMessage: "btqlAuditLogsStrictOrgIds: \"not-a-uuid\" is not a valid UUID" + - isNull: + path: data.BTQL_AUDIT_LOGS_STRICT_ORG_IDS + - isNull: + path: data.BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS - - it: should fail when a best-effort org ID is not a valid UUID + - it: should ignore null legacy audit log values values: - __fixtures__/base-values.yaml set: - btqlAuditLogsBestEffortOrgIds: - - "not-a-uuid" + btqlAuditLogsStrictOrgIds: null + btqlAuditLogsBestEffortOrgIds: null release: namespace: "braintrust" asserts: - - failedTemplate: - errorMessage: "btqlAuditLogsBestEffortOrgIds: \"not-a-uuid\" is not a valid UUID" + - isNull: + path: data.BTQL_AUDIT_LOGS_STRICT_ORG_IDS + - isNull: + path: data.BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS + + - it: should ignore empty legacy audit log lists + values: + - __fixtures__/base-values.yaml + set: + btqlAuditLogsStrictOrgIds: [] + btqlAuditLogsBestEffortOrgIds: [] + release: + namespace: "braintrust" + asserts: + - isNull: + path: data.BTQL_AUDIT_LOGS_STRICT_ORG_IDS + - isNull: + path: data.BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS + + - it: should ignore empty legacy audit log strings + values: + - __fixtures__/base-values.yaml + set: + btqlAuditLogsStrictOrgIds: "" + btqlAuditLogsBestEffortOrgIds: "" + release: + namespace: "braintrust" + asserts: + - isNull: + path: data.BTQL_AUDIT_LOGS_STRICT_ORG_IDS + - isNull: + path: data.BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS - it: should publish the Loop Runtime URL when Loop Runtime is enabled values: diff --git a/braintrust/values.yaml b/braintrust/values.yaml index 3583756..8b1e8c7 100644 --- a/braintrust/values.yaml +++ b/braintrust/values.yaml @@ -87,19 +87,6 @@ skipPgForBrainstoreObjects: "all" # Progression: "" (disabled) -> "v1" (on 1.1.32) -> "v3" (on 2.0) brainstoreWalFooterVersion: "v3" -# BTQL query.read audit logging configuration (requires data plane v2.6.0+). -# When set, the API emits a query.read audit log entry for each BTQL query -# run by users belonging to the listed org UUIDs. Two mutually exclusive modes: -# strict: audit rows are written synchronously before results are returned. -# best-effort: audit rows are written asynchronously; failures are logged. -# Set UUIDs in exactly one list — setting both is a template error. -# Example (strict mode): -# btqlAuditLogsStrictOrgIds: ["11111111-1111-4111-8111-111111111111", "22222222-2222-4222-8222-222222222222"] -# Example (best-effort mode): -# btqlAuditLogsBestEffortOrgIds: ["11111111-1111-4111-8111-111111111111"] -btqlAuditLogsStrictOrgIds: [] -btqlAuditLogsBestEffortOrgIds: [] - api: name: "braintrust-api" # Experimental: hold new API processes until compatible Brainstore capacity From 350a35b40b7b65f73fa7b6dea46e9669ea748b12 Mon Sep 17 00:00:00 2001 From: aswink <1014642+aswink@users.noreply.github.com> Date: Mon, 16 Nov 2026 18:35:24 +0000 Subject: [PATCH 2/2] Remove historical audit log settings note --- braintrust/README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/braintrust/README.md b/braintrust/README.md index 63f4b63..cf9c0a6 100644 --- a/braintrust/README.md +++ b/braintrust/README.md @@ -504,10 +504,6 @@ missing pool fields are filled from the chart defaults. Set This option is not recommended for most deployments; enable it only with guidance from Braintrust support. -## Removed BTQL audit log settings - -Data plane v2.23.0 no longer uses `BTQL_AUDIT_LOGS_STRICT_ORG_IDS` or `BTQL_AUDIT_LOGS_BEST_EFFORT_ORG_IDS`. The chart ignores the old `btqlAuditLogsStrictOrgIds` and `btqlAuditLogsBestEffortOrgIds` values, including values retained by `helm upgrade --reuse-values`. Remove them from your values files. - ## Testing This Helm chart includes comprehensive automated unit tests.