Commit 39b1ebf
ref(preprod): Remove Kafka producer and taskbroker feature flag (#112593)
Taskbroker is now the only dispatch path for preprod artifacts. This PR
removes the old Kafka producer path and all associated dead code.
**What's removed:**
- `src/sentry/preprod/producer.py` — entire module (was already fully
commented out)
- `launchpad-taskbroker-rollout` feature flag registration
- `PREPROD_ARTIFACT_EVENTS` Kafka topic definition and cluster mapping
- `SENTRY_PREPROD_ARTIFACT_EVENTS_FUTURES_MAX_LIMIT` settings constant
- All `produce_preprod_artifact_to_kafka` references in tests
**What's simplified:**
- `PreprodFeature` enum moved from deleted `producer.py` to `quotas.py`
- Rerun analysis endpoint now checks `run_size` directly instead of
building an intermediate `requested_features` list
- `cleanup_old_metrics` uses list comprehension for file ID collection
**Tests updated:**
- Replaced kafka/flag-gated dispatch tests with direct
`dispatch_taskbroker` assertions
- Replaced `produce_preprod_artifact_to_kafka` mock tests with
`cleanup_old_metrics` mock tests that verify quota-based cleanup
behavior
Co-authored-by: Claude <noreply@anthropic.com>1 parent 2408ecd commit 39b1ebf
File tree
10 files changed
+38
-469
lines changed- src/sentry
- conf
- types
- features
- preprod
- api/endpoints
- tests/sentry/preprod
- api/endpoints
10 files changed
+38
-469
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2692 | 2692 | | |
2693 | 2693 | | |
2694 | 2694 | | |
2695 | | - | |
2696 | 2695 | | |
2697 | 2696 | | |
2698 | 2697 | | |
| |||
3027 | 3026 | | |
3028 | 3027 | | |
3029 | 3028 | | |
3030 | | - | |
3031 | | - | |
3032 | 3029 | | |
3033 | 3030 | | |
3034 | 3031 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | 160 | | |
163 | 161 | | |
164 | 162 | | |
| |||
Lines changed: 11 additions & 104 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 67 | | |
72 | 68 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 69 | | |
81 | 70 | | |
82 | 71 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 72 | + | |
109 | 73 | | |
110 | 74 | | |
111 | 75 | | |
| |||
182 | 146 | | |
183 | 147 | | |
184 | 148 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
215 | 152 | | |
216 | 153 | | |
217 | 154 | | |
| |||
303 | 240 | | |
304 | 241 | | |
305 | 242 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
| 243 | + | |
332 | 244 | | |
333 | 245 | | |
334 | 246 | | |
| |||
367 | 279 | | |
368 | 280 | | |
369 | 281 | | |
370 | | - | |
371 | | - | |
372 | 282 | | |
373 | 283 | | |
374 | 284 | | |
375 | | - | |
376 | | - | |
377 | | - | |
| 285 | + | |
378 | 286 | | |
379 | 287 | | |
380 | 288 | | |
| |||
392 | 300 | | |
393 | 301 | | |
394 | 302 | | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
399 | 306 | | |
400 | 307 | | |
401 | 308 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
32 | 30 | | |
33 | 31 | | |
34 | 32 | | |
| |||
165 | 163 | | |
166 | 164 | | |
167 | 165 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
176 | 169 | | |
177 | 170 | | |
178 | 171 | | |
| |||
976 | 969 | | |
977 | 970 | | |
978 | 971 | | |
979 | | - | |
980 | | - | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | | - | |
986 | | - | |
987 | | - | |
988 | | - | |
989 | | - | |
990 | | - | |
991 | | - | |
992 | | - | |
993 | | - | |
994 | | - | |
995 | | - | |
996 | | - | |
997 | | - | |
998 | | - | |
999 | | - | |
1000 | | - | |
1001 | | - | |
1002 | | - | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | | - | |
1009 | | - | |
1010 | | - | |
1011 | | - | |
1012 | | - | |
1013 | | - | |
1014 | | - | |
1015 | | - | |
1016 | | - | |
1017 | | - | |
1018 | | - | |
1019 | | - | |
1020 | 972 | | |
1021 | 973 | | |
1022 | 974 | | |
| |||
0 commit comments