-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
fix: make catalog migration lenient #29549
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.
lgtm
@gooroodev please review |
Please double-check what I found in the pull request:
Summary of Proposed Changes
Identified Issues
Issue 1: Broad exception handling in
|
The broad except is needed because it could happen with any of the 50+ drivers we support. |
SUMMARY
The function
upgrade_catalog_perms
is used to add catalog-related permissions when support for catalogs is introduced in a DB engine spec:The migration needs to query the analytical databases in order to read the schemas, so that new permissions can be added. It might be possible that during the migration the analytical database is offline, resulting in an exception.
This PR wraps the call to
database.get_all_schema_names
in a try/except block, to prevent the migration from failing. If a given database is offline during the migration, the script will read the existing known schemas fromschema_access
, so that the migration can succeed.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
TESTING INSTRUCTIONS
N/A
ADDITIONAL INFORMATION