Targeting: a stored ruleset the reader cannot parse raises, failing the bulk flags call and the SDK ruleset for every flag
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start in backend/app/core/targeting_adapter.py at normalise_targeting_rules, where the documented never-raises contract is broken for exceptions other than TargetingRulesError. Reproduce with a stored geo_within_radius whose radius is a very large integer (OverflowError) and a semver value like "1.²" (ValueError), then trace how get_user_flags, build_ruleset and segment membership call it. Done when one bad stored ruleset yields error for only its own flag while the bulk call and ruleset document still succeed, with tests covering both exception types.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
normalise_targeting_rules (backend/app/core/targeting_adapter.py) documents that invalid content never raises, but a stored ruleset whose reading raises an exception other than the ones it catches escapes it. Measured at 3a6eb775 (with #1664's branch on top, which touches no targeting code): a stored dashboard geo_within_radius whose radius is a 401-digit integer makes normalise_targeting_rules raise OverflowError. The principal engineer's review of the #1666/#1669/#1672 plan measured the same with a ValueError (a stored dashboard semver value "1.²", which a save refuses).
What a reader then does with one such stored flag, measured in that review:
get_user_flagsandbuild_rulesetraise, so the bulk flags call and the SDK ruleset document fail for every flag, not only this one;- segment membership raises (it catches only
TargetingRulesError); - every evaluation of the flag answers
errorand writes an error-log row, which the safety monitor counts.
No API route can write such a row (saves refuse or, until #1672 is fixed, answer 500 without writing); it takes a direct database write or a row stored before validation existed.
Expected
A stored ruleset that cannot be read affects only its own flag, experiment or segment. The fix is a read-path decision: catching the exception broadly in normalise_targeting_rules makes the flag fall back to its global rollout (fails open, as returning None does today for the cases it catches), so the likely shape is a per-flag catch that answers error for that flag and lets the bulk call and the ruleset document go on. The docstring's promise is made true either way.
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 4
- Merge medio
- 5h 36m
- PR unite (30g)
- 509
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 Controlvar/controlvar
-
bug post-launch
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Controlvar/controlvar#1748 ·
I maintainer di solito rispondono entro 1 giorno
-
Dashboard: the sequential panel's "Ready to stop" banner shows no sample-ratio-mismatch cautionApertabug post-launch
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Controlvar/controlvar#1737 ·
I maintainer di solito rispondono entro 1 giorno
-
bug post-launch
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Controlvar/controlvar#1562 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
Controlvar/controlvar#1447 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Experiment setup: emptying a traffic share box and typing a number shows a leading zero ("034")Apertabug post-launch
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Controlvar/controlvar#1428 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Controlvar/controlvar
Issue simili
-
[MOVIE]: Airport '77 (1977)Apertarequest-theme
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
LizardByte/ThemerrDB#9883 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Project-MONAI/MONAI#9258 ·
I maintainer di solito rispondono entro 3 giorni
-
catalog:deprecation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
surendranb/free-inference#31 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
fritzprix/libr-agent#2612 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage presubmit-gate
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
gke-labs/kube-agents#5001 ·
I maintainer di solito rispondono entro 1 giorno