-
Notifications
You must be signed in to change notification settings - Fork 3
fix: Fix local development workflow issues (#337) #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This PR fixes multiple critical issues blocking local development workflow. **Issues Fixed:** 1. **ESLint Error - Obsolete webui/ Directory** - Makefile referenced obsolete webui/ directory (lines 317, 345, 357) - Frontend moved to frontend/ directory - Caused 'Cannot find module eslint-plugin-testing-library' error 2. **Proxy Configuration Error** - frontend/package.json proxy pointed to http://backend:8000 (Docker hostname) - Should be http://localhost:8000 for local dev - Caused 'Could not proxy request (ENOTFOUND)' errors 3. **Mock User Creation Failure** - backend/core/mock_auth.py didn't catch NotFoundError - Caused 'User not found: ibm_id=mock-user-ibm-id' websocket errors 4. **Data Persistence Broken** - docker-compose-infra.yml used broken driver_opts bind mount config - Doesn't work with Docker Compose 2.30.3 - Caused data loss on infrastructure restart **Changes:** - **Makefile**: - Line 317: cd frontend (not webui) for npm install - Line 329: Create volumes directories before docker-compose - Line 346: cd frontend (not webui) for npm run dev - Line 357: cd frontend (not webui) for background start - **frontend/package.json**: - Line 43: proxy changed to http://localhost:8000 - **backend/core/mock_auth.py**: - Line 16: Import NotFoundError from rag_solution.core.exceptions - Line 134: Catch NotFoundError in exception handling - **docker-compose-infra.yml**: - Line 16: Direct bind mount ./volumes/postgres (not named volume) - Lines 145-148: Removed broken driver_opts, use simple named volumes - **.gitignore**: - Line 87: Added webui/ to prevent confusion **Test Plan:** ✅ make local-dev-infra - infrastructure starts with bind mounts ✅ make local-dev-backend - backend starts without user errors ✅ make local-dev-frontend - frontend starts without ESLint errors ✅ Verify API calls work (no proxy errors) ✅ Verify data persists after restart Fixes #337
🚀 Development Environment OptionsThis repository supports Dev Containers for a consistent development environment. Option 1: GitHub Codespaces (Recommended)Create a cloud-based development environment:
Option 2: VS Code Dev Containers (Local)Use Dev Containers on your local machine:
Option 3: Traditional Local SetupSet up the development environment manually: # Clone the repository
git clone https://github.com/manavgup/rag_modulo.git
cd rag_modulo
git checkout fix/local-dev-workflow-337
# Initialize development environment
make dev-init
make dev-build
make dev-up
make dev-validate Available CommandsOnce in your development environment: make help # Show all available commands
make dev-validate # Validate environment setup
make test-atomic # Run atomic tests
make test-unit # Run unit tests
make lint # Run linting Services AvailableWhen running
This automated message helps reviewers quickly set up the development environment. |
Code Review - PR #339: Fix local development workflow issues✅ Overall AssessmentLGTM with minor suggestions. This PR effectively addresses critical blockers in the local development workflow with clean, focused fixes. 🎯 Code Quality & Best PracticesStrengths:
Observations:
🐛 Potential Issues1. Volume Mount Strategy Change # Before: Named volume with driver_opts (broken)
volumes:
postgres_data:
driver_opts:
type: none
device: ${PWD}/volumes/postgres
o: bind
# After: Direct bind mount
volumes:
- ./volumes/postgres:/var/lib/postgresql/data Concern: While this fixes Docker Compose 2.30.3+ compatibility, it introduces subtle permission issues on some systems:
Recommendation: Consider adding a note in the docs or PR description about potential permission issues and the workaround: # If you encounter permission errors:
sudo chown -R 999:999 volumes/postgres
# OR
chmod 777 volumes/postgres # Less secure, but works for local dev 2. Proxy Configuration ℹ️ "proxy": "http://localhost:8000" Note: This fix is correct for local development where backend runs on the host. However:
Verification needed: # Check if project uses Vite or CRA
grep -r "vite.config" frontend/ If Vite is used, the proxy configuration should be in export default defineConfig({
server: {
proxy: {
'/api': 'http://localhost:8000'
}
}
}) 3. Incomplete .gitignore Entry webui/ # Obsolete frontend directory (moved to frontend/) Suggestion: The
I'd lean toward keeping it as a safety measure to prevent accidental recreation. 🚀 Performance ConsiderationsVolume Performance: ✅ No regression
Development Experience: ✅ Improved
🔒 Security ConcernsLow Risk: ✅ All changes are development-focused
One observation:
🧪 Test CoverageGap identified: Rationale: These are infrastructure/config changes, which are notoriously hard to unit test. However: Suggestions:
Current test plan: ✅ Excellent manual verification
📚 Documentation & MaintainabilityStrengths:
Enhancement opportunities:
🎯 Recommendations SummaryMust address:
Should consider:
Nice to have:
✅ Final VerdictApproval: ✅ Approved with minor suggestions This PR:
The suggestions above are enhancements, not blockers. The core fixes are sound and ready for merge. Confidence level: High - all changes verified against codebase structure and dependencies. Reviewed by: Claude Code |
Code Review - PR #339: Fix Local Development Workflow IssuesOverall AssessmentThis PR effectively addresses critical blockers in the local development workflow. The changes are minimal, targeted, and well-documented. Detailed Analysis1. Directory Path Corrections (Makefile) - APPROVEDChanges: Lines 317, 329, 343, 346, 354, 357
2. Proxy Configuration Fix (frontend/package.json) - APPROVEDChange: Line 43: http://backend:8000 to http://localhost:8000
3. Exception Handling Fix (backend/core/mock_auth.py) - APPROVEDChanges: Lines 16, 133
4. Volume Configuration Fix (docker-compose-infra.yml) - APPROVEDChanges: Lines 16, 145-165
5. .gitignore Update - APPROVED
Identified IssuesIssue 1: Missing Test Coverage (MEDIUM)No test coverage added for:
Issue 2: Environment-Specific Configuration (LOW)Proxy configuration is hardcoded for local dev. Consider documenting:
Security ReviewNo security concerns:
PerformanceNo performance impact DocumentationExcellent PR description with clear problem statement and test plan Could add Docker Compose version compatibility notes RecommendationsBefore Merge (Recommended):
Nice to Have (Future):
Summary
Verdict: APPROVE WITH SUGGESTIONSSuccessfully fixes all 4 critical blockers:
Key strengths:
Minor improvements:
Great work fixing these workflow blockers! |
Summary
Fixes multiple critical issues blocking local development workflow.
Issues Fixed
1. ESLint Error - Obsolete webui/ Directory
webui/
directoryfrontend/
directory2. Proxy Configuration Error
http://backend:8000
(Docker hostname)http://localhost:8000
for local dev3. Mock User Creation Failure
4. Data Persistence Broken
Changes
Makefile:
cd frontend
for npm install (not webui)cd frontend
for npm run dev (not webui)cd frontend
for background start (not webui)frontend/package.json:
http://localhost:8000
backend/core/mock_auth.py:
docker-compose-infra.yml:
./volumes/postgres
.gitignore:
webui/
directoryTest Plan
make local-dev-infra
- infrastructure starts with bind mountsmake local-dev-backend
- backend starts without user errorsmake local-dev-frontend
- frontend starts without ESLint errorsRelated Issues
Fixes #337
Related: #338 (authentication hardcoded values - separate PR)