Add Purge Now action to Manage Servers (closes #900)#901
Merged
erikdarlingdata merged 1 commit intodevfrom Apr 28, 2026
Merged
Conversation
- New "Purge Now" button on Manage Servers window with override modes (configured / 1 / 3 / 7 / custom / all). All option uses TRUNCATE. - Right-click menu now mirrors all per-row actions (Edit, Toggle Favorite, Check Server Version, Purge Now, Remove) above existing copy/export. - config.data_retention reworked: @retention_days = NULL respects per-collector schedule, 0 TRUNCATEs every collect.* table, N > 0 overrides every cutoff to N days. Old @truncate_all parameter removed; @retention_days = 0 covers that case. Truncate path snapshots row count before wiping for reporting. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
config.data_retentionsemantics so@retention_daysdoes what users expect from the UI:NULL(default) — respect per-collector retention fromconfig.collection_schedule, 30-day fallback for unscheduled tables.0— TRUNCATE everycollect.*table.N > 0— override every table's cutoff to N days, ignoring per-collector schedule.@truncate_allparameter was removed;@retention_days = 0covers that case with cleaner semantics.SUM(partition.rows)before wiping so the result message can show "Rows wiped: 914,983" instead of "Rows wiped: 0".Test plan
EXEC config.data_retention(NULL) on sql2019 → uses schedule, deletes 0 rows when nothing is older than 30 days.EXEC config.data_retention @retention_days = 5on sql2019 → deleted 184,481 rows (override skipped the schedule pass).EXEC config.data_retention @retention_days = 0on sql2019 → 914,983 rows wiped, 52 tables truncated, 31ms; log row records both counts.collect.*, TRUNCATE is safe.Closes #900.