lablup / lablup/backend.ai

Relocate the resource usage history specs to models

Open
#13,937 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
15h 13m
Merged PRs (30d)
368

Description

사용량 이력의 옛 spec 일곱을 v2 베이스로 옮긴다. creator 넷과 upserter 셋이다.

복합 자연키 지원이 먼저다. 집계 버킷은 스코프와 집계 구간의 짝으로 지목된다.

KernelUsageRecordCreatorSpec은 도메인 밖에서 불린다. sokovan/scheduler/fair_share/aggregator.py가 직접 부르므로 부르는 쪽 시그니처가 함께 움직인다. 나머지 여섯은 같은 도메인 안이다.

버킷 쪽은 도메인, 프로젝트, 사용자 셋이 같은 모양을 반복한다.

공통 완료 기준. 이 디렉터리에서 repositories.base import가 0이고, 레거시 DBOpsProvider 사용이 0이고, V2 ops를 직접 생성하는 자리가 0이고, 리포지토리가 세션이나 엔진이 아니라 V2DBOpsProvider를 받는다. 근거는 repositories/AGENTS.md다.

판별은 import 경로로 한다. repositories.base와 models.specs에 이름이 같은 클래스가 있어서 클래스명으로 세면 틀린다.

JIRA Issue: BA-7470

Contributor guide

Open the contributing guide

Research direction

Start with repositories/AGENTS.md and use import paths to locate the seven legacy specs and their models.specs counterparts; do not identify them by class name alone. Inspect sokovan/scheduler/fair_share/aggregator.py for the external creator call and signature. Done means the stated legacy imports and direct V2 ops creation are gone, and repositories receive V2DBOpsProvider rather than a session or engine.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.