From ba8e03868a227adbf5cd801a79ed2af1955e9264 Mon Sep 17 00:00:00 2001 From: Charlie Luo Date: Wed, 29 Jul 2026 15:42:11 -0700 Subject: [PATCH] feat(pr-metrics): add options for the PR lifecycle state backfill The backfill itself is a custom job in getsentry; these are the knobs it reads at runtime. They live here because register() only exists in sentry, and they are options rather than job parameters so an operator can kill or throttle a run in flight without a redeploy. Co-authored-by: Claude --- src/sentry/options/defaults.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/sentry/options/defaults.py b/src/sentry/options/defaults.py index c902cccb5660..5dbf4d1f7687 100644 --- a/src/sentry/options/defaults.py +++ b/src/sentry/options/defaults.py @@ -1338,6 +1338,26 @@ default=1, flags=FLAG_AUTOMATOR_MODIFIABLE, ) +register( + "issues.backfill_pr_lifecycle_state.killswitch", + type=Bool, + default=False, + flags=FLAG_MODIFIABLE_BOOL | FLAG_AUTOMATOR_MODIFIABLE, +) +# Minimum seconds between provider requests, so the backfill leaves headroom for live +# traffic on the same installation. +register( + "issues.backfill_pr_lifecycle_state.api_interval_s", + type=Float, + default=0.1, + flags=FLAG_AUTOMATOR_MODIFIABLE, +) +register( + "issues.backfill_pr_lifecycle_state.rate_limited_backoff_s", + type=Float, + default=5.0, + flags=FLAG_AUTOMATOR_MODIFIABLE, +) register( "seer.supergroups_backfill_lightweight.killswitch",