Skip to content

fix(auth): alert updates stay readable when a newer release recorded an author this one doesn't know #701

Open

Description

@PiquelChips

An alert update whose author a newer release wrote can't be read by an older one, so after a rollback the alerts read fails.

crates/database/src/repositories/alerts.rs (around lines 67 and 287) decodes alert_updates.author as a strict Json<Actor>. If a newer release records an author this release doesn't know, the read fails with "stored column … is invalid" instead of showing the update. That author can be a new Actor variant, or a new JobName inside Actor::System. The Alerts page and the overview's banner would then fail.

#676 fixes the same problem for event actors (RecordedActor, in #689). The alert author column wasn't part of it.

Reproduce

Insert an alert update whose author is {"type": "something_new"}, then load the dashboard's Alerts page: the read fails.

Expected

An author this release doesn't know reads as unknown, the same way an event actor does after #689, and the page shows the update without a byline. Writes stay typed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions