Skip to content
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

prepare: warn but don't fail on initialised db (bug 1956987) #57

Merged
merged 2 commits into from
Mar 30, 2025

Conversation

shtrom
Copy link
Member

@shtrom shtrom commented Mar 28, 2025

No description provided.

@shtrom shtrom requested review from zzzeid, cgsheeh and Copilot March 28, 2025 03:39
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the initialization behavior for the database, changing the flow so that an already initialized database logs a warning and returns early instead of raising an exception.

  • Updated phabricatoremails/prepare.py to log a warning and early return when the database is already initialized
  • Removed the unused DBInitializedError from phabricatoremails/db.py

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
phabricatoremails/prepare.py Changed error handling to warn and return early if the database has already been initialized.
phabricatoremails/db.py Removed the DBInitializedError exception which is no longer used.
Comments suppressed due to low confidence (1)

phabricatoremails/prepare.py:28

  • Consider adding test cases to verify that the early return behavior properly handles cases where the database is already initialized.
return

@shtrom shtrom force-pushed the bug1956987/suite-support branch from 85a416f to 1e04738 Compare March 28, 2025 03:49
@shtrom shtrom merged commit 46f0dcf into mozilla-conduit:master Mar 30, 2025
1 check passed
@shtrom shtrom deleted the bug1956987/suite-support branch March 30, 2025 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants