-
Notifications
You must be signed in to change notification settings - Fork 57
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
fix: give detailed error message when ps is not installed #482
Conversation
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
WalkthroughWalkthroughThe changes introduce a validation step in the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Shell
User->>Shell: Call check_status()
Shell->>Shell: Check for 'ps' command
alt 'ps' command is available
Shell->>Shell: Execute main logic
else 'ps' command not available
Shell->>User: Output error message
Shell->>User: Abort operation
end
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #482 +/- ##
===========================================
- Coverage 59.92% 47.48% -12.45%
===========================================
Files 39 39
Lines 3850 3850
===========================================
- Hits 2307 1828 -479
- Misses 1543 2022 +479 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
dpdispatcher/machines/shell.py (1)
77-77
: Enhance the error message for missingps
command.The current error message is clear but could be improved by providing guidance on how to install
ps
.Consider updating the error message as follows:
- echo >&2 "I require ps but it's not installed. Aborting." + echo >&2 "Error: 'ps' command is required but not installed. Please install 'procps' package. Aborting."
Summary by CodeRabbit
ps
command before executing the main logic of the status check, enhancing system stability and preventing runtime errors.ps
command is not found, allowing users to understand the issue clearly.