-
Notifications
You must be signed in to change notification settings - Fork 1.2k
api,server: normalize string empty value on config update #11770
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
base: main
Are you sure you want to change the base?
Conversation
Fixes apache#10823 Signed-off-by: Abhishek Kumar <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11770 +/- ##
=========================================
Coverage 17.50% 17.50%
- Complexity 15427 15434 +7
=========================================
Files 5894 5894
Lines 526847 526855 +8
Branches 64335 64337 +2
=========================================
+ Hits 92234 92251 +17
+ Misses 424236 424227 -9
Partials 10377 10377
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Abhishek Kumar <[email protected]>
@blueorangutan package |
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15253 |
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.
clgtm
return ""; | ||
} | ||
ConfigKey<?> key = _configDepot.get(name); | ||
return (key != null && key.type() == String.class) ? "" : null; |
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.
edge case: can the default value of a String be NULL?
we have the key here so we could as well check the default value for that. However, when “” is passed is it meant to be a reset or an explicit set to “”…?
I think this is the best we can do now, except maybe for making the value field non-null completely.
Description
Fixes #10823
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?