FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feanil/development settings by feanil · Pull Request #37444 · openedx/openedx-platform · GitHub

feanil/development settings - #37444

Merged
kdmccormick merged 5 commits into
masterfrom
feanil/development_settings
Sep 18, 2026
Merged

kdmccormick merged 5 commits into
masterfrom
feanil/development_settings

Conversation

feanil commented Oct 7, 2025
edited
Loading

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 force-pushed the feanil/development_settings branch 2 times, most recently from 58c62d8 to 1afe2e2 Compare October 9, 2025 13:41
feanil force-pushed the feanil/development_settings branch 2 times, most recently from 1705ed8 to d0db94c Compare October 31, 2025 18:08
feanil force-pushed the feanil/development_settings branch from d0db94c to 94dacd3 Compare December 22, 2025 15:19
feanil force-pushed the feanil/development_settings branch 2 times, most recently from 7ec8b88 to 473efe7 Compare April 12, 2026 21:41
feanil force-pushed the feanil/development_settings branch 2 times, most recently from 1fe0074 to 4d4d7c1 Compare May 28, 2026 14:15
feanil force-pushed the feanil/development_settings branch 2 times, most recently from bf615ad to 1abf23b Compare August 6, 2026 16:33
feanil closed this Aug 6, 2026
feanil reopened this Aug 6, 2026
feanil closed this Aug 7, 2026
feanil reopened this Aug 7, 2026
feanil force-pushed the feanil/development_settings branch from 1abf23b to d16729a Compare August 7, 2026 20:13
feanil marked this pull request as ready for review August 10, 2026 13:38
feanil requested a review from kdmccormick as a code owner August 10, 2026 13:38
Comment thread cms/envs/development.py Dismissed
feanil force-pushed the feanil/development_settings branch from 0d156bf to 226fee5 Compare September 1, 2026 14:40
feanil and others added 4 commits September 8, 2026 09:25
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.
Enable meilisearch by default and document what is needed on the server
side to make it work cleanly.
feanil force-pushed the feanil/development_settings branch from 226fee5 to ec50752 Compare September 8, 2026 13:25

kdmccormick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

great work!

haven't tested yet, but here are my comments so far.

looking forward to merging this very soon.

Comment thread cms/envs/development.py Outdated
Comment thread cms/envs/development.py
# that MFE turns out to need to call Studio APIs directly.
CORS_ORIGIN_WHITELIST = (
"http://apps.local.openedx.io:2001", # authoring (Studio)
# "http://apps.local.openedx.io:1984", # communications

kdmccormick Sep 16, 2026
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

optional nit: consider just deleting all the commented-out lines to avoid drift. it's easy enough to copy these in from the LMS side if ever necessary.

Comment thread lms/envs/development.py
# Each development MFE is served under apps.local.openedx.io on its own port. Every MFE fetches its
# config from the LMS MFE Config API, so each origin must be allowed here for that cross-origin
# request to succeed.
CORS_ORIGIN_WHITELIST = (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
CORS_ORIGIN_WHITELIST = (
CORS_ORIGIN_WHITELIST = (
# frontend-base shell (all new-style apps):
"http://apps.local.openedx.io:8080",
# old-style "MFE" apps:

I suggest adding frontend-base here, as well as to LOGIN_REDIRECT_WHITELIST, CSRF_TRUSTED_ORIGINS, and the CMS versions of those lists.

Comment thread cms/envs/development.py
# the MFE origin must be trusted here or Studio rejects writes with a 403 ("Origin checking
# failed"). Scoped to the authoring MFE for the same reason as CORS_ORIGIN_WHITELIST above;
# uncomment another origin if that MFE needs to make write requests to Studio.
CSRF_TRUSTED_ORIGINS = [

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

curious, do you know why CSRF_TRUSTED_ORIGINS is needed for CMS but not LMS?

Comment thread lms/envs/development.py Outdated

kdmccormick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

just going to approve and merge, since it's easier to generate feedback by just testing this out with features I'm working on. will follow up with a PR with my suggested improvements later on :)

kdmccormick enabled auto-merge (squash) September 18, 2026 18:53
kdmccormick merged commit 83e05eb into master Sep 18, 2026
43 checks passed
kdmccormick deleted the feanil/development_settings branch September 18, 2026 19:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL