betodealmeida commented on code in PR #33000: URL: https://github.com/apache/superset/pull/33000#discussion_r2031951413
########## superset/commands/database/sync_permissions.py: ########## @@ -192,15 +192,26 @@ def sync_database_permissions(self) -> None: if self.old_db_connection_name != self.db_connection.database_name: self._rename_database_in_permissions(catalog, schemas) - def _get_catalog_names(self) -> set[str]: + def _get_catalog_names(self) -> set[str | None]: """ Helper method to load catalogs. """ try: - return self.db_connection.get_all_catalog_names( - force=True, - ssh_tunnel=self.db_connection_ssh_tunnel, - ) + # Adding permissions to all catalogs (and all their schemas) can take a long Review Comment: Yeah, those are different. Basically with my changes `_get_catalog_names` returns all relevant catalogs in a given database. This could be all catalogs, or just the default. When a database doesn't support catalogs, then we need to use `None` as the catalog, hence the `[None]`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org