From 7a77652cd69fd92812a707d38fda952ce778b4cc Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Fri, 13 Jun 2025 14:45:03 -0400 Subject: [PATCH] fix: devstack_docker -> devstack In the context of edx-platform django settings, devstack_docker is an alias to devstack. Both are deprecated, technically, but we currently want to remove all devstack-related settings files except devstack.py (which tutor still uses). So, in order to remove devstack_docker.py, we update its references to devstack.py --- .../management/commands/update_entitlement_mode.py | 2 +- .../commands/populate_created_on_site_user_attribute.py | 2 +- docs/conf.py | 5 +---- manage.py | 8 ++++---- .../credentials/management/commands/notify_credentials.py | 4 ++-- openedx/core/djangoapps/schedules/docs/README.rst | 8 ++++---- openedx/core/djangoapps/util/checks.py | 8 +------- 7 files changed, 14 insertions(+), 23 deletions(-) diff --git a/common/djangoapps/entitlements/management/commands/update_entitlement_mode.py b/common/djangoapps/entitlements/management/commands/update_entitlement_mode.py index eeb26a26f4..3d7b988bde 100644 --- a/common/djangoapps/entitlements/management/commands/update_entitlement_mode.py +++ b/common/djangoapps/entitlements/management/commands/update_entitlement_mode.py @@ -21,7 +21,7 @@ class Command(BaseCommand): Example usage: # Change entitlement_mode for given order_number with course_uuid to new_mode: - $ ./manage.py lms --settings=devstack_docker update_entitlement_mode \ + $ ./manage.py lms --settings=devstack update_entitlement_mode \ ORDER_NUMBER_123,ORDER_NUMBER_456 1234567-0000-1111-2222-123456789012 professional """ help = dedent(__doc__).strip() diff --git a/common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py b/common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py index c980bbf171..32350d6d9e 100644 --- a/common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py +++ b/common/djangoapps/student/management/commands/populate_created_on_site_user_attribute.py @@ -19,7 +19,7 @@ class Command(BaseCommand): """ help = """This command back-populates domain of the site the user account was created on. Example: ./manage.py lms populate_created_on_site_user_attribute --users ,... - '--activation-keys ,... --site-domain --settings=devstack_docker""" + '--activation-keys ,... --site-domain --settings=devstack""" def add_arguments(self, parser): """ diff --git a/docs/conf.py b/docs/conf.py index dfee5aec0a..0e6fa560d5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -320,10 +320,7 @@ def update_settings_module(service='lms'): Set the "DJANGO_SETTINGS_MODULE" environment variable appropriately for the module sphinx-apidoc is about to be run on. """ - if os.environ.get('EDX_PLATFORM_SETTINGS') == 'devstack_docker': - settings_module = f'{service}.envs.devstack_docker' - else: - settings_module = f'{service}.envs.devstack' + settings_module = f'{service}.envs.devstack' os.environ['DJANGO_SETTINGS_MODULE'] = settings_module diff --git a/manage.py b/manage.py index 07fa6de2f6..9b8518937d 100755 --- a/manage.py +++ b/manage.py @@ -39,7 +39,7 @@ def parse_args(): lms.add_argument( '--settings', help="Which django settings module to use under lms.envs. If not provided, the DJANGO_SETTINGS_MODULE " - "environment variable will be used if it is set, otherwise it will default to lms.envs.devstack_docker") + "environment variable will be used if it is set, otherwise it will default to lms.envs.devstack") lms.add_argument( '--service-variant', choices=['lms', 'lms-xml', 'lms-preview'], @@ -48,7 +48,7 @@ def parse_args(): lms.set_defaults( help_string=lms.format_help(), settings_base='lms/envs', - default_settings='lms.envs.devstack_docker', + default_settings='lms.envs.devstack', ) cms = subparsers.add_parser( @@ -60,12 +60,12 @@ def parse_args(): cms.add_argument( '--settings', help="Which django settings module to use under cms.envs. If not provided, the DJANGO_SETTINGS_MODULE " - "environment variable will be used if it is set, otherwise it will default to cms.envs.devstack_docker") + "environment variable will be used if it is set, otherwise it will default to cms.envs.devstack") cms.add_argument('-h', '--help', action='store_true', help='show this help message and exit') cms.set_defaults( help_string=cms.format_help(), settings_base='cms/envs', - default_settings='cms.envs.devstack_docker', + default_settings='cms.envs.devstack', service_variant='cms', ) diff --git a/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py b/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py index f79ead24d9..7d28ca5197 100644 --- a/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py +++ b/openedx/core/djangoapps/credentials/management/commands/notify_credentials.py @@ -41,11 +41,11 @@ class Command(BaseCommand): Example usage: # Process all certs/grades changes for a given course: - $ ./manage.py lms --settings=devstack_docker notify_credentials \ + $ ./manage.py lms --settings=devstack notify_credentials \ --courses course-v1:edX+DemoX+Demo_Course # Process all certs/grades changes in a given time range: - $ ./manage.py lms --settings=devstack_docker notify_credentials \ + $ ./manage.py lms --settings=devstack notify_credentials \ --start-date 2018-06-01 --end-date 2018-07-31 A Dry Run will produce output that looks like: diff --git a/openedx/core/djangoapps/schedules/docs/README.rst b/openedx/core/djangoapps/schedules/docs/README.rst index 04982d8971..3004704c9c 100644 --- a/openedx/core/djangoapps/schedules/docs/README.rst +++ b/openedx/core/djangoapps/schedules/docs/README.rst @@ -130,21 +130,21 @@ can use: :: - ./manage.py lms --settings devstack_docker send_recurring_nudge example.com + ./manage.py lms --settings devstack send_recurring_nudge example.com You can override the “current date” when running a command. The app will run, using the date you specify as its "today": :: - ./manage.py lms --settings devstack_docker send_recurring_nudge example.com --date 2017-11-13 + ./manage.py lms --settings devstack send_recurring_nudge example.com --date 2017-11-13 If the app is paired with Sailthru, you can override which email addresses the app sends to. The app will send all emails to the address you specify: :: - ./manage.py lms --settings devstack_docker send_recurring_nudge example.com --override-recipient-email developer@example.com + ./manage.py lms --settings devstack send_recurring_nudge example.com --override-recipient-email developer@example.com These management commands are meant to be run daily. We schedule them to run automatically in a Jenkins job. You can use a similar automation @@ -419,7 +419,7 @@ To begin using Litmus, follow these steps: :: - ./manage.py lms --settings devstack_docker send_recurring_nudge example.com --override-recipient-email PUT-LITMUS-ADDRESS-HERE + ./manage.py lms --settings devstack send_recurring_nudge example.com --override-recipient-email PUT-LITMUS-ADDRESS-HERE Using the Litmus Browser Extenstion to test emails saved as local files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/openedx/core/djangoapps/util/checks.py b/openedx/core/djangoapps/util/checks.py index bcde2fe620..9d06dd58b9 100644 --- a/openedx/core/djangoapps/util/checks.py +++ b/openedx/core/djangoapps/util/checks.py @@ -7,13 +7,7 @@ from django.core import checks _DEVSTACK_SETTINGS_MODULES = [ "lms.envs.devstack", - "lms.envs.devstack_docker", - "lms.envs.devstack_optimized", - "lms.envs.devstack_with_worker", "cms.envs.devstack", - "cms.envs.devstack_docker", - "cms.envs.devstack_optimized", - "cms.envs.devstack_with_worker", ] @@ -26,7 +20,7 @@ def warn_if_devstack_settings(**kwargs): return [ checks.Warning( "Open edX Devstack is deprecated, so the Django settings module you are using " - f"({settings.SETTINGS_MODULE}) will be removed from openedx/edx-platform by October 2024. " + f"({settings.SETTINGS_MODULE}) will be removed from openedx/edx-platform in 2025. " "Please either migrate off of Devstack, or modify your Devstack fork to work with an externally-" "managed Django settings file. " "For details and discussion, see: https://github.com/openedx/public-engineering/issues/247.",