Fix Solr port and update rag_guide#1280
Conversation
…n.yaml enrichment. Signed-off-by: Anxhela Coba <acoba@redhat.com>
WalkthroughThis change adds documentation for an automatic configuration enrichment workflow in the RAG guide and updates the default Solr URL in the configuration script from port 8081 to port 8983. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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.
🧹 Nitpick comments (1)
src/llama_stack_configuration.py (1)
408-408: Centralize the Solr default URL constant.Line 408 hardcodes the Solr endpoint. Move the default URL to
src/constants.py(for example,SOLR_DEFAULT_URL) and reference it here so future endpoint changes stay single-source.Proposed refactor
diff --git a/src/constants.py b/src/constants.py @@ SOLR_DEFAULT_EMBEDDING_DIMENSION = 384 +SOLR_DEFAULT_URL = "http://localhost:8983/solr"diff --git a/src/llama_stack_configuration.py b/src/llama_stack_configuration.py @@ - solr_url_env = "${env.SOLR_URL:=http://localhost:8983/solr}" + solr_url_env = f"${{env.SOLR_URL:={constants.SOLR_DEFAULT_URL}}}"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/llama_stack_configuration.py` at line 408, Extract the hardcoded Solr default URL from the solr_url_env assignment in llama_stack_configuration.py and centralize it by creating a SOLR_DEFAULT_URL constant in src/constants.py; then replace the literal "http://localhost:8983/solr" with a reference to that constant (e.g., import SOLR_DEFAULT_URL into llama_stack_configuration.py and use "${env.SOLR_URL:=" + SOLR_DEFAULT_URL + "}" or equivalent string interpolation) so the default endpoint is maintained in one place; update imports to reference SOLR_DEFAULT_URL and run tests to ensure no import cycles.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/llama_stack_configuration.py`:
- Line 408: Extract the hardcoded Solr default URL from the solr_url_env
assignment in llama_stack_configuration.py and centralize it by creating a
SOLR_DEFAULT_URL constant in src/constants.py; then replace the literal
"http://localhost:8983/solr" with a reference to that constant (e.g., import
SOLR_DEFAULT_URL into llama_stack_configuration.py and use "${env.SOLR_URL:=" +
SOLR_DEFAULT_URL + "}" or equivalent string interpolation) so the default
endpoint is maintained in one place; update imports to reference
SOLR_DEFAULT_URL and run tests to ensure no import cycles.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 9159fa39-7149-4d05-af25-654d8c9f925e
📒 Files selected for processing (2)
docs/rag_guide.mdsrc/llama_stack_configuration.py
Fix solr port and update rag_guide.md to include instructions on how to properly configure run.yaml with vector stores (solr and byok) using llama-stack-configuration.py
Description
Type of change
Tools used to create PR
Identify any AI code assistants used in this PR (for transparency and review context)
Related Tickets & Documents
Checklist before requesting a review
Testing
Summary by CodeRabbit
Release Notes
Documentation
Configuration