- Notifications
You must be signed in to change notification settings - Fork928
Commitae522c5
authored
feat: add agent timings (#14713)
* feat: begin impl of agent script timings* feat: add job_id and display_name to script timings* fix: increment migration number* fix: rename migrations from 251 to 254* test: get tests compiling* fix: appease the linter* fix: get tests passing again* fix: drop column from correct table* test: add fixture for agent script timings* fix: typo* fix: use job id used in provisioner job timings* fix: increment migration number* test: behaviour of script runner* test: rewrite test* test: does exit 1 script break things?* test: rewrite test again* fix: revert changeNot sure how this came to be, I do not recall manually changingthese files.* fix: let code breathe* fix: wrap errors* fix: justify nolint* fix: swap require.Equal argument order* fix: add mutex operations* feat: add 'ran_on_start' and 'blocked_login' fields* fix: update testdata fixture* fix: refer to agent_id instead of job_id in timings* fix: JobID -> AgentID in dbauthz_test* fix: add 'id' to scripts, make timing refer to script id* fix: fix broken tests and convert bug* fix: update testdata fixtures* fix: update testdata fixtures again* feat: capture stage and if script timed out* fix: update migration number* test: add test for script api* fix: fake db query* fix: use UTC time* fix: ensure r.scriptComplete is not nil* fix: move err check to right after call* fix: uppercase sql* fix: use dbtime.Now()* fix: debug log on r.scriptCompleted being nil* fix: ensure correct rbac permissions* chore: remove DisplayName* fix: get tests passing* fix: remove space in sql up* docs: document ExecuteOption* fix: drop 'RETURNING' from sql* chore: remove 'display_name' from timing table* fix: testdata fixture* fix: put r.scriptCompleted call in goroutine* fix: track goroutine for test + use separate context for reporting* fix: appease linter, handle trackCommandGoroutine error* fix: resolve race condition* feat: replace timed_out column with status column* test: update testdata fixture* fix: apply suggestions from review* revert: linter changes1 parentb894407 commitae522c5
File tree
43 files changed
+1367
-232
lines changed- agent
- agentscripts
- agenttest
- proto
- coderd
- agentapi
- apidoc
- database
- dbauthz
- dbmem
- dbmetrics
- dbmock
- migrations
- testdata/fixtures
- queries
- provisionerdserver
- codersdk
- agentsdk
- docs/reference/api
- site/src
- api
- testHelpers
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
43 files changed
+1367
-232
lines changedLines changed: 3 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
941 | 941 |
| |
942 | 942 |
| |
943 | 943 |
| |
944 |
| - | |
| 944 | + | |
945 | 945 |
| |
946 | 946 |
| |
947 | 947 |
| |
948 | 948 |
| |
949 | 949 |
| |
950 | 950 |
| |
951 | 951 |
| |
952 |
| - | |
953 |
| - | |
954 |
| - | |
| 952 | + | |
955 | 953 |
| |
956 | 954 |
| |
957 | 955 |
| |
| |||
1844 | 1842 |
| |
1845 | 1843 |
| |
1846 | 1844 |
| |
1847 |
| - | |
1848 |
| - | |
1849 |
| - | |
| 1845 | + | |
1850 | 1846 |
| |
1851 | 1847 |
| |
1852 | 1848 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1517 | 1517 |
| |
1518 | 1518 |
| |
1519 | 1519 |
| |
| 1520 | + | |
1520 | 1521 |
| |
1521 | 1522 |
| |
1522 | 1523 |
| |
1523 | 1524 |
| |
| 1525 | + | |
1524 | 1526 |
| |
1525 | 1527 |
| |
1526 | 1528 |
| |
|
Lines changed: 97 additions & 25 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
22 | 23 |
| |
23 | 24 |
| |
24 | 25 |
| |
25 | 26 |
| |
| 27 | + | |
| 28 | + | |
26 | 29 |
| |
27 | 30 |
| |
28 | 31 |
| |
| |||
75 | 78 |
| |
76 | 79 |
| |
77 | 80 |
| |
| 81 | + | |
| 82 | + | |
78 | 83 |
| |
79 | 84 |
| |
80 | 85 |
| |
81 |
| - | |
82 |
| - | |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 |
| - | |
87 |
| - | |
88 |
| - | |
89 |
| - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
90 | 96 |
| |
91 | 97 |
| |
92 | 98 |
| |
| |||
116 | 122 |
| |
117 | 123 |
| |
118 | 124 |
| |
119 |
| - | |
| 125 | + | |
120 | 126 |
| |
121 | 127 |
| |
122 | 128 |
| |
123 | 129 |
| |
124 | 130 |
| |
| 131 | + | |
125 | 132 |
| |
126 | 133 |
| |
127 | 134 |
| |
| |||
135 | 142 |
| |
136 | 143 |
| |
137 | 144 |
| |
138 |
| - | |
| 145 | + | |
139 | 146 |
| |
140 | 147 |
| |
141 | 148 |
| |
| |||
172 | 179 |
| |
173 | 180 |
| |
174 | 181 |
| |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
175 | 193 |
| |
176 |
| - | |
177 |
| - | |
178 |
| - | |
179 |
| - | |
180 |
| - | |
181 |
| - | |
182 |
| - | |
| 194 | + | |
183 | 195 |
| |
184 | 196 |
| |
185 |
| - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
186 | 203 |
| |
187 | 204 |
| |
| 205 | + | |
188 | 206 |
| |
189 | 207 |
| |
190 |
| - | |
| 208 | + | |
191 | 209 |
| |
192 | 210 |
| |
193 | 211 |
| |
| |||
198 | 216 |
| |
199 | 217 |
| |
200 | 218 |
| |
201 |
| - | |
202 |
| - | |
| 219 | + | |
| 220 | + | |
203 | 221 |
| |
204 | 222 |
| |
205 | 223 |
| |
| |||
212 | 230 |
| |
213 | 231 |
| |
214 | 232 |
| |
215 |
| - | |
| 233 | + | |
216 | 234 |
| |
217 | 235 |
| |
218 | 236 |
| |
| |||
299 | 317 |
| |
300 | 318 |
| |
301 | 319 |
| |
302 |
| - | |
| 320 | + | |
303 | 321 |
| |
304 |
| - | |
| 322 | + | |
305 | 323 |
| |
306 | 324 |
| |
307 | 325 |
| |
| |||
314 | 332 |
| |
315 | 333 |
| |
316 | 334 |
| |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 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 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
317 | 389 |
| |
318 | 390 |
| |
319 | 391 |
| |
|
Lines changed: 40 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| 20 | + | |
20 | 21 |
| |
21 | 22 |
| |
22 | 23 |
| |
| |||
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
| 38 | + | |
37 | 39 |
| |
38 | 40 |
| |
39 | 41 |
| |
40 |
| - | |
| 42 | + | |
41 | 43 |
| |
42 |
| - | |
43 |
| - | |
44 |
| - | |
| 44 | + | |
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
| 64 | + | |
64 | 65 |
| |
65 | 66 |
| |
66 | 67 |
| |
67 |
| - | |
| 68 | + | |
68 | 69 |
| |
69 | 70 |
| |
70 | 71 |
| |
71 | 72 |
| |
72 | 73 |
| |
73 |
| - | |
74 |
| - | |
75 |
| - | |
| 74 | + | |
76 | 75 |
| |
77 | 76 |
| |
78 | 77 |
| |
| |||
103 | 102 |
| |
104 | 103 |
| |
105 | 104 |
| |
| 105 | + | |
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
110 |
| - | |
| 110 | + | |
111 | 111 |
| |
112 |
| - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
113 | 143 |
| |
114 | 144 |
| |
115 | 145 |
| |
|
Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
| 173 | + | |
173 | 174 |
| |
174 | 175 |
| |
175 | 176 |
| |
| |||
182 | 183 |
| |
183 | 184 |
| |
184 | 185 |
| |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
185 | 192 |
| |
186 | 193 |
| |
187 | 194 |
| |
| |||
301 | 308 |
| |
302 | 309 |
| |
303 | 310 |
| |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
304 | 319 |
| |
305 | 320 |
| |
306 | 321 |
| |
|
0 commit comments
Comments
(0)