Dashboardsentryoptions.get() reads from DB — config fi…

options.get() reads from DB — config file SENTRY_OPTIONS dict not used for all keys

Category: gotcha
Confidence: 1.00
ID: 019d9d69-097b-7a03-8f59-3ca5f94daf34
Project ID: 702228c8-56bc-4694-8d5a-174ac2f29105
Cross-project: No
Recalled in other projects: 0
Source session: (none)
Created: 2026-07-30 15:46:04
Updated: 2026-07-30 15:46:04

Content

options.get() reads from DB — config file SENTRY_OPTIONS dict not used for all keys: options.get(key) reads from DB-backed store with caching, NOT from SENTRY_OPTIONS dict (which only applies to FLAG_NOSTORE keys or initial defaults). To set runtime options locally: from sentry import options; options.set('key', 'value') via Django shell. In tests, @override_options({...}) must include ALL accessed options — missing keys hit real DB, causing RuntimeError without @pytest.mark.django_db. Production changes go through sentry-options-automator repo (configoptions) for gradual rollout without deploys.

Move to: