Expose service state (including a service's statuses) in ServiceManager#106
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR expands the service-processing API so ServiceManager can expose registered services by name and surface per-service status, while also improving debug output for wrapped services. It fits into the processing layer by making service orchestration more inspectable at runtime.
Changes:
- Added named service registration/state exposure in
ServiceManager, includingservices,get_service_state, andManagedServiceState. - Added
ProcessStatus.UNKNOWNplus manager-side service status reporting for services without native process state. - Added
__repr__coverage and implementations for callable, polling, error-handling, and status-tracking service wrappers.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
tests/unit/logicblocks/event/processing/services/test_status.py |
Adds repr tests for StatusTrackingService. |
tests/unit/logicblocks/event/processing/services/test_polling.py |
Adds repr tests for PollingService. |
tests/unit/logicblocks/event/processing/services/test_manager.py |
Updates manager tests for named mappings and adds service/state/status coverage. |
tests/unit/logicblocks/event/processing/services/test_error.py |
Adds repr tests for ErrorHandlingService. |
tests/unit/logicblocks/event/processing/services/test_callable.py |
Adds repr tests for CallableService. |
src/logicblocks/event/processing/services/status.py |
Adds StatusTrackingService.__repr__. |
src/logicblocks/event/processing/services/polling.py |
Adds PollingService.__repr__. |
src/logicblocks/event/processing/services/manager.py |
Introduces named managed service state, status access, and mapping-based start/services APIs. |
src/logicblocks/event/processing/services/error.py |
Adds ErrorHandlingService.__repr__. |
src/logicblocks/event/processing/services/callable.py |
Adds callable-aware CallableService.__repr__. |
src/logicblocks/event/processing/process/base.py |
Adds ProcessStatus.UNKNOWN. |
changelog.d/20260427_110228_corin_cc_service_manager_enhancements.md |
Documents the new manager/state/status API changes. |
69ff716 to
0fa66d7
Compare
…erviceManager.__aenter__`
0fa66d7 to
cd5ba12
Compare
Comment on lines
+11
to
+17
| def _ids(status: Sequence[ProcessStatus] | ProcessStatus) -> str: | ||
| if isinstance(status, ProcessStatus): | ||
| return status.value | ||
| else: | ||
| return "[" + "+".join(s.value for s in status) + "]" | ||
|
|
||
|
|
Member
There was a problem hiding this comment.
Not sure if this is correct but if it is, it seems tests will fail.
tobyclemson
requested changes
May 14, 2026
Comment on lines
+11
to
+17
| def _ids(status: Sequence[ProcessStatus] | ProcessStatus) -> str: | ||
| if isinstance(status, ProcessStatus): | ||
| return status.value | ||
| else: | ||
| return "[" + "+".join(s.value for s in status) + "]" | ||
|
|
||
|
|
Member
There was a problem hiding this comment.
Not sure if this is correct but if it is, it seems tests will fail.
Comment on lines
+1038
to
+1041
| services = cast(dict, manager.services) | ||
| services["Intruder"] = services["Worker"] | ||
|
|
||
| assert "Intruder" not in manager.services |
tobyclemson
approved these changes
May 20, 2026
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.

No description provided.