v0.11.4
What's New?
Partial Configurations
Partial Configurations allow parts of a subreddit configuration -- Runs, Checks, Rules, and Actions -- to be replaced with a URL or Reddit wiki resource. CM will retrieve the text response from the resource and use that as the configuration.
This enables consolidating common/shared configuration fragments between many subreddits as well as supporting usage of external URLs to store configuration.
Influx/Grafana
CM can now write time-series data to InfluxDB. It currently supports writing general statistics (events processed/seen, etc.) and api health for bots and individual subreddits as well as recording the names of checks/runs/actions triggered for each subreddit. This enables moderators, as well as data scientists, to track custom metrics in real time.
Additionally, there is a pre-built Grafana dashboard to showcase some of the data CM writes.
Report Tracking over Time
If a Subreddit is polling modqueue
CM will automatically track all new/seen Activities and store the time new reports are made at. This enables filtering reports based on a time window in itemIs
:
itemIs:
- reports: '> 3 in 30 minutes'
A few caveat for this due to the way Reddit structures report data -- Activities with more than 1 existing reports before CM is running will have their existing report times "averaged" across the lifespan of the Activity IE A 1 hour old Activity with 3 existing reports will look like it has 1 report every 20 minutes.
Full Changelog
Bug Fixes
- (cache) Use correct cache key and improve external url cache re-use
- (database) Fix processing/queued time value
- (filter) Fix logic for assigning number of reports to compare
- (modnote) Use correct activity identifier for reddit_id
- (usernote) Fix regression with note types
- (No Category) Fix unnecessary subreddit fetch call on init
Documentation
- (config) Add partial configuration documentation
- (database) Add influx/grafana documentation
- (sentiment) Add sentiment documentation
- (usernote) Document usernote types in schema and in documentation
Features
- (ban) Implement templating for ban note/reason
- (bot) Implement better in-situ subreddit add/removal
- (config) Initial implementation for partial configs #76
- (config) Implement cache control for config fragments #76
- (config) Support config fragments as array of fragments #76
- (config) More error handling and internal improvements to config fragment parsing
- (database) Initial influx db implementation #84
- (database) Add api health measurement to influxdb
- (filter) Implement specifying report reason in report comparison
- (filter) Implement filtering by upvoteRatio for authorIs
- (report) Implement report tracking #78
- (report) Implement filtering reports in itemIs by time
- (No Category) Improve api health monitoring
- (No Category) Add more Activity data to templating data #94
- (No Category) Support parsing filename from non-raw GIST url
- (No Category) Support parsing filename from non-raw GIST url in editor
Refactor
- (database) Move Event creation to earlier in activity handling function for a more accurate processing time
- (logging) Improve log retention performance
- (report) Cleanup monitoring in manager