- Notifications
You must be signed in to change notification settings - Fork1k
Commit1b66495
authored
fix(coderd/prometheusmetrics)!: filter deleted wsbuilds to reduce db load (#19197)
This change removes the `GetLatestWorkspaceBuilds` query which includesall workspaces for all time (including deleted). This allows us to alsostop using `GetProvisionerJobsByIDs` for said builds as the job statusis included in `GetWorkspaces` called separately.**BREAKING CHANGE**: The `coderd_api_workspace_latest_build` Prometheusmetric no longer includes builds belonging to deleted workspaces, assuch, this metric will show fewer statuses.Fixescoder/internal#7171 parent060fb57 commit1b66495
File tree
9 files changed
+95
-157
lines changed- coderd
- database
- dbauthz
- dbmetrics
- dbmock
- queries
- prometheusmetrics
9 files changed
+95
-157
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2178 | 2178 |
| |
2179 | 2179 |
| |
2180 | 2180 |
| |
2181 |
| - | |
2182 |
| - | |
2183 |
| - | |
2184 |
| - | |
2185 |
| - | |
2186 |
| - | |
2187 |
| - | |
2188 |
| - | |
2189 |
| - | |
2190 |
| - | |
2191 |
| - | |
2192 | 2181 |
| |
2193 | 2182 |
| |
2194 | 2183 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4035 | 4035 |
| |
4036 | 4036 |
| |
4037 | 4037 |
| |
4038 |
| - | |
4039 |
| - | |
4040 |
| - | |
4041 |
| - | |
4042 |
| - | |
4043 |
| - | |
4044 | 4038 |
| |
4045 | 4039 |
| |
4046 | 4040 |
| |
|
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
91 | 91 |
| |
92 | 92 |
| |
93 | 93 |
| |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 |
| - | |
100 |
| - | |
101 |
| - | |
102 |
| - | |
103 |
| - | |
104 |
| - | |
105 |
| - | |
106 |
| - | |
107 |
| - | |
108 | 94 |
| |
109 | 95 |
| |
110 | 96 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
153 |
| - | |
| 153 | + | |
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
| |||
159 | 159 |
| |
160 | 160 |
| |
161 | 161 |
| |
162 |
| - | |
| 162 | + | |
163 | 163 |
| |
164 | 164 |
| |
165 | 165 |
| |
| |||
168 | 168 |
| |
169 | 169 |
| |
170 | 170 |
| |
171 |
| - | |
172 |
| - | |
173 |
| - | |
174 |
| - | |
175 |
| - | |
176 |
| - | |
177 |
| - | |
178 |
| - | |
179 |
| - | |
180 |
| - | |
181 |
| - | |
182 |
| - | |
183 |
| - | |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 |
| - | |
189 |
| - | |
190 |
| - | |
191 |
| - | |
192 |
| - | |
193 |
| - | |
194 |
| - | |
195 |
| - | |
196 |
| - | |
197 |
| - | |
198 |
| - | |
199 |
| - | |
200 |
| - | |
201 |
| - | |
202 |
| - | |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 |
| - | |
| 171 | + | |
207 | 172 |
| |
208 | 173 |
| |
209 | 174 |
| |
210 | 175 |
| |
211 | 176 |
| |
212 | 177 |
| |
213 |
| - | |
| 178 | + | |
214 | 179 |
| |
| 180 | + | |
| 181 | + | |
215 | 182 |
| |
216 |
| - | |
217 |
| - | |
218 | 183 |
| |
219 | 184 |
| |
220 | 185 |
| |
| 186 | + | |
221 | 187 |
| |
| 188 | + | |
222 | 189 |
| |
223 |
| - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
224 | 202 |
| |
225 | 203 |
| |
226 | 204 |
| |
| |||
230 | 208 |
| |
231 | 209 |
| |
232 | 210 |
| |
233 |
| - | |
234 |
| - | |
| 211 | + | |
235 | 212 |
| |
236 | 213 |
| |
237 | 214 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
247 | 247 |
| |
248 | 248 |
| |
249 | 249 |
| |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
250 | 276 |
| |
251 | 277 |
| |
252 | 278 |
| |
| |||
323 | 349 |
| |
324 | 350 |
| |
325 | 351 |
| |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
326 | 379 |
| |
327 | 380 |
| |
328 | 381 |
| |
| |||
907 | 960 |
| |
908 | 961 |
| |
909 | 962 |
| |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + |
0 commit comments
Comments
(0)