Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: fix over redacted log lines #137915

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aa-joshi
Copy link
Contributor

Previosuly, few log lines were getting redacted assuming that it contains sensitive information. Support team was facing challenges during dignostics. To address this, this patch address few of the log lines which were overly redacted.

Epic: CRDB-37533
Part of: CRDB-44885
Release note: None

Previosuly, few log lines were getting redacted assuming that it contains
sensitive information. Support team was facing challenges during dignostics. To
address this, this patch address few of the log lines which were overly
redacted.

Epic: CRDB-37533
Part of: CRDB-44885
Release note: None
Copy link

blathers-crl bot commented Dec 23, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@aa-joshi aa-joshi marked this pull request as ready for review December 23, 2024 10:43
@aa-joshi aa-joshi requested a review from a team as a code owner December 23, 2024 10:43
Copy link
Contributor

@arjunmahishi arjunmahishi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @aa-joshi)


pkg/server/migration.go line 147 at r1 (raw file):

	}
	log.Infof(ctx, "active cluster version setting is now %s (up from %s)",
		redact.Safe(newCV.PrettyPrint()), redact.Safe(prevCV.PrettyPrint()))

I think we can directly pass newCV and prevCV without Safe or PrettyPrint. Because the underlying type implements SafeFormatter

It was getting redacted because PrettyPrint() returns string

Copy link
Contributor Author

@aa-joshi aa-joshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @arjunmahishi)


pkg/server/migration.go line 147 at r1 (raw file):

Previously, arjunmahishi (Arjun Mahishi) wrote…

I think we can directly pass newCV and prevCV without Safe or PrettyPrint. Because the underlying type implements SafeFormatter

It was getting redacted because PrettyPrint() returns string

I believe we need to wrap in PrettyPrint because it has formatting logic based on v.IsFence()
ref:

func (v Version) PrettyPrint() string {

@arjunmahishi
Copy link
Contributor

pkg/server/migration.go line 147 at r1 (raw file):

Previously, aa-joshi (Akshay Joshi) wrote…

I believe we need to wrap in PrettyPrint because it has formatting logic based on v.IsFence()
ref:

func (v Version) PrettyPrint() string {

Then I think we can change PrettyPrint and make it return redact.RedactableString
I think it's only being used for logging anyway.

@aa-joshi aa-joshi marked this pull request as draft December 23, 2024 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants