Skip to content

XIONE-18661 : Added support for IBackupProvider in UserSettings plugi…#6468

Open
sborushevsky wants to merge 1 commit into
rdkcentral:mainfrom
sborushevsky:XIONE-18661_main
Open

XIONE-18661 : Added support for IBackupProvider in UserSettings plugi…#6468
sborushevsky wants to merge 1 commit into
rdkcentral:mainfrom
sborushevsky:XIONE-18661_main

Conversation

@sborushevsky

Copy link
Copy Markdown
Contributor

…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.

…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.
Copilot AI review requested due to automatic review settings June 11, 2026 16:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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::IBackupProvider in UserSettingsImplementation (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");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants