lablup / lablup/backend.ai

Add a partial bulk upsert primitive to the RBAC write ops

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

Add `bulk_upsert_scoped_partial` to the RBAC write ops: the upsert counterpart of `bulk_create_scoped_partial` / `bulk_purge_scoped_partial`. Each row and its scope association share one savepoint, so a rejected row rolls back alone and the rest of the batch lands. The write ops currently offer upsert only as the single-item `upsert_scoped`.

## Acceptance criteria

- A batch with one rejected row (e.g. an FK gate violation) upserts the rest; the rejected row leaves neither the row nor its scope association behind.
- The result reports successes and per-index errors, mirroring the create/purge partial primitives.

## Related

- BA-7250 consumes this primitive for partial success in the app config fragment bulk upsert.
- BA-6628 introduced the conditional-bulk partial primitives this mirrors.

JIRA Issue: BA-7256

Contributor guide

Open the contributing guide

Research direction

Locate the RBAC write ops named bulk_create_scoped_partial, bulk_purge_scoped_partial, and upsert_scoped, then compare their savepoint and result-handling behavior. Add the bulk_upsert_scoped_partial entry point with per-row rollback and indexed errors, and verify that a rejected row leaves no row or scope association while other rows succeed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authorization, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.