ktmud commented on issue #21789:
URL: https://github.com/apache/superset/issues/21789#issuecomment-1312785716

   Have we considered other alternatives without using ContextManager? For 
example, using [the `do_connect` 
event](https://docs.sqlalchemy.org/en/20/core/events.html#sqlalchemy.events.DialectEvents.do_connect)
 to apply SSH-tunneling before connection---I'd imagine you can [create a 
new](https://docs.sqlalchemy.org/en/20/core/engines.html#fully-replacing-the-dbapi-connect-function)
 Connection superclass that is SSH aware.
   
   Current ContextManager implementation would still create a new SSH 
connection whenever a new db connection is created. The downstream code for 
DbEngineSpec will look much cleaner if you can hide that complexity within the 
DbEngineSpec itself.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to