lablup / lablup/backend.ai

Attach the vfolder, image, project, and user cleanup handlers

Open
#13,914 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

BEP-1069 §3.4, §3.7. domain 으로 검증한 계약 위에 나머지 네 entity 의 핸들러를 붙이고, 서비스에 흩어진 절차 코드를 걷어낸다.

### 각 entity 가 정리할 것

- project - 자기 하위의 session, vfolder, image 등을 지운다. \***user 는 지우지 않는다.**\* user 는 여러 project 에 속할 수 있으므로 project 하나가 사라진다고 user 가 사라지면 안 된다. project 는 자기 소유 자원만 정리하고 user 와의 결합 행만 끊는다.
- user - 자기 소유 자원 (keypair, vfolder, session, error_log 등).
- vfolder - 초대, 권한, 그리고 스토리지의 실물.
- image - 재스캔·정리 대상.

### vfolder 는 상태 값이 다르다

BA-7451 이 domain / project / user / image 에는 purging, purge-error 를 넣었으나 vfolder 는 손대지 않았다. vfolder 는 VFolderOperationStatus 에 delete-pending, delete-ongoing, delete-complete, delete-error 를 이미 갖고 있다.

핸들러를 붙일 때 vfolder 가 기존 값을 그대로 쓸지, 다른 넷과 이름을 맞출지 정한다. BA-7452 에서 같은 판단을 하므로 그 결정을 따른다.

### 걷어낼 것

services/{user,project,domain,vfolder} 의 삭제 경로에 흩어진 절차 코드와, 삭제 시점에 동기로 도는 BatchPurger 호출을 stage 로 옮긴다.

### 의존

BA-7454 (컨트롤러·코디네이터 + domain 적용).

JIRA Issue: BA-7455

Contributor guide

Open the contributing guide

Research direction

Review the deletion paths under services/{user,project,domain,vfolder}, the existing domain handlers from BA-7454, and the BatchPurger call sites. Done means handlers cover project, user, vfolder, and image cleanup, procedural deletion code is removed from services, synchronous BatchPurger work moves to the stage, and the vfolder status decision follows BA-7452.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.