lablup / lablup/backend.ai

Add scenario tests for the project resource policy

Open
#14,537 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

## Goal

The project policy chapter of api/adapters/resource_policy/KNOWLEDGE.md and the scenario tests under tests/scenario/bai_scenario/manager/resource_policy that match it one for one, with the report.md the run produces.

## Background

BA-7809 researched the resource policy adapter — one adapter over the keypair, user and project policies, 17 public calls over 20 wirings — and wrote its scenarios. Each policy gets its own chapter of api/adapters/resource_policy/KNOWLEDGE.md and its own PR, self-contained: the shared frame of the scenario component (the Family class, the givens and thens, the adapter conftest) is carried in every one of the three, and whichever merges first lands it.

The project policy is the narrowest of the three: no optional value on create, no nullable limit on update, no call that reads one's own policy. Its calls are create, get, search, update and purge — five.

## Acceptance criteria

- KNOWLEDGE.md holds the intro every policy shares and the project policy chapter: creating, reading by name, searching, editing, purging.
- Every row is a scenario in tests/scenario; every one of the five calls is reached; test-scenario and verify-scenario-report pass on CI.
- A named project policy seed exists beside the pinned one every personal project looks for.
- No file under tests/scenario/bai_scenario/runner, seeder.py, components/answers.py or an existing seed changes.

## Related

- BA-7809 (the research)
- BA-7839, BA-7840, BA-7841 (behaviours the rows pin as they are today)

JIRA Issue: BA-7851

Contributor guide

Open the contributing guide

Research direction

Start with api/adapters/resource_policy/KNOWLEDGE.md and the existing scenarios under tests/scenario/bai_scenario/manager/resource_policy, comparing the related policy behaviours BA-7839, BA-7840 and BA-7841. Add the project-policy chapter, matching scenarios for create, get, search, update and purge, and the named project-policy seed; run test-scenario and verify-scenario-report to confirm the generated report and CI checks pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, documentation, testing
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.