mistercrunch commented on code in PR #30174: URL: https://github.com/apache/superset/pull/30174#discussion_r1747566928
########## superset/initialization/__init__.py: ########## @@ -482,12 +482,25 @@ def init_app(self) -> None: self.configure_wtf() self.configure_middlewares() self.configure_cache() + self.set_db_default_isolation() with self.superset_app.app_context(): self.init_app_in_ctx() self.post_init() + def set_db_default_isolation(self) -> None: + # This block sets the default isolation level for mysql to READ COMMITTED if not + # specified in the config. You can set your isolation in the config by using + # SQLALCHEMY_ENGINE_OPTIONS + eng_options = self.config["SQLALCHEMY_ENGINE_OPTIONS"] or {} + isolation_level = eng_options.get("isolation_level") + if not isolation_level and self.config["SQLALCHEMY_DATABASE_URI"].startswith( + "mysql" + ): Review Comment: ok, I addressed comments, lover how pre-commit caught something around `make_url` not being safe to use so I found I can use `make_url_safe` -- 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