Skip to content

Fix panel sweep: stale database pin and wrong cache error sentinel - #4

Merged
BenHall-1 merged 1 commit into
masterfrom
fix-errors
Aug 31, 2026
Merged

Fix panel sweep: stale database pin and wrong cache error sentinel#4
BenHall-1 merged 1 commit into
masterfrom
fix-errors

Conversation

@biast12

@biast12 biast12 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

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_mentionsmention_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 continued.

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.

Type of Change

  • Bug fix
  • New feature
  • Breaking change

Testing

Check if it works without getting the 2 errors

Checklist

  • My code follows the style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

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.
@github-actions github-actions Bot added the type:bug Bug Fixes label Aug 30, 2026
@BenHall-1
BenHall-1 merged commit 597d750 into master Aug 31, 2026
1 check passed
@BenHall-1
BenHall-1 deleted the fix-errors branch August 31, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants