lablup / lablup/backend.ai

Add the SessionIdleCheck relation type read path

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

Read path for session and idle checker relation rows as the SessionIdleCheck relation type: not a Node, no id field, no node(id) lookup and no data loader, per the Relations rules in src/ai/backend/manager/api/gql/AGENTS.md. A Searcher over session_idle_checks, joined to idle_checker_bindings and idle_checkers for the source conditions, read through the v2 read ops with session and checker scope items OR'd together. Each row carries the checker, sources[{scope, enabled}], excluded, effective = NOT excluded AND any(source.enabled), expire_at, last_status and last_message. The GraphQL fields are BA-7281 (session side) and BA-7246 (checker side and root query).

## Success Criteria
- [ ] checker applied through two scopes: one row with two sources
- [ ] disabled source and excluded pair produce correct enabled/excluded/effective values
- [ ] session and checker scope items are OR'd; a scope the caller cannot read is refused
- [ ] pants test passes for affected packages

JIRA Issue: BA-7245

Contributor guide

Open the contributing guide

Research direction

Start with the Relations rules in src/ai/backend/manager/api/gql/AGENTS.md, then trace the existing v2 read ops and the Searcher for session_idle_checks. Check the GraphQL fields named BA-7281 and BA-7246 and run the pants tests for the affected packages. Done means the scope, source, exclusion, effective-state, expiry, and status fields satisfy all listed success criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, python
Domain
api, backend-api-design, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.