XIONE-18661 : Added support for IBackupProvider in UserSettings plugi…#6468
Open
sborushevsky wants to merge 1 commit into
Open
XIONE-18661 : Added support for IBackupProvider in UserSettings plugi…#6468sborushevsky wants to merge 1 commit into
sborushevsky wants to merge 1 commit into
Conversation
…n. (rdkcentral#6463) * XIONE-18661 : Added Account and BackupManager plugins. * Added interfaces for Account and BackupManager for L2 tests. * Added PrivacyMode read to SetAndGetMethodsUsingComRpcConnectionSuccessCase. * L2 test fix. * Removed Account and BackupManager plugins. * Updated version and changelog. * Updated patch with Account-BackupManager interfaces for L2 tests.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Thunder Exchange::IBackupProvider support to the UserSettings plugin so user settings can be backed up/restored/deleted via a persistent JSON file, and updates L2 coverage around PrivacyMode/migration.
Changes:
- Implemented
Exchange::IBackupProviderinUserSettingsImplementation(backup/restore/delete using persistent JSON files). - Extended UserSettings defaults/inspector mappings to include
privacyMode, and updated L2 tests accordingly. - Bumped UserSettings API minor version and updated changelog; added an L2 workflow patch to supply required ThunderInterfaces headers for the R4.4.1 job.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| UserSettings/UserSettingsImplementation.h | Adds IBackupProvider to the implementation and interface map; introduces backup scenario mapping and variant validation helper. |
| UserSettings/UserSettingsImplementation.cpp | Implements backup/restore/delete logic and adds privacyMode to defaults/inspector map. |
| UserSettings/UserSettings.h | Aggregates IBackupProvider from the implementation. |
| UserSettings/UserSettings.cpp | Bumps API version and queries/releases IBackupProvider during plugin init/deinit. |
| UserSettings/CHANGELOG.md | Documents version 2.5.0 and the new IBackupProvider support. |
| Tests/L2Tests/patches/0003-XIONE-18661-Account-BackupManager-plugins.patch | Adds ThunderInterfaces patch content needed for L2 builds (Account/Backup interfaces + Ids/UserSettings signature updates). |
| Tests/L2Tests/L2TestsPlugin/tests/UserSettings_L2Test.cpp | Adds L2 coverage for PrivacyMode set/get and migration state for PRIVACY_MODE. |
| .github/workflows/L2-tests-R4-4-1.yml | Applies the new ThunderInterfaces patch during the L2 workflow. |
Comments suppressed due to low confidence (1)
UserSettings/UserSettingsImplementation.cpp:662
- SetPrivacyMode(): for invalid input the log says "returning default", but the method actually returns an error code without applying any default. Also, returning ERROR_GENERAL makes it hard for callers to distinguish invalid input from other failures.
Core::hresult UserSettingsImplementation::SetPrivacyMode(const string& privacyMode)
{
uint32_t status = Core::ERROR_GENERAL;
LOGINFO("privacyMode: %s", privacyMode.c_str());
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+26
to
29
| #include <interfaces/IBackup.h> | ||
| #include <interfaces/IConfiguration.h> | ||
| #include "tracing/Logging.h" | ||
| #include <vector> |
Comment on lines
23
to
26
| #include "UtilsJsonRpc.h" | ||
| #include <mutex> | ||
| #include <fstream> | ||
| #include "tracing/Logging.h" |
Comment on lines
+1142
to
+1147
| bool UserSettingsImplementation::IsValidVariant(const string& value) const | ||
| { | ||
| // check value for alphanumeric characters and length less than 30 characters to avoid file system issues | ||
| std::regex alphaNumRegex("^[a-zA-Z0-9_]{0,30}$"); | ||
| return std::regex_match(value, alphaNumRegex); | ||
| } |
Comment on lines
+1166
to
+1170
| Core::SafeSyncType<Core::CriticalSection> lock(_adminLock); | ||
|
|
||
| if (nullptr == _remotStoreObject) | ||
| { | ||
| LOGERR("No access to IStore2 object"); |
Comment on lines
+1259
to
+1263
| Core::SafeSyncType<Core::CriticalSection> lock(_adminLock); | ||
|
|
||
| if (nullptr == _remotStoreObject) | ||
| { | ||
| LOGERR("No access to IStore2 object"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…n. (#6463)
XIONE-18661 : Added Account and BackupManager plugins.
Added interfaces for Account and BackupManager for L2 tests.
Added PrivacyMode read to SetAndGetMethodsUsingComRpcConnectionSuccessCase.
L2 test fix.
Removed Account and BackupManager plugins.
Updated version and changelog.
Updated patch with Account-BackupManager interfaces for L2 tests.