Repository navigation
fix(auth): alert updates stay readable when a newer release recorded an author this one doesn't know - #706
Draft
PiquelChips wants to merge 2 commits into
Draft
fix(auth): alert updates stay readable when a newer release recorded an author this one doesn't know#706PiquelChips wants to merge 2 commits into
PiquelChips wants to merge 2 commits into
Conversation
…an author this one doesn't know An alert update's author of a type this release does not know, or a known type naming a value it does not know such as a new job, reads as no author instead of failing the alerts read, and the dashboard's Alerts page shows the update without a byline. A known author that does not decode is still an error, and writes stay typed. Closes #701
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
The database docs say alerts list --json prints a null author for one this release does not know, and that the column's CHECK is widened by the release that writes another author type, a migration a rollback keeps. The dashboard test no longer asserts the overview's banner, which never reads authors. add_update_written_elsewhere refuses outside a schema from Database::isolated.
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.
After a rollback, an alert update whose author a newer release recorded broke the dashboard's Alerts page:
alert_updates.authordecoded as a strictJson<Actor>, so a new actor type, or a newjobinActor::System, failed the whole alerts read with "stored column author is invalid".The author now decodes as #689's
RecordedActor, through aTryFrom<Value>that the events read shares. An author this release doesn't know reads asAlertUpdate.author: None: the Alerts page shows that update without a byline, andauth-service alerts list --jsonprints"author": nullfor it. Writes stay typed, and an administrator or operator that doesn't decode, or a known actor of another type, is stillInvalidStoredData.The column's
CHECKallows onlyadminandcliauthors, so a release that writes another type widens it in a migration first. Migrations aren't reverted, so after a rollback the older release reads that author as unknown. The database docs' forward-compatibility section now says this, instead of naming the column as strict. The test fixture drops theCHECKthe same way, and refuses to run outside a schema fromDatabase::isolated.Stacked on #689 (
fix/676-unknown-actors), which this PR targets as its base.Closes #701
Note
Written by Claude Opus 5.5 in Claude Code and reviewed by Claude Opus 5.5 (via T3 Code)