You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/25 19:20:19 UTC

[GitHub] [superset] eschutho opened a new pull request #13344: adds analytics logging on db create and test connections

eschutho opened a new pull request #13344:
URL: https://github.com/apache/superset/pull/13344


   ### SUMMARY
   adds analytics logging on db create and test connections
   
   
   ### TEST PLAN
   unit tests added
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] eschutho closed pull request #13344: adds analytics logging on db create and test connections

Posted by GitBox <gi...@apache.org>.
eschutho closed pull request #13344:
URL: https://github.com/apache/superset/pull/13344


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] eschutho commented on a change in pull request #13344: adds analytics logging on db create and test connections

Posted by GitBox <gi...@apache.org>.
eschutho commented on a change in pull request #13344:
URL: https://github.com/apache/superset/pull/13344#discussion_r583103774



##########
File path: superset/databases/commands/test_connection.py
##########
@@ -60,20 +61,34 @@ def run(self) -> None:
                 database.db_engine_spec.mutate_db_for_connection_test(database)
                 username = self._actor.username if self._actor is not None else None
                 engine = database.get_sqla_engine(user_name=username)
-            with closing(engine.raw_connection()) as conn:
-                if not engine.dialect.do_ping(conn):
-                    raise DBAPIError(None, None, None)
+                with closing(engine.raw_connection()) as conn:

Review comment:
       I'm not sure what the intention was here, but if database is None, then this statement fails because engine is not defined, so I put it inside this block. 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org