Fix panel sweep: stale database pin and wrong cache error sentinel - #4
Merged
Conversation
Fixes two Sentry errors firing every tick from `sweepPanels`. ### `column "delete_mentions" does not exist (SQLSTATE 42703)` The 2026.08 database release renamed the panels column `delete_mentions` → `mention_behaviour`. We still pinned `database@dd80c437` (2026-06-21), whose `PanelTable.GetByGuild` selects the old name — called at `daemon/panels.go:64`. Panel-limit enforcement has been completely non-functional since that update: every non-premium guild hit the error and `continue`d. ### `object not found in cache` `daemon/panels.go` imported `github.com/rxdn/gdl/cache`, but `d.cache` is a `*TicketsBot-cloud/gdl/cache.PgCache`. Both packages declare their own `ErrNotFound` sentinel, so `errors.Is` was unconditionally false and every cache miss went to Sentry instead of being skipped.
BenHall-1
approved these changes
Aug 31, 2026
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.
Description
Fixes two Sentry errors firing every tick from
sweepPanels.column "delete_mentions" does not exist (SQLSTATE 42703)
The 2026.08 database release renamed the panels column
delete_mentions→mention_behaviour. We still pinneddatabase@dd80c437(2026-06-21), whosePanelTable.GetByGuildselects the old name — called atdaemon/panels.go:64.Panel-limit enforcement has been completely non-functional since that update: every non-premium guild hit the error and
continued.object not found in cache
daemon/panels.goimportedgithub.com/rxdn/gdl/cache, butd.cacheis a*TicketsBot-cloud/gdl/cache.PgCache. Both packages declare their ownErrNotFoundsentinel, soerrors.Iswas unconditionally false and every cache miss went to Sentry instead of being skipped.Type of Change
Testing
Check if it works without getting the 2 errors
Checklist