From 2e66bb291d53ec73b2a9bd95a73729f83ca98632 Mon Sep 17 00:00:00 2001 From: Andy Yang Date: Thu, 12 Dec 2024 21:03:30 -0500 Subject: [PATCH] jobspb: mark ResolvedSpan_BoundaryType as SafeValue This patch marks `jobspb.ResolvedSpan_BoundaryType` as a SafeValue so that it won't be redacted in the logs. Release note: None --- pkg/jobs/jobspb/jobs.go | 3 +++ pkg/testutils/lint/passes/redactcheck/redactcheck.go | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/jobs/jobspb/jobs.go b/pkg/jobs/jobspb/jobs.go index 44ede51012f6..96e254d1ca73 100644 --- a/pkg/jobs/jobspb/jobs.go +++ b/pkg/jobs/jobspb/jobs.go @@ -58,3 +58,6 @@ func (rse ResolvedSpanEntries) Equal(rse2 ResolvedSpanEntries) bool { } return true } + +// SafeValue implements the redact.SafeValue interface. +func (ResolvedSpan_BoundaryType) SafeValue() {} diff --git a/pkg/testutils/lint/passes/redactcheck/redactcheck.go b/pkg/testutils/lint/passes/redactcheck/redactcheck.go index 8ae5037f673c..f21307cb50cc 100644 --- a/pkg/testutils/lint/passes/redactcheck/redactcheck.go +++ b/pkg/testutils/lint/passes/redactcheck/redactcheck.go @@ -78,7 +78,8 @@ func runAnalyzer(pass *analysis.Pass) (interface{}, error) { "Status": {}, }, "github.com/cockroachdb/cockroach/pkg/jobs/jobspb": { - "Type": {}, + "Type": {}, + "ResolvedSpan_BoundaryType": {}, }, "github.com/cockroachdb/cockroach/pkg/kv/bulk": { "sz": {},