lablup / lablup/backend.ai

Add CHECK_STOPPING_PROGRESS promotion spec

Open
#9,815 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

Add a PromotionSpec for automatically transitioning sessions from STOPPING to STOPPED when all kernels have been terminated.

Follows the CHECK_TERMINATING_PROGRESS pattern:
- target_statuses: [SessionStatus.STOPPING]
- target_kernel_statuses: [KernelStatus.TERMINATED] (all kernels must be terminated)
- kernel_match_type: KernelMatchType.ALL
- success_status: SessionStatus.STOPPED

Also add ScheduleType.CHECK_STOPPING_PROGRESS to the enum and register the spec in factory._create_promotion_specs().

Key files:
- manager/scheduler/types.py (ScheduleType enum)
- manager/sokovan/scheduler/factory.py (_create_promotion_specs)

## Success Criteria
- [ ] When all kernels in a STOPPING session reach TERMINATED, session auto-transitions to STOPPED
- [ ] Partial kernel termination: session stays in STOPPING
- [ ] PromotionSpec registered in factory and processed by coordinator
- [ ] pants check passes for affected packages

JIRA Issue: BA-4964

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.