chore: rename startup logs to agent logs (#8649)

* chore: rename startup logs to agent logs

This also adds a `source` property to every agent log. It
should allow us to group logs and display them nicer in
the UI as they stream in.

* Fix migration order

* Fix naming

* Rename the frontend

* Fix tests

* Fix down migration

* Match enums for workspace agent logs

* Fix inserting log source

* Fix migration order

* Fix logs tests

* Fix psql insert
This commit is contained in:
Kyle Carberry
2023-07-28 15:57:23 +00:00
committed by GitHub
parent 78b06397a6
commit bd944e0d21
48 changed files with 1471 additions and 876 deletions
+8 -8
View File
@@ -1620,6 +1620,8 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
},
"lifecycle_state": "created",
"login_before_ready": true,
"logs_length": 0,
"logs_overflowed": true,
"name": "string",
"operating_system": "string",
"ready_at": "2019-08-24T14:15:22Z",
@@ -1627,8 +1629,6 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/d
"shutdown_script": "string",
"shutdown_script_timeout_seconds": 0,
"started_at": "2019-08-24T14:15:22Z",
"startup_logs_length": 0,
"startup_logs_overflowed": true,
"startup_script": "string",
"startup_script_behavior": "blocking",
"startup_script_timeout_seconds": 0,
@@ -1709,6 +1709,8 @@ Status Code **200**
| `»»»» preferred` | boolean | false | | |
| `»» lifecycle_state` | [codersdk.WorkspaceAgentLifecycle](schemas.md#codersdkworkspaceagentlifecycle) | false | | |
| `»» login_before_ready` | boolean | false | | Deprecated: Use StartupScriptBehavior instead. |
| `»» logs_length` | integer | false | | |
| `»» logs_overflowed` | boolean | false | | |
| `»» name` | string | false | | |
| `»» operating_system` | string | false | | |
| `»» ready_at` | string(date-time) | false | | |
@@ -1716,8 +1718,6 @@ Status Code **200**
| `»» shutdown_script` | string | false | | |
| `»» shutdown_script_timeout_seconds` | integer | false | | |
| `»» started_at` | string(date-time) | false | | |
| `»» startup_logs_length` | integer | false | | |
| `»» startup_logs_overflowed` | boolean | false | | |
| `»» startup_script` | string | false | | |
| `»» startup_script_behavior` | [codersdk.WorkspaceAgentStartupScriptBehavior](schemas.md#codersdkworkspaceagentstartupscriptbehavior) | false | | |
| `»» startup_script_timeout_seconds` | integer | false | | »startup script timeout seconds is the number of seconds to wait for the startup script to complete. If the script does not complete within this time, the agent lifecycle will be marked as start_timeout. |
@@ -2012,6 +2012,8 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
},
"lifecycle_state": "created",
"login_before_ready": true,
"logs_length": 0,
"logs_overflowed": true,
"name": "string",
"operating_system": "string",
"ready_at": "2019-08-24T14:15:22Z",
@@ -2019,8 +2021,6 @@ curl -X GET http://coder-server:8080/api/v2/templateversions/{templateversion}/r
"shutdown_script": "string",
"shutdown_script_timeout_seconds": 0,
"started_at": "2019-08-24T14:15:22Z",
"startup_logs_length": 0,
"startup_logs_overflowed": true,
"startup_script": "string",
"startup_script_behavior": "blocking",
"startup_script_timeout_seconds": 0,
@@ -2101,6 +2101,8 @@ Status Code **200**
| `»»»» preferred` | boolean | false | | |
| `»» lifecycle_state` | [codersdk.WorkspaceAgentLifecycle](schemas.md#codersdkworkspaceagentlifecycle) | false | | |
| `»» login_before_ready` | boolean | false | | Deprecated: Use StartupScriptBehavior instead. |
| `»» logs_length` | integer | false | | |
| `»» logs_overflowed` | boolean | false | | |
| `»» name` | string | false | | |
| `»» operating_system` | string | false | | |
| `»» ready_at` | string(date-time) | false | | |
@@ -2108,8 +2110,6 @@ Status Code **200**
| `»» shutdown_script` | string | false | | |
| `»» shutdown_script_timeout_seconds` | integer | false | | |
| `»» started_at` | string(date-time) | false | | |
| `»» startup_logs_length` | integer | false | | |
| `»» startup_logs_overflowed` | boolean | false | | |
| `»» startup_script` | string | false | | |
| `»» startup_script_behavior` | [codersdk.WorkspaceAgentStartupScriptBehavior](schemas.md#codersdkworkspaceagentstartupscriptbehavior) | false | | |
| `»» startup_script_timeout_seconds` | integer | false | | »startup script timeout seconds is the number of seconds to wait for the startup script to complete. If the script does not complete within this time, the agent lifecycle will be marked as start_timeout. |