-
-
Notifications
You must be signed in to change notification settings - Fork 638
Fix bin/dev showing 'Process Manager Not Found' when overmind exists but exits #2087
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
Conversation
…but exits
## Problem
After beta.12 release, users reported that `bin/dev` shows the misleading error
"Process Manager Not Found" even when overmind is installed, if overmind runs
but then exits with a non-zero exit code (e.g., when a process in the Procfile
crashes).
## Root Cause
The `run_with_process_manager` method used a simple `return if` pattern:
```ruby
return if run_process_if_available("overmind", ...)
return if run_process_if_available("foreman", ...)
show_process_manager_installation_help
```
When overmind was found and executed but exited with error (return value
`false`), the code continued to try foreman. If foreman wasn't installed,
it showed "Process Manager Not Found" - which was incorrect since overmind
WAS found and ran.
## Solution
Changed `run_process_if_available` to return three distinct states:
- `true`: Process found and exited successfully (exit code 0)
- `false`: Process found but exited with error (non-zero exit code)
- `nil`: Process not found/available
Updated `run_with_process_manager` to:
1. Try overmind, return if successful
2. Try foreman, return if successful
3. If either was found but failed, exit silently (they showed their own errors)
4. Only show "Process Manager Not Found" if neither was found
## Testing
- Verified overmind detection still works correctly
- Tested scenario where overmind exits with error - no longer shows wrong message
- Tested scenario where neither is installed - correctly shows installation help
- RuboCop passes
- RBS signatures updated and validated
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Rate limit exceeded@justin808 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 18 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
✨ 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 |
Code Review SummaryThis PR effectively fixes the misleading error message issue when process managers exit with errors. The implementation is solid, but I have identified one critical test coverage gap and some minor improvement opportunities. ✅ Strengths
|
Code Review✅ Overall AssessmentThis is a well-crafted bug fix that addresses a legitimate UX issue. The solution is clean, well-documented, and properly tested. 🎯 Strengths
|
Updates process_manager_spec.rb to properly test the tri-state return values (nil/true/false) from run_process_if_available, ensuring correct behavior when process managers are not found vs found but fail. Key improvements: - Fix incorrect mock return values (nil vs false for "not found" scenarios) - Add test for overmind fails but foreman succeeds (fallback scenario) - Add test for overmind fails with foreman not found - Add test for both overmind and foreman fail - Add test for overmind not found but foreman fails - Update existing tests to use correct nil values for "not found" This ensures the bug fix in process_manager.rb is properly tested and prevents the misleading "Process Manager Not Found" message when a process manager is installed but exits with an error. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Code Review for PR #2087SummaryThis PR fixes a legitimate bug where ✅ Strengths1. Excellent Problem AnalysisThe PR description clearly explains the root cause: Ruby's 2. Clean Three-State Return Value Design# Returns:
# - true if process ran and exited successfully (exit code 0)
# - false if process ran but exited with error (non-zero exit code)
# - nil if process was not found/availableThis is idiomatic Ruby and makes the logic in 3. Comprehensive Test CoverageThe tests now cover all important scenarios:
4. Correct RBS Type Signature Update
5. Clear Comments and DocumentationThe inline comments in 🔍 Code Quality Observations1. Logic Correctness ✅The control flow in overmind_result = run_process_if_available("overmind", ["start", "-f", procfile])
return if overmind_result == true # Success path
foreman_result = run_process_if_available("foreman", ["start", "-f", procfile])
return if foreman_result == true # Success path
# Exit silently if found but failed (they showed their own error)
exit 1 if overmind_result == false || foreman_result == false
# Only show "not found" if NEITHER was found
show_process_manager_installation_help
exit 1This correctly handles all cases without showing misleading errors. 2. Test Quality ✅
3. Security ✅No security concerns. The existing 4. Performance ✅No performance impact. The change only affects control flow logic. 📝 Minor Suggestions (Optional)1. Consider Explicit
|
Summary
Fixes a bug where
bin/devshows the misleading error "Process Manager Not Found" when overmind is installed but exits with a non-zero code (e.g., when a Procfile process crashes).Problem
After the v16.2.0.beta.12 release, users reported seeing:
This error appeared even though overmind was installed and working. It occurred when overmind successfully started but then exited with a non-zero code (e.g., when a process in the Procfile died).
Root Cause
The
run_with_process_managermethod couldn't distinguish between:The old logic:
When
system('overmind', 'start', '-f', procfile)exited with error, it returnedfalse, notnil, so the code continued to try foreman. If foreman wasn't installed, it showed the "not found" message incorrectly.Solution
Changed
run_process_if_availableto return three distinct states:true: Process found and exited successfully (exit code 0)false: Process found but exited with error (non-zero exit code)nil: Process not found/availableUpdated the error handling logic:
Testing
Impact
Users will no longer see the confusing "Process Manager Not Found" error when their process manager is actually installed but a Procfile process crashes or exits with error.
🤖 Generated with Claude Code