feat(coderd): return agent script timings (#14923)

Add the agent script timings into the
`/workspacebuilds/:workspacebuild/timings` response.

Close https://github.com/coder/coder/issues/14876
This commit is contained in:
Bruno Quaresma
2024-10-14 09:31:03 -03:00
committed by GitHub
parent 79d24d2101
commit 9c8ecb82a3
23 changed files with 982 additions and 296 deletions
+59 -24
View File
@@ -349,6 +349,30 @@
| --------- | ------ | -------- | ------------ | ----------- |
| `license` | string | true | | |
## codersdk.AgentScriptTiming
```json
{
"display_name": "string",
"ended_at": "2019-08-24T14:15:22Z",
"exit_code": 0,
"stage": "string",
"started_at": "2019-08-24T14:15:22Z",
"status": "string"
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| -------------- | ------- | -------- | ------------ | ----------- |
| `display_name` | string | false | | |
| `ended_at` | string | false | | |
| `exit_code` | integer | false | | |
| `stage` | string | false | | |
| `started_at` | string | false | | |
| `status` | string | false | | |
## codersdk.AgentSubsystem
```json
@@ -7348,6 +7372,41 @@ If the schedule is empty, the user will be updated to use the default schedule.|
| `name` | string | false | | |
| `value` | string | false | | |
## codersdk.WorkspaceBuildTimings
```json
{
"agent_script_timings": [
{
"display_name": "string",
"ended_at": "2019-08-24T14:15:22Z",
"exit_code": 0,
"stage": "string",
"started_at": "2019-08-24T14:15:22Z",
"status": "string"
}
],
"provisioner_timings": [
{
"action": "string",
"ended_at": "2019-08-24T14:15:22Z",
"job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
"resource": "string",
"source": "string",
"stage": "string",
"started_at": "2019-08-24T14:15:22Z"
}
]
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| ---------------------- | ----------------------------------------------------------------- | -------- | ------------ | ----------- |
| `agent_script_timings` | array of [codersdk.AgentScriptTiming](#codersdkagentscripttiming) | false | | |
| `provisioner_timings` | array of [codersdk.ProvisionerTiming](#codersdkprovisionertiming) | false | | |
## codersdk.WorkspaceConnectionLatencyMS
```json
@@ -7675,30 +7734,6 @@ If the schedule is empty, the user will be updated to use the default schedule.|
| `deleting` |
| `deleted` |
## codersdk.WorkspaceTimings
```json
{
"provisioner_timings": [
{
"action": "string",
"ended_at": "2019-08-24T14:15:22Z",
"job_id": "453bd7d7-5355-4d6d-a38e-d9e7eb218c3f",
"resource": "string",
"source": "string",
"stage": "string",
"started_at": "2019-08-24T14:15:22Z"
}
]
}
```
### Properties
| Name | Type | Required | Restrictions | Description |
| --------------------- | ----------------------------------------------------------------- | -------- | ------------ | ----------- |
| `provisioner_timings` | array of [codersdk.ProvisionerTiming](#codersdkprovisionertiming) | false | | |
## codersdk.WorkspaceTransition
```json