refactor: Ingest settings hidden#1920
Conversation
WalkthroughAdds a new environment variable ChangesIngestSettings Visibility Feature Flag
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/config/settings.py`:
- Around line 466-468: The OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS configuration
fails to handle environment variable values with leading or trailing whitespace,
causing inputs like " true " to incorrectly evaluate to False. Modify the
os.getenv call to chain .strip().lower() instead of just .lower() on the
environment variable value, ensuring whitespace is removed before checking if
the string matches "true", "1", or "yes".
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5c9a33f9-62ed-4052-8a40-84ed7ffc7544
📒 Files selected for processing (7)
frontend/app/api/queries/useGetSettingsQuery.tsfrontend/components/cloud-picker/unified-cloud-picker.tsxfrontend/components/connectors/shared-bucket-view.tsxfrontend/components/knowledge-batch-actions-bar.tsxsrc/api/settings/endpoints.pysrc/api/settings/models.pysrc/config/settings.py
| OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS = os.getenv( | ||
| "OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS", "false" | ||
| ).lower() in ("true", "1", "yes") |
There was a problem hiding this comment.
Trim environment input before boolean coercion.
Line 468 lowercases the raw env value; values like " true " evaluate to False and silently disable the flag. Use .strip().lower().
Suggested patch
OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS = os.getenv(
"OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS", "false"
-).lower() in ("true", "1", "yes")
+).strip().lower() in ("true", "1", "yes")🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/config/settings.py` around lines 466 - 468, The
OPENRAG_SHOW_PROVIDER_INGEST_SETTINGS configuration fails to handle environment
variable values with leading or trailing whitespace, causing inputs like " true
" to incorrectly evaluate to False. Modify the os.getenv call to chain
.strip().lower() instead of just .lower() on the environment variable value,
ensuring whitespace is removed before checking if the string matches "true",
"1", or "yes".
mirror of #1910
Summary by CodeRabbit
Release Notes
New Features
Style