- Notifications
You must be signed in to change notification settings - Fork1.1k
Commitd98e3ca
committed
fix(database): limit GetLatestWorkspaceAppStatusByAppID to 1 row
GetLatestWorkspaceAppStatusesByAppID returned all app statuses for agiven app ID, which could be unbounded for long-running AI tasks. Onlythe most recent status was used, so we now:- Rename query to GetLatestWorkspaceAppStatusByAppID (singular)- Change query type from :many to :one- Add LIMIT 1 to SQL query- Update usages to handle single result instead of sliceFixes#20862---🤖 PR was written by Claude Sonnet 4.5 Thinking and reviewed by a human 🏄🏻♂️.1 parent7fd9a45 commitd98e3ca
File tree
8 files changed
+50
-64
lines changed- coderd
- database
- dbauthz
- dbmetrics
- dbmock
- queries
8 files changed
+50
-64
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1366 | 1366 | | |
1367 | 1367 | | |
1368 | 1368 | | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
1369 | 1376 | | |
1370 | 1377 | | |
1371 | 1378 | | |
| |||
2426 | 2433 | | |
2427 | 2434 | | |
2428 | 2435 | | |
2429 | | - | |
2430 | | - | |
2431 | | - | |
2432 | | - | |
2433 | | - | |
2434 | | - | |
2435 | | - | |
2436 | 2436 | | |
2437 | 2437 | | |
2438 | 2438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2864 | 2864 | | |
2865 | 2865 | | |
2866 | 2866 | | |
2867 | | - | |
| 2867 | + | |
2868 | 2868 | | |
2869 | | - | |
| 2869 | + | |
2870 | 2870 | | |
2871 | 2871 | | |
2872 | 2872 | | |
| |||
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 | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
| 391 | + | |
392 | 392 | | |
393 | | - | |
394 | | - | |
| 393 | + | |
| 394 | + | |
395 | 395 | | |
396 | | - | |
| 396 | + | |
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
| 445 | + | |
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
495 | | - | |
| 495 | + | |
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
502 | | - | |
| 502 | + | |
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
| |||
0 commit comments
Comments
(0)