-
Notifications
You must be signed in to change notification settings - Fork 395
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
[#950] improvment(common): Add a method in ConfigEntry called create to support configurations with no default value #1141
Conversation
…reate to support configurations with no default value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -37,6 +37,7 @@ public class ConfigEntry<T> { | |||
@Getter private boolean isDeprecated; | |||
|
|||
private boolean isOptional; | |||
private boolean isNoDefault; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use another name, isNoDefault
seems a bit awkward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about hasNoDefault
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
* | ||
* @return A new ConfigEntry instance with no default value. | ||
*/ | ||
public ConfigEntry<T> createWithNoDefault() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think create
is enough, no need to specify with "WithNoDefault".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, will fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -33,7 +33,7 @@ public interface OAuthConfig extends Configs { | |||
.doc("The signing key of JWT when Gravitino uses OAuth as the authenticator") | |||
.version("0.3.0") | |||
.stringConf() | |||
.createWithDefault(""); | |||
.createWithNoDefault(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you should check all the configs not only here, but also in each catalogs, to change them if there're no default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I will modify them at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@qqqttt123 can you please create a follow-up issue to address the validity of the value as we discussed offline? |
What changes were proposed in this pull request?
Some configuration options are necessary but don't have default value.
Why are the changes needed?
Fix: #950
Does this PR introduce any user-facing change?
Change some configuration options from `` to none
How was this patch tested?
CI passed.