Skip to content

feat: change admin-ui configuration field from useRemotePolicyStore to cedarlingPolicyStoreRetrievalPoint#2427

Merged
devrimyatar merged 1 commit intomainfrom
admin-ui-2426
Nov 6, 2025
Merged

feat: change admin-ui configuration field from useRemotePolicyStore to cedarlingPolicyStoreRetrievalPoint#2427
devrimyatar merged 1 commit intomainfrom
admin-ui-2426

Conversation

@duttarnab
Copy link
Contributor

@duttarnab duttarnab commented Nov 6, 2025

closes #2426

Summary by CodeRabbit

  • Chores
    • Updated policy store retrieval configuration mechanism. Replaced a boolean flag with a string-based retrieval point configuration, now set to default.

…o cedarlingPolicyStoreRetrievalPoint

Signed-off-by: duttarnab <arnab.bdutta@gmail.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 6, 2025

📝 Walkthrough

Walkthrough

The auiConfiguration.json template file replaces the useRemotePolicyStore boolean configuration field with a new cedarlingPolicyStoreRetrievalPoint string field in the uiConfig section, changing from a true/false flag to a retrieval point identifier.

Changes

Cohort / File(s) Change Summary
Admin UI Configuration
flex-linux-setup/flex_linux_setup/templates/auiConfiguration.json
Replaced uiConfig.useRemotePolicyStore (boolean, false) with uiConfig.cedarlingPolicyStoreRetrievalPoint (string, "default")

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single file change with straightforward field replacement in a JSON template
  • No complex logic or multi-part dependencies involved

Possibly related PRs

Suggested labels

comp-flex-linux-setup, kind-feature

Poem

🐰 A config field hops away today,
From boolean flags, old and gray,
A string retrieval point takes its place,
"Default" paths the way with grace!
The policy store finds a new name,
Cedar ling brings the reconfig game! 🌲

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately and specifically describes the main change: replacing useRemotePolicyStore with cedarlingPolicyStoreRetrievalPoint in the admin-ui configuration.
Linked Issues check ✅ Passed The PR implementation matches the requirements in issue #2426: it replaces useRemotePolicyStore (boolean, false) with cedarlingPolicyStoreRetrievalPoint (string, 'default') in the uiConfig section.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue #2426 objective; the single file modification is scoped to replacing the specified configuration field.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch admin-ui-2426

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@mo-auto mo-auto added comp-flex-linux-setup Component affected by issue or PR kind-feature Issue or PR is a new feature request labels Nov 6, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8659c56 and ef3e1e3.

📒 Files selected for processing (1)
  • flex-linux-setup/flex_linux_setup/templates/auiConfiguration.json (1 hunks)

"auiPolicyStoreUrl": "",
"auiDefaultPolicyStorePath": "./custom/config/adminUI/policy-store.json",
"useRemotePolicyStore": false
"cedarlingPolicyStoreRetrievalPoint": "default"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Configuration field replacement aligns with PR objectives.

The change correctly replaces the boolean useRemotePolicyStore field with the string-based cedarlingPolicyStoreRetrievalPoint field. The default value "default" appears reasonable as an initial retrieval point identifier.

However, this is a breaking configuration change. Please verify:

  1. No orphaned references: Confirm that no other configuration files, templates, or documentation still reference the old useRemotePolicyStore field name.
  2. Code alignment: Ensure that backend and frontend code has been updated to parse and use the new cedarlingPolicyStoreRetrievalPoint field instead of the old field.
  3. Migration guidance: If this PR is part of a release affecting existing deployments, confirm that breaking change documentation or migration scripts are in place.

Run the following script to search for remaining references to the old field:


🏁 Script executed:

#!/bin/bash
# Description: Search for remaining references to useRemotePolicyStore in the codebase
# Expected: No results if the field has been completely replaced

rg -i 'useRemotePolicyStore' --type json --type py --type ts --type js -C 3

Length of output: 0



---

🏁 Script executed:

```shell
#!/bin/bash
# Broader search for old field name without type restrictions
echo "=== Search for useRemotePolicyStore (no type filter) ==="
rg 'useRemotePolicyStore' -C 2 2>&1 | head -50

echo ""
echo "=== Search for cedarlingPolicyStoreRetrievalPoint ==="
rg 'cedarlingPolicyStoreRetrievalPoint' -C 2 2>&1 | head -50

echo ""
echo "=== Verify config file and surrounding context ==="
cat flex-linux-setup/flex_linux_setup/templates/auiConfiguration.json | sed -n '35,45p'

echo ""
echo "=== Search for files importing/referencing auiConfiguration.json ==="
rg -l 'auiConfiguration' -C 1 2>&1 | head -20

Length of output: 1259



---

🏁 Script executed:

```shell
#!/bin/bash
# Check how the config is used in the main setup files
echo "=== flex_setup.py: Config loading context ==="
grep -n 'auiConfiguration\|cedarling\|policyStore' flex-linux-setup/flex_linux_setup/flex_setup.py -i -C 3 | head -60

echo ""
echo "=== bootstrap.py: Config loading context ==="
grep -n 'auiConfiguration\|cedarling\|policyStore' docker-admin-ui/scripts/bootstrap.py -i -C 3 | head -60

echo ""
echo "=== Search for 'cedarling' or 'PolicyStore' in all code files ==="
rg 'cedarling|PolicyStore' -C 2 --type py --type js --type ts 2>&1 | head -100

Length of output: 10368



---

🏁 Script executed:

```shell
#!/bin/bash
# Check if bootstrap.py needs to handle the new field similar to cedarlingLogType
echo "=== bootstrap.py: Full context around field handling ==="
sed -n '240,270p' docker-admin-ui/scripts/bootstrap.py

echo ""
echo "=== Search for how cedarlingLogType is used after being set ==="
rg 'cedarlingLogType' -C 4 2>&1 | head -80

echo ""
echo "=== Search for any conditional based on policy store retrieval point or similar patterns ==="
rg -i 'retrievalPoint|retrieval.?point' -C 3 2>&1

Length of output: 9749


Add field handler to bootstrap.py and implement frontend integration; field currently unused.

The new cedarlingPolicyStoreRetrievalPoint field is defined in the configuration template but missing critical integration:

  1. Missing bootstrap.py handler — Unlike similar field cedarlingLogType (lines 254–256), no existence check or default value initialization. Existing deployments will not have this field.

  2. No frontend UIcedarlingLogType has form binding in admin-ui/plugins/admin/components/Settings/SettingsPage.js with change detection. The new field has no UI component for users to edit it.

  3. No code consumption — The field value is never read or used anywhere in backend or frontend logic.

Add to docker-admin-ui/scripts/bootstrap.py (alongside cedarlingLogType handling):

if "cedarlingPolicyStoreRetrievalPoint" not in old_conf["uiConfig"]:
    old_conf["uiConfig"]["cedarlingPolicyStoreRetrievalPoint"] = "default"
    should_update = True

Then implement frontend handling and backend consumption matching the cedarlingLogType pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-flex-linux-setup Component affected by issue or PR kind-feature Issue or PR is a new feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(admin-ui): change admin-ui configuration field from useRemotePolicyStore to cedarlingPolicyStoreRetrievalPoint

3 participants