- Notifications
You must be signed in to change notification settings - Fork914
Commitf044cc3
authored
feat: add provisioner daemon name to provisioner jobs responses (#17877)
# DescriptionThis PR adds the `worker_name` field to the provisioner jobs endpoint.To achieve this, the following SQL query was updated:-`GetProvisionerJobsByOrganizationAndStatusWithQueuePositionAndProvisioner`As a result, the `codersdk.ProvisionerJob` type, which represents theprovisioner job API response, was modified to include the new field.**Notes:** * As mentioned in[comment](#17877 (comment)),the `GetProvisionerJobsByIDsWithQueuePosition` query was not changed dueto load concerns. This means that for template and template versionendpoints, `worker_id` will still be returned, but `worker_name` willnot.* Similar to `worker_id`, the `worker_name` is only present once a jobis assigned to a provisioner daemon. For jobs in a pending state (notyet assigned), neither `worker_id` nor `worker_name` will be returned.---# Affected Endpoints- `/organizations/{organization}/provisionerjobs`- `/organizations/{organization}/provisionerjobs/{job}`---# Testing- Added new tests verifying that both `worker_id` and `worker_name` arereturned once a provisioner job reaches the **succeeded** state.- Existing tests covering state transitions and other logic remainunchanged, as they test different scenarios.---# Front-end ChangesAdmin provisioner jobs dashboard:<img width="1088" alt="Screenshot 2025-05-16 at 11 51 33"src="https://github.com/user-attachments/assets/0e20e360-c615-4497-84b7-693777c5443e"/>Fixes:#169821 parent87dc247 commitf044cc3
File tree
22 files changed
+346
-177
lines changed- cli/testdata
- coderd
- apidoc
- coderdtest
- database
- dbmem
- queries
- codersdk
- docs/reference
- api
- cli
- enterprise/cli/testdata
- site/src
- api
- pages/OrganizationSettingsPage/OrganizationProvisionerJobsPage
22 files changed
+346
-177
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
| 9 | + | |
9 | 10 |
| |
10 | 11 |
| |
11 | 12 |
| |
| |||
34 | 35 |
| |
35 | 36 |
| |
36 | 37 |
| |
| 38 | + | |
37 | 39 |
| |
38 | 40 |
| |
39 | 41 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
2 |
| - | |
| 1 | + | |
| 2 | + |
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 |
| - | |
| 8 | + | |
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
|
Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
96 | 96 |
| |
97 | 97 |
| |
98 | 98 |
| |
| 99 | + | |
| 100 | + | |
99 | 101 |
| |
100 | 102 |
| |
101 | 103 |
| |
| |||
602 | 604 |
| |
603 | 605 |
| |
604 | 606 |
| |
605 |
| - | |
| 607 | + | |
606 | 608 |
| |
607 | 609 |
| |
608 | 610 |
| |
| |||
646 | 648 |
| |
647 | 649 |
| |
648 | 650 |
| |
649 |
| - | |
| 651 | + | |
650 | 652 |
| |
651 | 653 |
| |
652 | 654 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4848 | 4848 |
| |
4849 | 4849 |
| |
4850 | 4850 |
| |
| 4851 | + | |
| 4852 | + | |
| 4853 | + | |
| 4854 | + | |
| 4855 | + | |
| 4856 | + | |
| 4857 | + | |
4851 | 4858 |
| |
4852 | 4859 |
| |
4853 | 4860 |
| |
|
Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 8 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
163 |
| - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
164 | 166 |
| |
165 | 167 |
| |
166 | 168 |
| |
| |||
185 | 187 |
| |
186 | 188 |
| |
187 | 189 |
| |
| 190 | + | |
| 191 | + | |
| 192 | + | |
188 | 193 |
| |
189 | 194 |
| |
190 | 195 |
| |
| |||
200 | 205 |
| |
201 | 206 |
| |
202 | 207 |
| |
203 |
| - | |
| 208 | + | |
| 209 | + | |
204 | 210 |
| |
205 | 211 |
| |
206 | 212 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
395 | 395 |
| |
396 | 396 |
| |
397 | 397 |
| |
| 398 | + | |
398 | 399 |
| |
399 | 400 |
| |
400 | 401 |
| |
|
0 commit comments
Comments
(0)