-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove database on schema creation failure #837
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, any way to simulate this in a test?
I added a test |
Did you push it? 🤔 |
I noticed that if the schema creation fails (e.g. because the schema is invalid), the database file is still created and authd uses it the next time it's started. That results in authd starting up successfully but in failure of each request which uses the broken database. Let's avoid that by ensuring that the database file is removed when the schema creation fails.
5107002
to
ccfeb52
Compare
The pre-push hook failed :/ I pushed it with ccfeb52 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, feel free to merge once the nit is addressed :)
ccfeb52
to
7f8f24b
Compare
I noticed that if the schema creation fails (e.g. because the schema is invalid), the database file is still created and authd uses it the next time it's started. That results in authd starting up successfully but in failure of each request which uses the broken database.
Let's avoid that by ensuring that the database file is removed when the schema creation fails.
UDENG-6482