Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(coderd): add retention policy configuration#21021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mafredri wants to merge2 commits intomain
base:main
Choose a base branch
Loading
frommafredri/feat-coderd-db-retention-policy

Conversation

@mafredri
Copy link
Member

@mafredrimafredri commentedDec 1, 2025
edited
Loading

AddRetentionConfig with server flags for configuring data retention:

  • --global-retention: default policy for all retention settings
  • --audit-logs-retention: retention for audit log entries
  • --connection-logs-retention: retention for connection logs
  • --api-keys-retention: retention for expired API keys (default 7d)

Note: AI Bridge already has retention flags which are kept separate fromRetentionConfig, which only affects corecoderd.

Updates#20743

Add `RetentionConfig` with server flags for configuring data retention:- `--global-retention`: default policy for all retention settings- `--audit-logs-retention`: retention for audit log entries- `--connection-logs-retention`: retention for connection logs- `--api-keys-retention`: retention for expired API keys (default 7d)Updates#20743
@mafredrimafredriforce-pushed themafredri/feat-coderd-db-retention-policy branch from75a0de4 tob5e66faCompareDecember 1, 2025 13:03
@mafredrimafredri marked this pull request as ready for reviewDecember 1, 2025 13:12
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

wait a sec, is it only deployment config, or are you going to use these options soon? if the plan is to continue after some time, maybe park these changes in a side branch. Otherwise the commit message will be confusing.

@mafredri
Copy link
MemberAuthor

@mtojek#21022

mafredri added a commit that referenced this pull requestDec 1, 2025
Add `DeleteOldConnectionLogs` query and integrate it into the `dbpurge`routine. Retention is controlled by `--retention-connection-logs` flag,falling back to `--retention-global` when not set. Disabled (0) bydefault.Depends on#21021Updates#20743
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

Thanks for context 👍 👍

mafredri added a commit that referenced this pull requestDec 1, 2025
Add `DeleteOldConnectionLogs` query and integrate it into the `dbpurge`routine. Retention is controlled by `--retention-connection-logs` flag,falling back to `--retention-global` when not set. Disabled (0) bydefault.Depends on#21021Updates#20743
mafredri added a commit that referenced this pull requestDec 1, 2025
Add configurable retention policy for audit logs. The DeleteOldAuditLogsquery excludes deprecated connection events (connect, disconnect, open,close) which are handled separately by DeleteOldAuditLogConnectionEvents.Falls back to global retention if audit logs retention is unset.Disabled (0) by default.Depends on#21021Updates#20743
mafredri added a commit that referenced this pull requestDec 1, 2025
Replace hardcoded 7-day retention for expired API keys with configurableretention from deployment settings. Falls back to global retention whennot set, and skips deletion entirely when effective retention is 0.Depends on#21021Updates#20743
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@mtojekmtojekmtojek approved these changes

@dannykoppingdannykoppingAwaiting requested review from dannykopping

Assignees

@mafredrimafredri

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@mafredri@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp