lablup / lablup/backend.ai

[Sokovan] Sprint 2: Provisioner Extraction

Open
#6,893 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

## Objective

Extract scheduling logic (PENDING → SCHEDULED) into the Provisioner engine.

## Tasks

### 1. Create Provisioner Package Structure

```
scheduler/provisioner/
├── __init__.py
├── handler.py
├── allocators/ # Resource allocation strategies
├── selectors/ # Agent selection logic
├── sequencers/ # Session ordering
└── validators/ # Pre-scheduling validation
```

### 2. Implement Provisioner Handler

- Extend base Handler class
- Implement `execute()` for scheduling logic
- Implement `post_process()` for post-scheduling tasks
- Define `target_statuses()` = [PENDING]
- Define `next_status()` = SCHEDULED
- Define `failure_status()` = CANCELLED

### 3. Move Existing Components

- Relocate `allocators/`, `selectors/`, `sequencers/`, `validators/` under `provisioner/`
- Update imports throughout codebase
- Maintain backward compatibility during transition

### 4. Integration

- Register Provisioner handler with Coordinator
- Wire up dependencies (repository, clients)

## Acceptance Criteria

- [ ] Provisioner package structure created
- [ ] Handler implementation complete
- [ ] Existing components relocated
- [ ] All imports updated
- [ ] Integration tests pass

JIRA Issue: BA-3122

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.