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

fix(meta): correctly persist license key system param in SQL backend #18163

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

BugenZhao
Copy link
Member

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

Follow-up of #17936.

Previously the new_value: String returned by set_system_param is redacted for license_key, which will be further used to persist into the SQL backend. This is not expected. This PR fixes that and adds a unit test to clarify the semantics of the returned String type value.

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

Comment on lines +338 to +339
params.$field = Some(v.into()); // do not use `to_string` to avoid writing redacted values
let new_value = params.$field.as_ref().unwrap().to_string(); // can now use `to_string` on protobuf primitive types
Copy link
Member Author

Choose a reason for hiding this comment

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

Highlight the core changes

Copy link
Member

@yezizp2012 yezizp2012 left a comment

Choose a reason for hiding this comment

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

LGTM! Thx for the PR.

@graphite-app graphite-app bot requested a review from a team August 21, 2024 08:13
@yezizp2012 yezizp2012 added this pull request to the merge queue Aug 21, 2024
Merged via the queue into main with commit fc3f4e1 Aug 21, 2024
31 of 32 checks passed
@yezizp2012 yezizp2012 deleted the bz/set-system-param-new-value branch August 21, 2024 08:39
@yezizp2012
Copy link
Member

Seems like #17936 is included in release-2.0, shall we cherry pick this PR as well?

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.

2 participants