This is an automated email from the ASF dual-hosted git repository.

dpgaspar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 358bbe0  fix: Catch db_engine_spec.get_function_names exceptions 
(#9691)
358bbe0 is described below

commit 358bbe0c88f7ab5d130be153151c5c1f9eed8639
Author: Bogdan <[email protected]>
AuthorDate: Fri May 8 11:51:00 2020 -0700

    fix: Catch db_engine_spec.get_function_names exceptions (#9691)
    
    Co-authored-by: bogdan kyryliuk <[email protected]>
---
 superset/models/core.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/superset/models/core.py b/superset/models/core.py
index 1060986..94383c8 100755
--- a/superset/models/core.py
+++ b/superset/models/core.py
@@ -165,7 +165,13 @@ class Database(
 
     @property
     def function_names(self) -> List[str]:
-        return self.db_engine_spec.get_function_names(self)
+        try:
+            return self.db_engine_spec.get_function_names(self)
+        except Exception as ex:  # pylint: disable=broad-except
+            # function_names property is used in bulk APIs and should not hard 
crash
+            # more info in: 
https://github.com/apache/incubator-superset/issues/9678
+            logger.error(f"Failed to fetch database function names with error: 
{ex}")
+        return []
 
     @property
     def allows_cost_estimate(self) -> bool:

Reply via email to