fix(compose): avoid fixed Admin UI container name - #551
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe pull request removes the fixed ChangesAdmin UI compose service
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 `@tests/unit/infra/test_admin_ui_compose.py`:
- Around line 7-10: The compose_path variable in the test uses a hardcoded
relative path that depends on the current working directory when pytest runs,
making the test brittle. Instead of using
Path("infra/compose/docker-compose.yaml"), resolve the path relative to the test
file itself using __file__ to establish a stable reference point. Calculate the
correct relative path from the test file's location to the docker-compose.yaml
file and use that to construct the Path object, ensuring the test works
regardless of where pytest is executed from.
🪄 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: bfb1da5a-e159-4b00-86fb-28431adefa80
📒 Files selected for processing (2)
infra/compose/docker-compose.yamltests/unit/infra/test_admin_ui_compose.py
💤 Files with no reviewable changes (1)
- infra/compose/docker-compose.yaml
bc2ab8f to
2f0019d
Compare
Why
The Admin UI should be able to start from more than one compose project on the same machine. A fixed Docker container name makes that fragile: if the name already exists, the stack fails before the UI starts.
What changed
This lets Docker Compose generate the Admin UI container name from the compose project, while keeping the existing Admin UI port behavior driven by the environment.
Validation
Closes #550
Summary by CodeRabbit
8081when not overridden.