-
Notifications
You must be signed in to change notification settings - Fork 2
Extract backend-specific runtime behavior from AbstractService #77
Copy link
Copy link
Open
Labels
component:infrastructureCore infrastructure managementCore infrastructure managementcomponent:servicesService integrations and managementService integrations and managementeffort:medium3-5 days of work3-5 days of workpriority:mediumStandard priority itemsStandard priority itemsstatus:needs-triageNeeds initial review and categorizationNeeds initial review and categorizationtype:maintenanceCode cleanup, refactoring, dependency updatesCode cleanup, refactoring, dependency updates
Metadata
Metadata
Assignees
Labels
component:infrastructureCore infrastructure managementCore infrastructure managementcomponent:servicesService integrations and managementService integrations and managementeffort:medium3-5 days of work3-5 days of workpriority:mediumStandard priority itemsStandard priority itemsstatus:needs-triageNeeds initial review and categorizationNeeds initial review and categorizationtype:maintenanceCode cleanup, refactoring, dependency updatesCode cleanup, refactoring, dependency updates
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
AbstractServicecurrently contains Docker Compose specific fields and helpers even though services can target different backends such as Docker, Kubernetes, native, or connector-based integrations.Examples in
mlox/service.py:target_docker_scripttarget_docker_envcompose_service_namescompose_up()/compose_down()compose_service_status()compose_service_log_tail()dump_state()This makes every service appear to have Docker/Compose runtime behavior, even when its declared backend is Kubernetes, native, or connector. With explicit service capabilities now separated from backend capabilities, the service base class should follow the same separation.
Proposed Direction
Introduce a backend/runtime-specific mixin or abstraction, for example:
DockerComposeServiceMixintarget_docker_scripttarget_docker_envcompose_service_namescompose_up()compose_down()compose_service_status()compose_service_log_tail()Keep
AbstractServicefocused on backend-agnostic service behavior:setup,spin_up,spin_down,check,teardownCompatibility Notes
This should be staged to avoid breaking existing Docker services and UI code.
Suggested migration:
DockerComposeServiceMixinwhile leaving existing behavior available.getattr(service, "compose_service_names", {})or a generic runtime/log capability instead of assuming every service has Compose labels.AbstractService.Acceptance Criteria
AbstractServiceno longer declares Docker/Compose-only fields or methods as part of the generic service contract.