villebro opened a new pull request #9272: fix: add connection testing params for snowflake URL: https://github.com/apache/incubator-superset/pull/9272 ### CATEGORY Choose one - [ ] Bug Fix - [x] Enhancement (new features, refinement) - [ ] Refactor - [x] Add tests - [ ] Build / Development Environment - [x] Documentation ### SUMMARY When connecting to a Snowflake database, the "Test Connection" button reports "Seems OK!", even if the user does not have proper rights to access the relevant database, schema, role or warehouse. This is problematic, because the connector introduces irregular behavior if proper authorization is missing, for instance returning duplicated schema names during calls to `inspector.get_schema_names()`. This PR introduces a method `BaseEngineSpec.mutate_database_for_connection_testing` which can be overridden by a db spec to introduce connection validation, and implements the mostly undocumented `validate_default_parameters` (disabled by default, probably due to performance reasons) that validates the connection params when pressing "Test Connection". ### BEFORE  ### AFTER   ### TEST PLAN <!--- What steps should be taken to verify the changes --> ### 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 ### REVIEWERS
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
