Skip to content

feanil/development settings - #37444

Draft
feanil wants to merge 3 commits into
masterfrom
feanil/development_settings
Draft

feanil/development settings#37444
feanil wants to merge 3 commits into
masterfrom
feanil/development_settings

Conversation

@feanil

@feanil feanil commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

Adds experimental development.py settings for the LMS and CMS that build directly on common.py, as a first step toward replacing the devstack.py / production.py-based local development flow with something cleaner and better documented. Uses local.openedx.io subdomains instead of localhost so cookie / CORS / CSRF behavior resembles a real deployment.

Experimental — not the default. devstack.py and production.py are unchanged, so existing developers and operators are unaffected. Setup steps: docs/how-tos/using_development_settings.rst.

Related PRs (need to merge)

Companion PRs pointing each default MFE's dev script at local.openedx.io so they work with these settings:

@feanil
feanil force-pushed the feanil/development_settings branch 2 times, most recently from 58c62d8 to 1afe2e2 Compare October 9, 2025 13:41
@feanil
feanil force-pushed the feanil/development_settings branch 2 times, most recently from 1705ed8 to d0db94c Compare October 31, 2025 18:08
@feanil
feanil force-pushed the feanil/development_settings branch from d0db94c to 94dacd3 Compare December 22, 2025 15:19
@feanil
feanil force-pushed the feanil/development_settings branch 2 times, most recently from 7ec8b88 to 473efe7 Compare April 12, 2026 21:41
@feanil
feanil force-pushed the feanil/development_settings branch 2 times, most recently from 1fe0074 to 4d4d7c1 Compare May 28, 2026 14:15
@feanil
feanil force-pushed the feanil/development_settings branch 2 times, most recently from bf615ad to 1abf23b Compare August 6, 2026 16:33
@feanil feanil closed this Aug 6, 2026
@feanil feanil reopened this Aug 6, 2026
@feanil feanil closed this Aug 7, 2026
@feanil feanil reopened this Aug 7, 2026
feanil and others added 2 commits August 7, 2026 16:09
Base it directly off of common and try to keep it as small as possible.

Regarding plugin loading:

Ideally the name of this setting would be "DEVELOPMENT" and not tied to
the devstack but since that's an interface change, we use the devstack
settings which should be what is setup for development.

Regarding the webpack loader settings:

WEBPACK_LOADER's STATS_FILE is derived from STATIC_ROOT in
openedx/envs/common.py. In the new development.py settings the base
STATIC_ROOT default is ENV_ROOT/staticfiles (LMS) and
ENV_ROOT/staticfiles/studio (CMS), which point *outside* the repo. That
is not where the webpack build writes its stats manifest: with
STATIC_ROOT_LMS / STATIC_ROOT_CMS unset, webpack.common.config.js falls
back to ./test_root/staticfiles (and .../studio for CMS). As a result
render_bundle raised "Error reading .../staticfiles/webpack-stats.json"
on every page that renders a webpack bundle.

Point STATIC_ROOT at the in-repo test_root location so the derived
STATS_FILE lands where webpack actually writes it. This makes the Python
default agree with webpack's JS default with no STATIC_ROOT_LMS /
STATIC_ROOT_CMS wiring, and mirrors what the test settings already do
(openedx/envs/test.py).

This is only about locating the stats manifest -- collectstatic is not
part of the development flow. With DEBUG=True the staticfiles finders
serve assets directly from their source dirs (e.g. the bundles in
common/static/bundles), so nothing writes into STATIC_ROOT during normal
development.
Document the new bare-metal development workflow that runs the LMS and CMS
with the dedicated `development.py` settings module (building directly on
`common.py`) and the `local.openedx.io` domains, rather than the legacy
`devstack.py` settings on `localhost`.

The how-to covers the `--settings=development` runserver commands
(local.openedx.io:8000 for LMS, studio.local.openedx.io:8001 for CMS),
migrations, the webpack asset build (and why collectstatic is not needed),
CMS SSO setup, running the MFEs against the LMS MFE Config API, and the
notable differences from devstack (eager Celery, MFE config served by the
LMS, pre-declared CORS/CSRF/login-redirect origins).

It is linked from the README as an experimental item under "For
Development"; it is intentionally not yet the recommended default while the
base README and workflow are still being updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The two settings were previously hard-coded in the lms and openedx
common.py making it hard to make reasonable defaults using the ENV_ROOT
setting.
@feanil
feanil force-pushed the feanil/development_settings branch from 1abf23b to d16729a Compare August 7, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant