Incubator-superset: Test connection doesn't use DB_CONNECTION_MUTATOR

Created on 7 Jun 2019  路  3Comments  路  Source: apache/incubator-superset

Expected results

We use DB_CONNECTION_MUTATOR to modify some of the connect_args passed to the create_engine function, and I expect those modifications to be applied whenever connections are created.

Actual results

But unfortunately, the "Test Connection" button doesn't use DB_CONNECTION_MUTATOR, which mean the connections aren't set up properly and users get a pop up telling that the connection doesn't work, even though just clicking on "Save" would actually work.
See https://github.com/apache/incubator-superset/blob/master/superset/views/core.py#L1821-L1830

More context

We use DB_CONNECTION_MUTATOR to add additional user information to authenticate with the database.

Do you agree "Test Connection" should use DB_CONNECTION_MUTATOR? If yes, I can push a PR to fix it.

#bug good first issue help-wanted starter-task

Most helpful comment

Cool - I'll push a PR in the few next days.

All 3 comments

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.83. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Good catch @thoralf-gutierrez, it seems like testconn should just instantiate a Database object and call get_sqla_engine

Cool - I'll push a PR in the few next days.

Was this page helpful?
0 / 5 - 0 ratings