Commit 3fa19fe
committed
tests(auto_source_config): Multiple calls does not create new repositories
In #86597 I introduced a bug causing many [IntegrityErrors](https://sentry.sentry.io/explore/discover/results/?dataset=errors&end=2025-03-12T03%3A59%3A59.000&field=issue&field=count%28%29&interval=2h&name=IntegrityError%3A%20UniqueViolation%28%27duplicate%20key%20value%20violates%20unique%20constraint%20%22sentry_repositoryproject_project_id_stack_root_e376b891_uniq%22%5CnDETAIL%3A%20%20Key%20%28project_id%2C%20stack_root%29%3D%284507969920565328%2C%20kamino_platform%2F%29%20already%20exists.%5Cn%27%29&project=1&query=error.type%3AIntegrityError%20transaction%3Asentry.tasks.auto_source_code_config&queryDataset=error-events&sort=-count&start=2025-03-09T05%3A00%3A00.000&yAxis=count%28%29&yAxis=count_unique%28user%29) because we called `create` when the repository already existed.
This change is to have a test to prevent trying to create the repository more than once.1 parent 3743235 commit 3fa19fe
File tree
1 file changed
+38
-8
lines changed- tests/sentry/issues/auto_source_code_config
1 file changed
+38
-8
lines changedLines changed: 38 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
248 | 253 | | |
249 | 254 | | |
250 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
251 | 281 | | |
252 | 282 | | |
253 | 283 | | |
| |||
0 commit comments