Susana Ferreira
f044cc3550
feat: add provisioner daemon name to provisioner jobs responses ( #17877 )
...
# Description
This 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 the
provisioner job API response, was modified to include the new field.
**Notes:**
* As mentioned in
[comment](https://github.com/coder/coder/pull/17877#discussion_r2093218206 ),
the `GetProvisionerJobsByIDsWithQueuePosition` query was not changed due
to load concerns. This means that for template and template version
endpoints, `worker_id` will still be returned, but `worker_name` will
not.
* Similar to `worker_id`, the `worker_name` is only present once a job
is assigned to a provisioner daemon. For jobs in a pending state (not
yet 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` are
returned once a provisioner job reaches the **succeeded** state.
- Existing tests covering state transitions and other logic remain
unchanged, as they test different scenarios.
---
# Front-end Changes
Admin 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: https://github.com/coder/coder/issues/16982
2025-05-19 16:05:39 +01:00
..
2025-01-29 14:35:04 +00:00
2025-03-31 18:52:09 +01:00
2025-04-24 09:54:00 +02:00
2025-03-26 01:56:39 -05:00
2024-02-26 10:03:49 -06:00
2025-01-17 14:51:24 +02:00
2025-02-25 21:08:55 +05:00
2023-09-04 21:42:45 +03:00
2025-05-19 16:05:39 +01:00
2023-05-23 17:14:05 +02:00
2024-10-22 09:20:54 -05:00
2025-05-16 11:04:21 +00:00
2024-07-30 10:44:02 -06:00
2024-03-17 09:45:26 -05:00
2024-08-22 15:40:53 +10:00
2024-08-12 18:56:34 +10:00
2023-06-22 17:08:12 -05:00
2025-05-08 10:10:52 -04:00
2023-06-22 17:08:12 -05:00
2025-05-08 10:10:52 -04:00
2025-04-17 11:23:24 +04:00
2025-04-17 11:23:24 +04:00
2025-03-28 14:02:58 +00:00
2025-03-26 01:56:39 -05:00
2024-12-02 22:11:42 +00:00
2024-12-05 12:32:52 +11:00
2025-03-04 15:37:29 -07:00
2025-03-04 15:37:29 -07:00
2025-03-04 15:37:29 -07:00
2025-03-04 15:37:29 -07:00
2025-02-26 12:32:57 +00:00
2025-03-26 01:56:39 -05:00
2025-05-12 17:15:24 +01:00
2025-05-07 21:53:06 +02:00
2025-02-26 12:32:57 +00:00
2025-04-29 17:53:10 +03:00
2025-03-20 13:45:31 +00:00
2024-03-17 09:45:26 -05:00
2025-01-03 23:08:51 +02:00
2025-03-04 00:46:49 +11:00
2025-03-31 18:52:09 +01:00
2025-03-26 01:56:39 -05:00
2025-03-26 01:56:39 -05:00
2024-10-22 09:20:54 -05:00
2024-03-17 09:45:26 -05:00
2025-03-26 01:56:39 -05:00
2025-03-26 01:56:39 -05:00
2024-10-22 09:20:54 -05:00
2025-03-26 01:56:39 -05:00
2025-03-26 01:56:39 -05:00
2023-09-08 18:21:33 +00:00
2025-02-13 10:13:20 -05:00
2025-02-13 10:13:20 -05:00
2024-10-29 13:02:20 +00:00
2025-03-26 01:56:39 -05:00
2025-05-12 11:45:24 -07:00
2025-01-29 18:06:22 +02:00
2024-06-13 10:19:36 +04:00
2024-06-13 10:19:36 +04:00
2025-02-19 13:08:38 +00:00
2025-02-19 13:08:38 +00:00
2025-03-21 15:28:08 +00:00
2025-04-29 17:53:10 +03:00
2025-04-03 10:21:23 +01:00
2024-07-25 16:07:53 -05:00
2024-09-17 14:08:33 -05:00
2025-03-17 17:14:59 -04:00
2024-08-20 14:47:46 +10:00
2024-08-20 14:47:46 +10:00
2024-05-23 07:54:59 -10:00
2025-04-04 14:04:20 -04:00
2024-11-13 13:44:21 -06:00
2023-08-09 13:00:25 +02:00
2024-10-16 23:54:12 +02:00
2024-10-16 23:54:12 +02:00
2024-09-25 13:24:23 +10:00
2025-02-24 05:38:17 +00:00
2025-02-24 05:38:17 +00:00
2024-11-25 16:33:28 +04:00
2025-04-16 10:37:09 -06:00
2024-11-25 16:33:28 +04:00
2025-01-27 16:26:56 +00:00
2025-03-10 12:28:06 +00:00
2025-02-17 14:34:47 +02:00
2025-03-10 12:28:06 +00:00
2023-08-18 18:55:43 +00:00
2025-01-29 18:06:22 +02:00
2025-03-26 01:56:39 -05:00
2024-07-30 10:44:02 -06:00
2024-09-18 21:47:53 +10:00
2024-03-17 09:45:26 -05:00
2024-11-04 17:23:31 +01:00
2025-03-26 01:56:39 -05:00
2025-04-30 05:18:13 +00:00
2024-09-04 14:39:35 +01:00
2025-01-08 15:38:37 +00:00
2025-04-17 11:23:24 +04:00
2025-05-12 11:45:24 -07:00
2022-06-16 18:24:10 +01:00
2024-12-18 10:58:33 +00:00
2024-12-18 10:58:33 +00:00
2024-11-04 17:23:31 +01:00
2025-01-20 14:31:16 +01:00
2025-02-11 09:06:42 +01:00
2025-03-27 10:03:53 +00:00
2025-03-27 10:03:53 +00:00
2024-03-17 09:45:26 -05:00
2025-04-09 09:20:47 +01:00
2025-05-14 14:52:22 +02:00
2024-07-30 10:44:02 -06:00
2025-02-11 09:20:55 +00:00
2024-03-15 13:16:36 +00:00
2024-03-15 13:16:36 +00:00
2024-11-18 14:09:22 +04:00
2024-09-18 21:47:53 +10:00
2025-04-30 15:17:10 +10:00
2023-07-20 12:05:39 +02:00
2025-05-16 10:09:46 -04:00
2023-07-20 12:05:39 +02:00
2025-05-16 10:09:46 -04:00
2025-04-30 05:18:13 +00:00
2025-03-25 13:54:53 +01:00
2025-03-26 10:36:53 +00:00
2025-03-26 10:36:53 +00:00
2024-10-22 09:20:54 -05:00
2024-03-17 09:45:26 -05:00
2024-12-02 20:54:32 +00:00
2025-04-09 09:21:17 +01:00
2024-08-22 11:15:02 +01:00
2024-07-25 16:07:53 -05:00
2024-11-01 19:43:51 +00:00
2023-10-10 11:14:20 +01:00
2024-07-01 16:04:45 -05:00
2024-03-20 10:37:57 -05:00
2025-03-26 01:56:39 -05:00
2023-08-18 18:55:43 +00:00
2024-03-17 09:45:26 -05:00
2024-07-25 16:07:53 -05:00
2024-07-09 11:04:16 -05:00
2024-10-25 15:14:39 +01:00
2024-07-01 16:04:45 -05:00
2025-04-10 19:08:38 +01:00
2025-03-27 09:09:46 -04:00
2024-07-09 14:27:34 +00:00
2023-10-11 09:26:22 -05:00
2025-01-29 18:06:22 +02:00
2024-10-17 14:15:14 +05:00
2024-10-17 14:15:14 +05:00
2025-02-12 18:18:17 +11:00
2025-03-04 00:46:49 +11:00
2025-05-09 17:41:19 +02:00
2024-10-16 23:54:12 +02:00
2024-08-23 21:23:51 +00:00
2025-04-16 10:37:09 -06:00
2025-05-13 20:48:16 +00:00
2024-03-17 09:45:26 -05:00
2025-04-15 18:30:20 -04:00
2025-04-15 18:30:20 -04:00
2025-05-12 11:45:24 -07:00
2025-05-13 20:48:16 +00:00
2025-04-15 18:30:20 -04:00
2023-10-10 11:14:20 +01:00
2024-08-20 14:47:46 +10:00
2024-10-16 17:02:56 +02:00
2025-03-26 01:56:39 -05:00
2023-09-07 16:28:22 -05:00
2024-03-17 09:45:26 -05:00
2024-11-18 21:10:01 +10:00
2024-11-18 21:10:01 +10:00
2025-01-29 08:09:36 +00:00
2024-11-18 21:10:01 +10:00
2024-11-18 14:09:22 +04:00
2025-03-26 01:56:39 -05:00
2024-07-09 13:23:11 -05:00
2024-07-09 13:23:11 -05:00