[Sokovan] Sprint 3: Launcher Extraction
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
## Objective
Extract session preparation and startup logic (SCHEDULED → RUNNING) into the Launcher engine.
## Tasks
### 1. Create Launcher Package Structure
```
scheduler/launcher/
├── __init__.py
└── handler.py
```
### 2. Implement Launcher Handler
- Extend base Handler class
- Combine prepare and start phases
- Load additional data internally (e.g., ImageConfigData)
- Define `target_statuses()` = [SCHEDULED, PREPARING, CREATING]
- Define `next_status()` = RUNNING
- Define `failure_status()` = ERROR
### 3. Extract Logic from scheduler.py
Key methods to extract:
- `_start_single_session()` (210 lines)
- `_setup_network_configuration()` (107 lines)
- `_prepare_session()`
- `_create_session_kernels()`
- Image pulling coordination
### 4. Integration
- Register Launcher handler with Coordinator
- Handle intermediate states (PREPARING, CREATING)
- Error recovery and rollback logic
## Acceptance Criteria
- [ ] Launcher package structure created
- [ ] Handler implementation complete
- [ ] All preparation/startup logic extracted
- [ ] Network configuration handling
- [ ] Integration tests pass
JIRA Issue: BA-3123
Contributor guide
Assessment
This issue has not been assessed yet.