Backfill `organisation_id` on existing audit logs
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 36/100
Direzione di ricerca
Start by reading #8888 and tracing the audit log model, organisation-scoped list and filter queries, webhooks, and integrations described in the issue. Identify the existing migration and backfill patterns, then assess how the backfill can run while writes, listing, search, and deliveries continue. Done means the acceptance criteria hold: every relevant API log has its organisation, queries are no slower, and results and deliveries are unchanged.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
After #8888, we gain a nullable AuditLog.organisation field for organisation-level audit logs.
Existing project and environment logs keep organisation_id = NULL, so every organisation-scoped read still has to look up the organisation through project:
organisation_id = X OR project.organisation_id = Xin the organisation and all-logs endpoints, and in the organisation filter. In/api/v1/audit/, this leads to two OR'd joins, which poses a duplicate row risk in results.- fallback chains through project in audit log webhooks and integrations.
Besides that, users see organisation: null in API responses for most logs.
We propose to backfill the field value for existing audit logs, which will gain us:
- One way to scope by organisation, index-friendly queries, and impler webhook + integrations code:
WHERE organisation_id = Xeverywhere instead of OR / joins / project fallback logic. Also, no duplicate row risk in/api/v1/audit/. - A clear meaning for "organisation-level":
project_id IS NULL AND environment_id IS NULL, with no reliance onNULLmeaning something by convention. - A complete API: organisation is set on every log that belongs to an organisation.
- Easier future work: organisation-wide features such as retention, export and analytics can rely on a single column.
Acceptance criteria
- Every audit log that belongs to a project or environment shows its organisation in the API (
organisationis notnull), including logs created before #8888. - The organisation audit log list is faster than existing p95 of 900ms, or at least no slower.
- Users see no impact while the backfill runs: audit logs keep being written and listed, and search keeps working.
- The organisation audit log shows exactly the same logs as before the backfill: none missing, none duplicated, and audit log webhooks and integrations are delivered exactly as before.
- Lingua principale
- Python
- Stelle
- 7.1k
- Fork
- 603
- Merge medio
- 3g 8h
- PR unite (30g)
- 102
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Flagsmith/flagsmith
-
Expose whether an organisation is blocked for API usageForse già presa @PiUnknown l’ha presa 26 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Flagsmith/flagsmith#8773 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Environment colors mismatch in audit log viewForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
Flagsmith/flagsmith#8681 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
influx_query_manager doesn't catch ApiException, so Influx error responses 500Forse già presa @SAY-5 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Flagsmith/flagsmith#8510 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Sales dashboard: download_org_data 500s with "Object of type generator is not JSON serializable"Forse già presa @Iflaqbhat l’ha presa 45 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Flagsmith/flagsmith
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
peach-mitao/peach#693 ·
I maintainer di solito rispondono entro 1 giorno
-
FTP reads inside a transaction use a nonexistent staging pathForse già presa @Harsh23Kashyap l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
fsspec/filesystem_spec#2463 ·
I maintainer di solito rispondono entro 1 giorno
-
comp/cli P2 tool/code-exec type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NousResearch/hermes-agent#155989 ·
I maintainer di solito rispondono entro 1 giorno
-
PipesFileMessageReader parses a partially written message line: tail_file yields a line before its newline arrivesForse già presa @PCTEJA l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
dagster-io/dagster#34442 ·
I maintainer di solito rispondono entro 1 giorno