willbarrett opened a new pull request #8463: Make pydruid truly optional URL: https://github.com/apache/incubator-superset/pull/8463 ### CATEGORY Choose one - [X] Bug Fix - [ ] Enhancement (new features, refinement) - [ ] Refactor - [ ] Add tests - [ ] Build / Development Environment - [ ] Documentation ### SUMMARY <!--- Describe the change below, including rationale and design decisions --> Somewhere along the line, type definitions were added to the `superset/connectors/druid/models.py` file that would cause NameErrors when the `pydruid` package was not installed. This PR wraps the appropriate function definitions in `try/except` statements to allow the system to boot without `pydruid` installed. Additionally, somewhere along the line the `DRUID_IS_ACTIVE` option was disabled, though it remains defaulted to `True` in `config.py`. I have re-enabled the configuration so that users may disable the (I believe depricated?) menu items. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> "Sources" menu with `config['DRUID_IS_ACTIVE'] = False`: <img width="1541" alt="Screen Shot 2019-10-28 at 2 56 07 PM" src="https://user-images.githubusercontent.com/1779034/67721203-37039080-f993-11e9-95e2-69b09de22b4f.png"> ### TEST PLAN <!--- What steps should be taken to verify the changes --> - [ ] Uninstall pydruid from your environment and ensure Superset still boots - [ ] Set the configuration `DRUID_IS_ACTIVE = False` and ensure the Druid-related menu items disappear ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [X] Has associated issue: Fixes #8425 - [ ] Changes UI - [ ] Requires DB Migration. - [ ] Confirm DB Migration upgrade and downgrade tested. - [ ] Introduces new feature or API - [ ] Removes existing feature or API ### REVIEWERS @EvaSDK @mistercrunch @dpgaspar
---------------------------------------------------------------- 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]
