Draft
Conversation
37aa94f to
d382a5d
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
d382a5d to
043ee8e
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds the ability to restart individual services in the BEC server infrastructure. Previously, only full server restarts were supported.
Key changes:
- Added
service_nameparameter toServiceRequestMessageto specify which service to restart - Implemented service-level start/stop/restart operations in the CLI service handler and tmux launcher
- Added
--servicecommand-line argument to start, stop, and restart commands
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| bec_lib/bec_lib/messages.py | Added optional service_name field to ServiceRequestMessage |
| bec_server/bec_server/scihub/service_handler/service_handler.py | Enhanced service handler to support single service restarts via message requests |
| bec_server/bec_server/bec_server_utils/service_handler.py | Added ServiceOperation enum and methods for starting, stopping, and restarting individual services |
| bec_server/bec_server/bec_server_utils/tmux_launch.py | Implemented tmux-specific functions for managing individual service panes |
| bec_server/bec_server/bec_server_utils/launch.py | Added --service argument to CLI commands and routing logic |
| bec_server/tests/tests_scihub/test_service_handler.py | Added comprehensive test coverage for service handler message processing |
| bec_server/tests/tests_bec_server_utils/test_cli_service_handler.py | Added tests for CLI service handler restart operations |
| bec_server/tests/tests_bec_server_utils/test_tmux_launch.py | Added tests for tmux service management functions |
| bec_server/tests/tests_bec_server_utils/test_main.py | Updated existing tests to include new service argument |
Comments suppressed due to low confidence (1)
bec_server/bec_server/bec_server_utils/tmux_launch.py:1
- The assertion checks for
'--service scan_server'as a substring in the command string, but the command is constructed asf'{self.command} restart --service {service_name}'. This creates a space-separated command where the substring check may fail if the command is split into a list or formatted differently. Consider checking for both'--service'and'scan_server'separately, or verify the exact command construction pattern.
import os
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR refactors the tmux launch utils and adds the option to restart a single service, either through the cli or through BEC messages. This will enable us to restart single services through the GUI.