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
   
![image](https://user-images.githubusercontent.com/33317356/76334809-4826bb80-62fc-11ea-82ac-898a5f7b89f9.png)
   
   ### AFTER
   
![image](https://user-images.githubusercontent.com/33317356/76334675-1150a580-62fc-11ea-9352-b6fe872aec3a.png)
   
![image](https://user-images.githubusercontent.com/33317356/76334713-22011b80-62fc-11ea-934c-6d5e0ac5c0fc.png)
   
   ### 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]

Reply via email to