-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[stable32] fix(ContactsManager): Fix conflict with value type from database #56017
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
Conversation
Signed-off-by: Git'Fellow <[email protected]>
|
But this wrongly writes a string? This sounds more like there is a place where it explicitly is written as string (legacy app config writes as mixed which should be ok?), no? |
come-nc
left a comment
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.
This looks super wrong.
There is a lexicon for this application setting typing it to bool.
|
Ah, 32 does not have the lexicon, it was not backported. Maybe it’s related to the issue. @solracsf Do you know how the value got typed to string? I check and |
|
@ArtificialOwl shouldn't the config API handle the type conversion? Am I missing something? EDIT: I think the missing lexicon is indeed necessary to enforce a new type on an already existing config. |
artonge
left a comment
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.
Needed indeed 👍
|
/backport to stable31 |
|
/backport to stable30 |
|
/backport to stable29 |
|
/backport to stable28 |
I can't really tell, this is set since several major versions already, and it only broke on upgrade to 31 😿 |
|
@solracsf But that’s only on one instance right? So, this is not mergeable in my opinion, it should either migrate the setting to bool, or get it as untyped using the legacy API if needed. And it should fix all calls not only this one. |
|
No problem, I can easily type it to bool on my side of course. I'll let you check with @artonge if this is needed or not. 👍🏼 |
|
would be nice to understand why the value type is set as string in the database. If this is a local issue only on a single instance:
if this needs to be applied to everyone, one of the solution would be a repair step using We could also add an option to |
|
@ArtificialOwl the original value was a string "yes" this probably did not get coverted properly |
|
The value will always be stored in a string in the database, could it be 'yes', 'true', '1', 'on', but will be returned as boolean by getValueBool() |
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.
(should not be merged as it is)
Hello @solracsf, does it means you changed the expected type of the config value yourself before ? We are trying to understand if the value was set to string (from mixed) by code or by human interaction |
|
I can't tell, but there is high chance it has been set trough occ to 'no' value. |
|
By default, value are stored as mixed in the database, unless using |
|
Yeah sure, but since this has been set years ago, I can't know for sure how it has been set, sorry. I would say that, since there are no other reports since the release, maybe this isn't a big deal and PR can be closed. 👍🏼 |
Summary
Regression from #55657
Cc @artonge
Fixes:
Checklist
3. to review, feature component)stable32)