From c6487e2ffdbbb42d95319f0f2a2e5af91207cad7 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 4 Apr 2023 19:13:51 +0000 Subject: [PATCH] cli: add hex payload/progress to system_jobs Release note: none. Epic: none. --- pkg/cli/zip_table_registry.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkg/cli/zip_table_registry.go b/pkg/cli/zip_table_registry.go index 04268fea149b..d1f55dd5c64f 100644 --- a/pkg/cli/zip_table_registry.go +++ b/pkg/cli/zip_table_registry.go @@ -378,18 +378,25 @@ var zipInternalTablesPerCluster = DebugZipTableRegistry{ "crdb_internal.system_jobs": { // `payload` column may contain customer info, such as URI params // containing access keys, encryption salts, etc. - nonSensitiveCols: NonSensitiveColumns{ + customQueryUnredacted: `SELECT *, + to_hex(payload) AS hex_payload, + to_hex(progress) AS hex_progress + FROM crdb_internal.system_jobs`, + customQueryRedacted: `SELECT "id", "status", "created", + 'redacted' AS "payload", "progress", "created_by_type", "created_by_id", "claim_session_id", "claim_instance_id", "num_runs", - "last_run", - }, + "last_run", + '' AS "hex_payload", + to_hex(progress) AS "hex_progress" + FROM crdb_internal.system_jobs`, }, "crdb_internal.kv_node_liveness": { nonSensitiveCols: NonSensitiveColumns{