From dfe77a968eefe0c766a1de918dc9502abe27973c Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Thu, 12 Sep 2019 09:54:18 -0400 Subject: [PATCH] Remove the mongo plugin for the djnago-debug-toolbar. We are currently running this plugin from a has directly off of master to get support for a newer version of DJDT. However even on master there is not yet support for python 3. We're running into this when running runserver and when collecting static assets. A quick survey of the development team at edX shows that people are no longer actively using this debug panel.(14 responders all saying no to the question "In the last year have you used the mongo portion of the django-debug-toolbar in edx-platform?") This makes sense since the module store and courseware related developement is not very active right now. Given all this, I'm removing this toolbar for now and if we need it again we can survey what's available at that time to choose the best tool. --- cms/envs/devstack.py | 7 +------ lms/envs/devstack.py | 3 +-- requirements/edx/development.in | 3 --- requirements/edx/development.txt | 1 - 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/cms/envs/devstack.py b/cms/envs/devstack.py index 6229c13721..67cde0116d 100644 --- a/cms/envs/devstack.py +++ b/cms/envs/devstack.py @@ -71,7 +71,7 @@ CELERY_ALWAYS_EAGER = True ################################ DEBUG TOOLBAR ################################ -INSTALLED_APPS += ['debug_toolbar', 'debug_toolbar_mongo'] +INSTALLED_APPS += ['debug_toolbar'] MIDDLEWARE_CLASSES.append('debug_toolbar.middleware.DebugToolbarMiddleware') INTERNAL_IPS = ('127.0.0.1',) @@ -105,11 +105,6 @@ def should_show_debug_toolbar(request): return True -# To see stacktraces for MongoDB queries, set this to True. -# Stacktraces slow down page loads drastically (for pages with lots of queries). -DEBUG_TOOLBAR_MONGO_STACKTRACES = False - - ########################### API DOCS ################################# FEATURES['ENABLE_API_DOCS'] = True diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index f27969d765..4f8a9a7c53 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -66,7 +66,7 @@ DJFS = { ################################ DEBUG TOOLBAR ################################ -INSTALLED_APPS += ['debug_toolbar', 'debug_toolbar_mongo'] +INSTALLED_APPS += ['debug_toolbar'] MIDDLEWARE_CLASSES += [ 'lms.djangoapps.discussion.django_comment_client.utils.QueryCountDebugMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware', @@ -83,7 +83,6 @@ DEBUG_TOOLBAR_PANELS = ( 'debug_toolbar.panels.sql.SQLPanel', 'debug_toolbar.panels.signals.SignalsPanel', 'debug_toolbar.panels.logging.LoggingPanel', - 'debug_toolbar_mongo.panel.MongoDebugPanel', # ProfilingPanel has been intentionally removed for default devstack.py # runtimes for performance reasons. If you wish to re-enable it in your # local development environment, please create a new settings file diff --git a/requirements/edx/development.in b/requirements/edx/development.in index 7cbf550c8d..3a199d85e2 100644 --- a/requirements/edx/development.in +++ b/requirements/edx/development.in @@ -20,6 +20,3 @@ pyinotify # More efficient checking for runserver relo sphinx==1.8.5 # Pinned because 2.0.0 release requires Python '>=3.5' but current Python is 2.7.12 vulture # Detects possible dead/unused code, used in scripts/find-dead-code.sh modernize # Used to make Python 2 code more modern with the intention of eventually porting it over to Python 3. - -# The officially released version of django-debug-toolbar-mongo doesn't support DJDT 1.x. This commit does. --e git+https://github.com/hmarr/django-debug-toolbar-mongo.git@b0686a76f1ce3532088c4aee6e76b9abe61cc808#egg=django-debug-toolbar-mongo==0.1.10 diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index ef279b1822..cebfb414fe 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -7,7 +7,6 @@ -e git+https://github.com/edx/acid-block.git@e46f9cda8a03e121a00c7e347084d142d22ebfb7#egg=acid-xblock -e common/lib/capa -e git+https://github.com/edx/codejail.git@ed3d36c27913254a23273da95ad627a1bbbffa44#egg=codejail --e git+https://github.com/hmarr/django-debug-toolbar-mongo.git@b0686a76f1ce3532088c4aee6e76b9abe61cc808#egg=django-debug-toolbar-mongo==0.1.10 -e git+https://github.com/edx/django-wiki.git@v0.0.23#egg=django-wiki -e git+https://github.com/edx/DoneXBlock.git@01a14f3bd80ae47dd08cdbbe2f88f3eb88d00fba#egg=done-xblock -e git+https://github.com/jazkarta/edx-jsme.git@690dbf75441fa91c7c4899df0b83d77f7deb5458#egg=edx-jsme