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

cluster: clean up config error logging #4942

Merged
merged 1 commit into from
May 27, 2022

Conversation

jcsp
Copy link
Contributor

@jcsp jcsp commented May 26, 2022

Cover letter

There are a bunch of places we log config values on
error, which are currently safe for secrets (because
secrets are all freeform strings that cannot fail
validation), but future-proof these paths by using
format_raw to ensure that if we added validated+secret
fields in future they'd be redacted properly.

Release notes

  • none

There are a bunch of places we log config values on
error, which are currently safe for secrets (because
secrets are all freeform strings that cannot fail
validation), but future-proof these paths by using
format_raw to ensure that if we added validated+secret
fields in future they'd be redacted properly.
vlog(
clusterlog.trace,
"merge_apply_result: data {} {}",
fmt::ptr(&data),
Copy link
Contributor

Choose a reason for hiding this comment

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

Good call removing this. Nothing secret revealed here, but I'm not sure how useful this actually is (maybe if you're in a debugger or something).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this was something left behind from ancient debugging that I was cleaning up while making the pass.

@andrwng andrwng merged commit 9bb79f7 into redpanda-data:dev May 27, 2022
@dotnwat
Copy link
Member

dotnwat commented May 27, 2022

nit: i find the name format_raw to be confusing in that it applies these rules.

@jcsp jcsp deleted the config-log-cleanup branch May 27, 2022 17:44
@jcsp
Copy link
Contributor Author

jcsp commented May 27, 2022

nit: i find the name format_raw to be confusing in that it applies these rules.

Yes... it's raw in that the value it takes is raw YAML rather than a validated property value, but point taken.

@ajfabbri
Copy link
Contributor

ajfabbri commented Jun 2, 2022

/backport v22.1.x milestone=v22.1.4

@ajfabbri
Copy link
Contributor

ajfabbri commented Jun 2, 2022

/backport v21.11.x milestone=v21.11.17

@vbotbuildovich
Copy link
Collaborator

Failed to run cherry-pick command. I executed the below command:

git cherry-pick -x b74e04ab8beec1fc4a7278dded1b77207ba492ac

Workflow run logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants