mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
* 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>
22 lines
512 B
SQL
22 lines
512 B
SQL
-- name: GetProvisionerLogsAfterID :many
|
|
SELECT
|
|
*
|
|
FROM
|
|
provisioner_job_logs
|
|
WHERE
|
|
job_id = @job_id
|
|
AND (
|
|
id > @created_after
|
|
) ORDER BY id ASC;
|
|
|
|
-- name: InsertProvisionerJobLogs :many
|
|
INSERT INTO
|
|
provisioner_job_logs
|
|
SELECT
|
|
@job_id :: uuid AS job_id,
|
|
unnest(@created_at :: timestamptz [ ]) AS created_at,
|
|
unnest(@source :: log_source [ ]) AS source,
|
|
unnest(@level :: log_level [ ]) AS LEVEL,
|
|
unnest(@stage :: VARCHAR(128) [ ]) AS stage,
|
|
unnest(@output :: VARCHAR(1024) [ ]) AS output RETURNING *;
|