Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Org scoped searches disagree on what a deleted organization means

Aperta
#1,956 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api, backend, database

Direzione di ricerca

Trace the handlers and aggregate services for the invoice and token RPCs first to find where their 404 responses originate, then compare that path with the other org-scoped searches and OrganizationRepository.Delete. Make every listed search resolve the organization consistently and return 404 when absent while retaining the SQL live(organizations) checks; verify the behavior for all affected RPCs.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The problem

Asking an org scoped search about an organization that is gone gives different answers depending on which RPC you call. A client cannot tell "this organization does not exist" apart from "this organization has nothing to show".

We want 404 not found everywhere.

Where things stand today

Verified by reading the handlers and services:

RPC Today How
SearchOrganizationServiceUsers 404 The handler calls orgService.GetRaw first, which reads live rows only
SearchOrganizationUsers 200, empty list After #1953 the SQL filters the organization out
SearchOrganizationProjects 200, empty list After #1953 the SQL filters the organization out
SearchUserProjects 200, empty list After #1953 the SQL filters the organization out
SearchOrganizationPATs 200, with rows No check anywhere. See the comment on #1953
SearchOrganizationInvoices 404 Needs confirming, see below
SearchOrganizationTokens 404 Needs confirming, see below

The end to end run in #1952 reported 404 for invoices and tokens. But neither handler nor either aggregate service resolves the organization. So something upstream is doing it, and part of this work is finding out what. If it turns out to be a shared path, that path may be the right place to fix all of them at once.

What to do

  1. Find out where the 404 for invoices and tokens comes from.
  2. Pick one way for every org scoped search to resolve the organization before running the query, and answer 404 when it is not there. Reuse whatever invoices and tokens already go through if that turns out to be shared.
  3. Apply it to SearchOrganizationUsers, SearchOrganizationProjects, SearchUserProjects and SearchOrganizationPATs.
  4. Keep the SQL level live(organizations) checks from #1953 as well. They are cheap and they guard the case where a policy row outlives its organization. policies.resource_id has no foreign key to organizations, so a hard deleted organization does leave membership policies behind.

Why it matters

Today OrganizationRepository.Delete is a hard delete and nothing sets deleted_at on organizations, so the split is mostly invisible. It will stop being invisible the moment organizations get a soft delete. Better to settle it now while the blast radius is small.

Related

  • #1953 added the SQL level checks for three of these searches
  • #1952 changed how a bad organization id is reported, which is what surfaced the split
Lingua principale
Go
Stelle
344
Fork
47
Merge medio
2g 20h
PR unite (30g)
39

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di raystack/frontier

Tutte le issue di raystack/frontier

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.