mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: avoid missed logs when streaming startup logs (#8029)
* feat(coderd,agent): send startup log eof at the end * fix(coderd): fix edge case in startup log pubsub * fix(coderd): ensure startup logs are closed on lifecycle state change (fallback) * fix(codersdk): fix startup log channel shared memory bug * fix(site): remove the EOF log line
This commit is contained in:
+9
-7
@@ -702,6 +702,7 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/sta
|
||||
[
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"eof": true,
|
||||
"id": 0,
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
@@ -719,13 +720,14 @@ curl -X GET http://coder-server:8080/api/v2/workspaceagents/{workspaceagent}/sta
|
||||
|
||||
Status Code **200**
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------- | ------------------------------------------------ | -------- | ------------ | ----------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» id` | integer | false | | |
|
||||
| `» level` | [codersdk.LogLevel](schemas.md#codersdkloglevel) | false | | |
|
||||
| `» output` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| -------------- | ------------------------------------------------ | -------- | ------------ | --------------------------------------------------------------------- |
|
||||
| `[array item]` | array | false | | |
|
||||
| `» created_at` | string(date-time) | false | | |
|
||||
| `» eof` | boolean | false | | Eof indicates that this is the last log entry and the file is closed. |
|
||||
| `» id` | integer | false | | |
|
||||
| `» level` | [codersdk.LogLevel](schemas.md#codersdkloglevel) | false | | |
|
||||
| `» output` | string | false | | |
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
|
||||
+11
-6
@@ -280,6 +280,7 @@
|
||||
"logs": [
|
||||
{
|
||||
"created_at": "string",
|
||||
"eof": true,
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
}
|
||||
@@ -368,6 +369,7 @@
|
||||
```json
|
||||
{
|
||||
"created_at": "string",
|
||||
"eof": true,
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
}
|
||||
@@ -378,6 +380,7 @@
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------ | -------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `created_at` | string | false | | |
|
||||
| `eof` | boolean | false | | |
|
||||
| `level` | [codersdk.LogLevel](#codersdkloglevel) | false | | |
|
||||
| `output` | string | false | | |
|
||||
|
||||
@@ -4841,6 +4844,7 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
```json
|
||||
{
|
||||
"created_at": "2019-08-24T14:15:22Z",
|
||||
"eof": true,
|
||||
"id": 0,
|
||||
"level": "trace",
|
||||
"output": "string"
|
||||
@@ -4849,12 +4853,13 @@ AuthorizationObject can represent a "set" of objects, such as: all workspaces in
|
||||
|
||||
### Properties
|
||||
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------ | -------------------------------------- | -------- | ------------ | ----------- |
|
||||
| `created_at` | string | false | | |
|
||||
| `id` | integer | false | | |
|
||||
| `level` | [codersdk.LogLevel](#codersdkloglevel) | false | | |
|
||||
| `output` | string | false | | |
|
||||
| Name | Type | Required | Restrictions | Description |
|
||||
| ------------ | -------------------------------------- | -------- | ------------ | --------------------------------------------------------------------- |
|
||||
| `created_at` | string | false | | |
|
||||
| `eof` | boolean | false | | Eof indicates that this is the last log entry and the file is closed. |
|
||||
| `id` | integer | false | | |
|
||||
| `level` | [codersdk.LogLevel](#codersdkloglevel) | false | | |
|
||||
| `output` | string | false | | |
|
||||
|
||||
## codersdk.WorkspaceAgentStartupScriptBehavior
|
||||
|
||||
|
||||
Reference in New Issue
Block a user