Repository navigation
feat: Exit on database integrity failure - #3740
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant Serverpod
participant Database
Serverpod->>Database: verifyDatabaseIntegrity()
Database-->>Serverpod: true/false
alt Integrity check passes
Serverpod->>Serverpod: Continue normal startup
else Integrity check fails
Serverpod->>Serverpod: Log failure
Serverpod->>Serverpod: Throw ExitException
Serverpod-->>System: Terminate process
end
Note over Serverpod: ExitException is rethrown immediately in catch block
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes found. 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
1 similar comment
✅ Actions performedFull review triggered. |
|
@Isakdl Would value your input here, as I am not that familiar with the migrations and especially the "shut down" / error handling. Since I've seen the or maybe @christerswahn who might also be familiar with it through the shutdown tests etc. :) |
christerswahn
left a comment
There was a problem hiding this comment.
Had a couple of questions! 👍
It is thrown when it is determined the process should exit immediately, but with orderly cleanup, and with a given exit code. It is assumed the throwing code has produced appropriate output to the user via the terminal, log, or similar. |
christerswahn
left a comment
There was a problem hiding this comment.
Just had one more comment!
This PR changes the code flow to exit early when encountering a database integity failure to clean up the error messages logged to the user
Closes #3683
Pre-launch Checklist
///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.If you need help, consider asking for advice on the discussion board.
Summary by CodeRabbit