Skip to content

Add auto-delete reports after configurable inactivity period#61

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/add-auto-delete-reports-option
Draft

Add auto-delete reports after configurable inactivity period#61
Copilot wants to merge 3 commits intomasterfrom
copilot/add-auto-delete-reports-option

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 19, 2026

Adds an opt-in feature to automatically purge reports that haven't been updated in a configurable number of days, based on the last_updated field.

Changes

  • Config.java — New AutoDelete class nested inside ReportsConfig with two fields:

    • enabled (default: false)
    • inactivity-days (default: 30)
  • ReportManager.java — New deleteInactiveReports(int inactivityDays) method using ORMLite's DeleteBuilder to bulk-delete reports where last_updated < now - N days.

  • SnowReports.java — Async repeating task registered in onEnable() (5 min initial delay, 1 hr period) that calls deleteInactiveReports() and logs how many were removed.

Config example

reports:
  auto-delete:
    enabled: true
    inactivity-days: 30  # delete reports with no status change in 30+ days

Existing config.yml files will be auto-updated with the new section on next server start via ConfigLib's update mechanism.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • repo.papermc.io
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx2G -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)
    • Triggering command: /usr/lib/jvm/temurin-21-jdk-amd64/bin/java /usr/lib/jvm/temurin-21-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED -Xmx2G -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Option to auto delete reports after x time of inactivity</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits March 19, 2026 08:43
Co-authored-by: SnowzNZ <98007575+SnowzNZ@users.noreply.github.com>
Co-authored-by: SnowzNZ <98007575+SnowzNZ@users.noreply.github.com>
Copilot AI changed the title [WIP] Add option to auto delete reports after inactivity Add auto-delete reports after configurable inactivity period Mar 19, 2026
Copilot AI requested a review from SnowzNZ March 19, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to auto delete reports after x time of inactivity

2 participants