Skip to content

Commit 58a76db

Browse files
committed
docs: clarify workspace agent logs retention is based on agent connection
The description was misleading by stating logs are deleted 'after this period' without explaining that retention is based on when the agent last connected, not the age of the logs themselves. Updated to clearly state that logs from non-latest builds are deleted if the agent hasn't connected within the retention period, and that logs from the latest build are always retained.
1 parent 3c3a222 commit 58a76db

File tree

9 files changed

+23
-17
lines changed

9 files changed

+23
-17
lines changed

cli/testdata/coder_server_--help.golden

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,9 @@ that data type.
719719

720720
--workspace-agent-logs-retention duration, $CODER_WORKSPACE_AGENT_LOGS_RETENTION (default: 7d)
721721
How long workspace agent logs are retained. Logs from non-latest
722-
workspace builds are deleted after this period to free up storage
723-
space. Set to 0 to disable automatic deletion of workspace agent logs.
722+
builds are deleted if the agent hasn't connected within this period.
723+
Logs from the latest build are always retained. Set to 0 to disable
724+
automatic deletion.
724725

725726
TELEMETRY OPTIONS:
726727
Telemetry is critical to our ability to improve Coder. We strip all personal

cli/testdata/server-config.yaml.golden

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -761,8 +761,8 @@ retention:
761761
# an expired key. Set to 0 to disable automatic deletion of expired keys.
762762
# (default: 7d, type: duration)
763763
api_keys: 168h0m0s
764-
# How long workspace agent logs are retained. Logs from non-latest workspace
765-
# builds are deleted after this period to free up storage space. Set to 0 to
766-
# disable automatic deletion of workspace agent logs.
764+
# How long workspace agent logs are retained. Logs from non-latest builds are
765+
# deleted if the agent hasn't connected within this period. Logs from the latest
766+
# build are always retained. Set to 0 to disable automatic deletion.
767767
# (default: 7d, type: duration)
768768
workspace_agent_logs: 168h0m0s

coderd/apidoc/docs.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codersdk/deployment.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,8 @@ type RetentionConfig struct {
830830
// Defaults to 7 days to preserve existing behavior.
831831
APIKeys serpent.Duration `json:"api_keys" typescript:",notnull"`
832832
// WorkspaceAgentLogs controls how long workspace agent logs are retained.
833+
// Logs are deleted if the agent hasn't connected within this period.
834+
// Logs from the latest build are always retained regardless of age.
833835
// Defaults to 7 days to preserve existing behavior.
834836
WorkspaceAgentLogs serpent.Duration `json:"workspace_agent_logs" typescript:",notnull"`
835837
}
@@ -3425,7 +3427,7 @@ Write out the current server config as YAML to stdout.`,
34253427
},
34263428
{
34273429
Name: "Workspace Agent Logs Retention",
3428-
Description: "How long workspace agent logs are retained. Logs from non-latest workspace builds are deleted after this period to free up storage space. Set to 0 to disable automatic deletion of workspace agent logs.",
3430+
Description: "How long workspace agent logs are retained. Logs from non-latest builds are deleted if the agent hasn't connected within this period. Logs from the latest build are always retained. Set to 0 to disable automatic deletion.",
34293431
Flag: "workspace-agent-logs-retention",
34303432
Env: "CODER_WORKSPACE_AGENT_LOGS_RETENTION",
34313433
Value: &c.Retention.WorkspaceAgentLogs,

docs/reference/api/schemas.md

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/reference/cli/server.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

enterprise/cli/testdata/coder_server_--help.golden

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,9 @@ that data type.
720720

721721
--workspace-agent-logs-retention duration, $CODER_WORKSPACE_AGENT_LOGS_RETENTION (default: 7d)
722722
How long workspace agent logs are retained. Logs from non-latest
723-
workspace builds are deleted after this period to free up storage
724-
space. Set to 0 to disable automatic deletion of workspace agent logs.
723+
builds are deleted if the agent hasn't connected within this period.
724+
Logs from the latest build are always retained. Set to 0 to disable
725+
automatic deletion.
725726

726727
TELEMETRY OPTIONS:
727728
Telemetry is critical to our ability to improve Coder. We strip all personal

site/src/api/typesGenerated.ts

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)