Skip to content

Conversation

@mafredri
Copy link
Member

@mafredri mafredri commented Dec 1, 2025

Document configurable retention policies for Audit Logs, Connection Logs,
and API keys. Add new data-retention.md page and update existing docs to
reference it.

Depends on #21021
Updates #20743


PR Stack

PR Title
#21021 feat(coderd): add retention policy configuration
#21022 feat(coderd/database/dbpurge): add retention for connection logs
#21025 feat(coderd/database/dbpurge): add retention for audit logs
#21037 feat(coderd/database/dbpurge): make API keys retention configurable
👉 #21038 docs: add data retention documentation
#21039 feat: add retention config for workspace_agent_logs

@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-5 branch from 0825d8a to f5d2df5 Compare December 1, 2025 15:50
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-5 branch from 866e986 to ccd7601 Compare December 1, 2025 15:57
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-4 branch from 0e782ee to bd8e537 Compare December 1, 2025 16:00
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-5 branch 2 times, most recently from 23641d0 to 123724d Compare December 1, 2025 16:19
@mafredri mafredri marked this pull request as ready for review December 1, 2025 16:28
@mafredri mafredri requested a review from david-fraley December 1, 2025 16:28
mafredri added a commit that referenced this pull request Dec 1, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Defaults to 7d to preserve existing behavior.

Depends on #21038
Updates #20743
mafredri added a commit that referenced this pull request Dec 1, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Falls back to global retention when not
set, and skips deletion entirely when effective retention is 0.

Depends on #21038
Updates #20743
mafredri added a commit that referenced this pull request Dec 1, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Falls back to global retention when not
set, and skips deletion entirely when effective retention is 0.

Depends on #21038
Updates #20743
mafredri added a commit that referenced this pull request Dec 1, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Falls back to global retention when not
set, and skips deletion entirely when effective retention is 0.

Depends on #21038
Updates #20743
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-4 branch from e16d01f to 008a48a Compare December 1, 2025 17:44
mafredri added a commit that referenced this pull request Dec 1, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Falls back to global retention when not
set, and skips deletion entirely when effective retention is 0.

Depends on #21038
Updates #20743
mafredri added a commit that referenced this pull request Dec 1, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Falls back to global retention when not
set, and skips deletion entirely when effective retention is 0.

Depends on #21038
Updates #20743
mafredri added a commit that referenced this pull request Dec 1, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Falls back to global retention when not
set, and skips deletion entirely when effective retention is 0.

Depends on #21038
Updates #20743
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-4 branch 2 times, most recently from 03f5ec5 to 46f07e1 Compare December 2, 2025 10:05
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-5 branch from 7e8a005 to b1ce17f Compare December 2, 2025 10:08
mafredri added a commit that referenced this pull request Dec 2, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Falls back to global retention when not
set, and skips deletion entirely when effective retention is 0.

Depends on #21038
Updates #20743
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-5 branch from b1ce17f to d058883 Compare December 2, 2025 10:17
mafredri added a commit that referenced this pull request Dec 2, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Falls back to global retention when not
set, and skips deletion entirely when effective retention is 0.

Depends on #21038
Updates #20743
Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-5 branch from d058883 to 267c7d8 Compare December 2, 2025 11:13
mafredri added a commit that referenced this pull request Dec 2, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Falls back to global retention when not
set, and skips deletion entirely when effective retention is 0.

Depends on #21038
Updates #20743
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-4 branch from 46f07e1 to 27c90dd Compare December 2, 2025 11:37
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-5 branch from 267c7d8 to 8843bb3 Compare December 2, 2025 11:37
mafredri added a commit that referenced this pull request Dec 2, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Falls back to global retention when not
set, and skips deletion entirely when effective retention is 0.

Depends on #21038
Updates #20743
@mafredri mafredri added the doc-check Assign this label to PRs to check for any doc changes. label Dec 2, 2025
@github-actions
Copy link

github-actions bot commented Dec 2, 2025

Copy link
Member Author

mafredri commented Dec 2, 2025

📚 Documentation Check

✨ No Changes Needed

All documentation has been comprehensively updated in this PR. The following changes are already included:

New Documentation:

  • docs/admin/setup/data-retention.md - Complete new guide covering retention policies for Audit Logs, Connection Logs, and API keys
  • ✅ Added to manifest.json under Admin > Setup section

Updated Documentation:

The documentation is thorough and well-structured, covering:

  • Configuration options (CLI flags, env vars, YAML)
  • How retention works (background purge process, timing, behavior)
  • Best practices and compliance considerations
  • Monitoring and maintenance procedures
  • Cross-references to related documentation

This comment was generated by an AI Agent through Coder Tasks

mafredri added a commit that referenced this pull request Dec 2, 2025
Previously AI Bridge retention was only documented in the auto-generated
CLI reference, making it difficult for administrators to discover and
understand how to configure data retention for compliance requirements.

This adds retention configuration to the AI Bridge setup guide with
examples, documents the REST API and CLI export options in the monitoring
guide, and cross-references AI Bridge from the central data retention
page for discoverability.

Updates #21038
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-4 branch from 27c90dd to 1bed429 Compare December 2, 2025 12:56
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-5 branch from 8843bb3 to b15783b Compare December 2, 2025 12:56
mafredri added a commit that referenced this pull request Dec 2, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Falls back to global retention when not
set, and skips deletion entirely when effective retention is 0.

Depends on #21038
Updates #20743
mafredri added a commit that referenced this pull request Dec 2, 2025
Add comprehensive documentation for AI Bridge data retention, addressing
the concern raised in PR #21038 that AI Bridge retention should be
documented alongside other retention settings.

Changes:
- docs/ai-coder/ai-bridge/setup.md: Add new Data Retention section with
  configuration options, duration formats, examples, and what data is
  retained
- docs/ai-coder/ai-bridge/monitoring.md: Add Data Retention section with
  quick reference and links to detailed documentation
- docs/ai-coder/ai-bridge/index.md: Add data retention link to Next steps
- docs/admin/setup/data-retention.md: Add AI Bridge to the centralized
  data retention documentation with settings table, examples, behavior
  description, and cross-references to AI Bridge docs

This improves discoverability by:
1. Documenting retention in the AI Bridge setup page (primary location)
2. Adding retention info to monitoring docs (relevant context)
3. Including AI Bridge in the central data retention page
4. Cross-linking between AI Bridge and admin retention docs

Refs #21038
mafredri added a commit that referenced this pull request Dec 2, 2025
Previously AI Bridge retention was only documented in the auto-generated
CLI reference, making it difficult for administrators to discover and
understand how to configure data retention for compliance requirements.

This adds retention configuration to the AI Bridge setup guide with
examples, documents the REST API and CLI export options in the monitoring
guide, and cross-references AI Bridge from the central data retention
page for discoverability.

Updates #21038
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-4 branch from 1bed429 to a6744f0 Compare December 2, 2025 14:51
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-5 branch from b15783b to 3caa0ab Compare December 2, 2025 14:52
mafredri added a commit that referenced this pull request Dec 2, 2025
Replace hardcoded 7-day retention for workspace agent logs with configurable
retention from deployment settings. Falls back to global retention when not
set, and skips deletion entirely when effective retention is 0.

Depends on #21038
Updates #20743
mafredri added a commit that referenced this pull request Dec 2, 2025
Previously AI Bridge retention was only documented in the auto-generated
CLI reference, making it difficult for administrators to discover and
understand how to configure data retention for compliance requirements.

This adds retention configuration to the AI Bridge setup guide with
examples, documents the REST API and CLI export options in the monitoring
guide, and cross-references AI Bridge from the central data retention
page for discoverability.

Updates #21038
Base automatically changed from mafredri/feat-coderd-db-retention-policy-4 to main December 2, 2025 15:41
Document configurable retention policies for Audit Logs, Connection Logs,
and API keys. Add new data-retention.md page and update existing docs to
reference it.

Depends on #21021
Updates #20743
Rewrite documentation to reflect that each retention setting is
independent. Set to a non-zero duration to enable, or 0 to keep
data indefinitely.
@mafredri mafredri force-pushed the mafredri/feat-coderd-db-retention-policy-5 branch from 3caa0ab to f8cefc6 Compare December 2, 2025 15:42
@mafredri mafredri enabled auto-merge (squash) December 2, 2025 15:46
@mafredri mafredri merged commit d9888ce into main Dec 2, 2025
30 checks passed
@mafredri mafredri deleted the mafredri/feat-coderd-db-retention-policy-5 branch December 2, 2025 15:47
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2025
mafredri added a commit that referenced this pull request Dec 3, 2025
Previously AI Bridge retention was only documented in the auto-generated
CLI reference, making it difficult for administrators to discover and
understand how to configure data retention for compliance requirements.

This adds retention configuration to the AI Bridge setup guide with
examples, documents the REST API and CLI export options in the monitoring
guide, and cross-references AI Bridge from the central data retention
page for discoverability.

Closes #21038
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

doc-check Assign this label to PRs to check for any doc changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants