raystack / raystack/frontier

Add batch get-by-IDs RPCs to AdminService for users, service users, and projects

Open
#1,654 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
344
Forks
47
Avg merge
4d 4h
Merged PRs (30d)
26

Description

Problem

AdminService can list entire collections (ListAllUsers, ListAllServiceUsers, ListAllOrganizations), but there's no way to resolve a known set of IDs to entities in a single call. Given a list of IDs, the options today are to issue N single Get calls or to list a whole collection and filter — N round-trips, or over-fetching.

Proposal

Add batch get-by-IDs RPCs to AdminService (superuser-gated, consistent with the existing ListAll* admin RPCs, since these are cross-org lookups that aren't org-scoped):

  • BatchGetUsers(user_ids: []string) → users: []User
  • BatchGetServiceUsers(service_user_ids: []string) → service_users: []ServiceUser
  • BatchGetProjects(project_ids: []string) → projects: []Project

Each takes a repeated ID field and returns the matching existing entity messages. A bounded max number of IDs per request (like BatchCheckPermission) would be reasonable.

Notes
  • The lookup already exists internally — GetByIDs is implemented in core/user, core/serviceuser, and core/group; it just isn't exposed at the API layer. (core/group could get a BatchGetGroups too if useful.)
  • core/project would need a batch lookup added; it currently has only single Get and a filtered List.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the AdminService definitions and existing ListAllUsers, ListAllServiceUsers, ListAllOrganizations, and BatchCheckPermission RPCs. Read the GetByIDs implementations in core/user, core/serviceuser, and core/group, plus the single Get and filtered List paths in core/project. Done means superuser-gated batch RPCs for users, service users, and projects, with bounded IDs and coverage for matching results.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, grpc
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.