feat: add startup script logs to the ui (#6558)

* Add startup script logs to the database

* Add coderd endpoints for startup script logs

* Push startup script logs from agent

* Pull startup script logs on frontend

* Rename queries

* Add constraint

* Start creating log sending loop

* Add log sending to the agent

* Add tests for streaming logs

* Shorten notify channel name

* Add FE

* Improve bulk log performance

* Finish UI display

* Fix startup log visibility

* Add warning for overflow

* Fix agent queue logs overflow

* Display staartup logs in a virtual DOM for performance

* Fix agent queue with loads of logs

* Fix authorize test

* Remove faulty test

* Fix startup and shutdown reporting error

* Fix gen

* Fix comments

* Periodically purge old database entries

* Add test fixture for migration

* Add Storybook

* Check if there are logs when displaying features

* Fix startup component overflow gap

* Fix startup log wrapping

---------

Co-authored-by: Asher <ash@coder.com>
This commit is contained in:
Kyle Carberry
2023-03-23 14:09:13 -05:00
committed by GitHub
co-authored by Asher
parent a6fa8cac58
commit cb7375450b
57 changed files with 2513 additions and 353 deletions
+8
View File
@@ -138,6 +138,8 @@ curl -X POST http://coder-server:8080/api/v2/organizations/{organization}/member
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
"shutdown_script": "string",
"shutdown_script_timeout_seconds": 0,
"startup_logs_length": 0,
"startup_logs_overflowed": true,
"startup_script": "string",
"startup_script_timeout_seconds": 0,
"status": "connecting",
@@ -308,6 +310,8 @@ curl -X GET http://coder-server:8080/api/v2/users/{user}/workspace/{workspacenam
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
"shutdown_script": "string",
"shutdown_script_timeout_seconds": 0,
"startup_logs_length": 0,
"startup_logs_overflowed": true,
"startup_script": "string",
"startup_script_timeout_seconds": 0,
"status": "connecting",
@@ -497,6 +501,8 @@ curl -X GET http://coder-server:8080/api/v2/workspaces \
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
"shutdown_script": "string",
"shutdown_script_timeout_seconds": 0,
"startup_logs_length": 0,
"startup_logs_overflowed": true,
"startup_script": "string",
"startup_script_timeout_seconds": 0,
"status": "connecting",
@@ -668,6 +674,8 @@ curl -X GET http://coder-server:8080/api/v2/workspaces/{workspace} \
"resource_id": "4d5215ed-38bb-48ed-879a-fdb9ca58522f",
"shutdown_script": "string",
"shutdown_script_timeout_seconds": 0,
"startup_logs_length": 0,
"startup_logs_overflowed": true,
"startup_script": "string",
"startup_script_timeout_seconds": 0,
"status": "connecting",