lablup / lablup/backend.ai

Decide whether a gated lookup hides a missing name from the superadmin

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

One written answer to whether LookupActionProcessor should keep refusing a name nobody has as 'cannot resolve' for the superadmin, and the documents aligned to it.

## Background

A lookup wired with post-validators (lookup_ops) turns both a NotFoundError and a NotEnoughPermission into GenericBadRequest('Cannot resolve the given ... key'), so the status cannot be read as an answer to whether the name exists. That is deliberate for callers who could otherwise enumerate names (BA-7500). It applies to the superadmin too, who can list every policy anyway, so for them the merge hides nothing and costs the not-found answer.

api/adapters/domain/KNOWLEDGE.md states the opposite principle for its name lookup ('없는 대상과 권한 없음이 서로 다른 것으로 거부되어야 한다'); api/adapters/resource_policy/KNOWLEDGE.md states the merged one. The two documents disagree on what a gated lookup should do.

## Acceptance criteria

- Either LookupActionProcessor answers a superadmin's missing name with the not-found error, or the merge is kept; the choice is written into actions/v2/lookup/processor.py's docstring.
- The domain and resource policy KNOWLEDGE.md rows for a missing name agree with it, and their scenario tests pass.

## Related

- BA-7500
- BA-7809

JIRA Issue: BA-7841

Contributor guide

Open the contributing guide

Research direction

Read actions/v2/lookup/processor.py and compare its LookupActionProcessor behavior with the missing-name rows in api/adapters/domain/KNOWLEDGE.md and api/adapters/resource_policy/KNOWLEDGE.md. Decide which superadmin behavior the documents should describe, record the choice in the processor docstring, align both rows, and run their scenario tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design, documentation, testing
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.