lablup / lablup/backend.ai

Extract KernelService + LifecycleService from AbstractAgent (drives BEP-1002 runner black-box)

Open
#12,616 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

Move kernel create/terminate coordination and lifecycle handling out of AbstractAgent into KernelService (drives BEP-1002 runner as a black box) and LifecycleService. Calls are lightweight service.method(args). Agent delegates rather than implements. Runner contract stays stable (BA-6074 parallelism). Priority target = Sokovan-driven ops (create_kernels/destroy_kernel/check_running + network create/destroy_local_network, trigger_batch_execution); restart_kernel/sync_kernel_registry etc. are deferred.

Success Criteria:
- [ ] Kernel create/terminate flows route through KernelService with parity (via the #1 CLI).
- [ ] LifecycleService owns lifecycle transitions previously inline in AbstractAgent.
- [ ] AbstractAgent no longer contains the extracted method bodies (thin delegation).
- [ ] pants test passes for affected packages

JIRA Issue: BA-6762

Contributor guide

Open the contributing guide

Research direction

Locate AbstractAgent and inventory the kernel create/terminate methods and lifecycle transitions named in the issue. Trace the #1 CLI paths and the Sokovan-driven operations, then separate the responsibilities into KernelService and LifecycleService while keeping the runner contract stable. Run pants test for the affected packages and verify the listed success criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.