- Notifications
You must be signed in to change notification settings - Fork923
Commite21a301
authored
fix: make GetWorkspacesEligibleForTransition return even less false positives (#15594)
Relates to#15082Further to#15429, this reduces theamount of false-positives returned by the 'is eligible for autostart'part of the query. We achieve this by calculating the 'next start at'time of the workspace, storing it in the database, and using it in our`GetWorkspacesEligibleForTransition` query.The prior implementation of the 'is eligible for autostart' query wouldreturn _all_ workspaces that at some point in the future _might_ beeligible for autostart. This now ensures we only return workspaces that_should_ be eligible for autostart.We also now pass `currentTick` instead of `t` to the`GetWorkspacesEligibleForTransition` query as otherwise we'll have oneround of workspaces that are skipped by `isEligibleForTransition` due to`currentTick` being a truncated version of `t`.1 parent2b57dcc commite21a301
File tree
35 files changed
+1012
-75
lines changed- cli/testdata
- coderd
- apidoc
- autobuild
- database
- dbauthz
- dbgen
- dbmem
- dbmetrics
- dbmock
- migrations
- queries
- provisionerdserver
- schedule
- codersdk
- docs
- admin/security
- reference/api
- enterprise
- audit
- coderd
- schedule
- site/src/api
35 files changed
+1012
-75
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
68 |
| - | |
| 68 | + | |
| 69 | + | |
69 | 70 |
| |
70 | 71 |
|
Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 20 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
145 |
| - | |
| 145 | + | |
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
| |||
205 | 205 |
| |
206 | 206 |
| |
207 | 207 |
| |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
208 | 225 |
| |
209 | 226 |
| |
210 | 227 |
| |
| |||
463 | 480 |
| |
464 | 481 |
| |
465 | 482 |
| |
466 |
| - | |
467 |
| - | |
| 483 | + | |
| 484 | + | |
468 | 485 |
| |
469 | 486 |
| |
470 | 487 |
| |
|
Lines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1083 | 1083 |
| |
1084 | 1084 |
| |
1085 | 1085 |
| |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
1086 | 1090 |
| |
1087 | 1091 |
| |
1088 | 1092 |
| |
| |||
1099 | 1103 |
| |
1100 | 1104 |
| |
1101 | 1105 |
| |
1102 |
| - | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
1103 | 1109 |
| |
1104 | 1110 |
| |
1105 | 1111 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1053 | 1053 |
| |
1054 | 1054 |
| |
1055 | 1055 |
| |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1056 | 1063 |
| |
1057 | 1064 |
| |
1058 | 1065 |
| |
| |||
2840 | 2847 |
| |
2841 | 2848 |
| |
2842 | 2849 |
| |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
2843 | 2857 |
| |
2844 | 2858 |
| |
2845 | 2859 |
| |
| |||
4085 | 4099 |
| |
4086 | 4100 |
| |
4087 | 4101 |
| |
| 4102 | + | |
| 4103 | + | |
| 4104 | + | |
| 4105 | + | |
| 4106 | + | |
| 4107 | + | |
| 4108 | + | |
4088 | 4109 |
| |
4089 | 4110 |
| |
4090 | 4111 |
| |
|
Lines changed: 16 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1908 | 1908 |
| |
1909 | 1909 |
| |
1910 | 1910 |
| |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
| 1916 | + | |
| 1917 | + | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
1911 | 1924 |
| |
1912 | 1925 |
| |
1913 | 1926 |
| |
| |||
2784 | 2797 |
| |
2785 | 2798 |
| |
2786 | 2799 |
| |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
2787 | 2803 |
| |
2788 | 2804 |
| |
2789 | 2805 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
260 | 260 |
| |
261 | 261 |
| |
262 | 262 |
| |
| 263 | + | |
263 | 264 |
| |
264 | 265 |
| |
265 | 266 |
| |
|
Lines changed: 77 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
475 | 475 |
| |
476 | 476 |
| |
477 | 477 |
| |
| 478 | + | |
478 | 479 |
| |
479 | 480 |
| |
480 | 481 |
| |
| |||
1431 | 1432 |
| |
1432 | 1433 |
| |
1433 | 1434 |
| |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
1434 | 1464 |
| |
1435 | 1465 |
| |
1436 | 1466 |
| |
| |||
6908 | 6938 |
| |
6909 | 6939 |
| |
6910 | 6940 |
| |
| 6941 | + | |
| 6942 | + | |
| 6943 | + | |
| 6944 | + | |
| 6945 | + | |
| 6946 | + | |
| 6947 | + | |
| 6948 | + | |
| 6949 | + | |
| 6950 | + | |
| 6951 | + | |
| 6952 | + | |
| 6953 | + | |
| 6954 | + | |
6911 | 6955 |
| |
6912 | 6956 |
| |
6913 | 6957 |
| |
| |||
6952 | 6996 |
| |
6953 | 6997 |
| |
6954 | 6998 |
| |
6955 |
| - | |
| 6999 | + | |
| 7000 | + | |
| 7001 | + | |
| 7002 | + | |
| 7003 | + | |
| 7004 | + | |
| 7005 | + | |
6956 | 7006 |
| |
6957 | 7007 |
| |
6958 | 7008 |
| |
| |||
6962 | 7012 |
| |
6963 | 7013 |
| |
6964 | 7014 |
| |
6965 |
| - | |
| 7015 | + | |
6966 | 7016 |
| |
6967 | 7017 |
| |
6968 | 7018 |
| |
| |||
7927 | 7977 |
| |
7928 | 7978 |
| |
7929 | 7979 |
| |
| 7980 | + | |
7930 | 7981 |
| |
7931 | 7982 |
| |
7932 | 7983 |
| |
| |||
9868 | 9919 |
| |
9869 | 9920 |
| |
9870 | 9921 |
| |
| 9922 | + | |
9871 | 9923 |
| |
9872 | 9924 |
| |
9873 | 9925 |
| |
| |||
10017 | 10069 |
| |
10018 | 10070 |
| |
10019 | 10071 |
| |
| 10072 | + | |
| 10073 | + | |
| 10074 | + | |
| 10075 | + | |
| 10076 | + | |
| 10077 | + | |
| 10078 | + | |
| 10079 | + | |
| 10080 | + | |
| 10081 | + | |
| 10082 | + | |
| 10083 | + | |
| 10084 | + | |
| 10085 | + | |
| 10086 | + | |
| 10087 | + | |
| 10088 | + | |
| 10089 | + | |
| 10090 | + | |
| 10091 | + | |
| 10092 | + | |
| 10093 | + | |
| 10094 | + | |
10020 | 10095 |
| |
10021 | 10096 |
| |
10022 | 10097 |
| |
|
Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
0 commit comments
Comments
(0)