From a8319ca07db3250fb6ae4fa2b006e61b905b5d8c Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Tue, 27 Jan 2026 10:50:38 -0500 Subject: [PATCH] feat: Add support for mounting `openedx-platform` This is the new name for `edx-platform`. Mounting the old name will continue to work for now. The path of the repo in the image and container is still /openedx/edx-platform for now. Changing this might be a breaking change for many plugins, so it's unclear if/when we will change that path. Part of https://github.com/openedx/openedx-platform/issues/37904 --- .../20260127_104718_kdmccormick_openedx_platform.md | 1 + tutor/plugins/openedx.py | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 changelog.d/20260127_104718_kdmccormick_openedx_platform.md diff --git a/changelog.d/20260127_104718_kdmccormick_openedx_platform.md b/changelog.d/20260127_104718_kdmccormick_openedx_platform.md new file mode 100644 index 0000000000..54b2b0b234 --- /dev/null +++ b/changelog.d/20260127_104718_kdmccormick_openedx_platform.md @@ -0,0 +1 @@ +- [Feature] Add support for mounting `openedx-platform`, the which is new name of `edx-platform`. Mounting by the old name, `edx-platform`, will continue to work for now as well (by @kdmccormick). diff --git a/tutor/plugins/openedx.py b/tutor/plugins/openedx.py index bf787f2c87..276002749e 100644 --- a/tutor/plugins/openedx.py +++ b/tutor/plugins/openedx.py @@ -80,7 +80,7 @@ def _mount_edx_platform_build( Automatically add an edx-platform repo from the host to the build context whenever it is added to the `MOUNTS` setting. """ - if os.path.basename(path) == "edx-platform": + if os.path.basename(path) in ["edx-platform", "openedx-platform"]: volumes += [ ("openedx", "edx-platform"), ("openedx-dev", "edx-platform"), @@ -96,7 +96,7 @@ def _mount_edx_platform_compose( When mounting edx-platform with `tutor mounts add /path/to/edx-platform`, bind-mount the host repo in the lms/cms containers. """ - if name == "edx-platform": + if name in ["edx-platform", "openedx-platform"]: path = "/openedx/edx-platform" volumes.append(("openedx", path)) return volumes @@ -109,7 +109,10 @@ def _mount_edx_platform_compose( ("openedx", "edx-enterprise"), ("openedx", "edx-ora2"), ("openedx", "edx-search"), - ("openedx", r"openedx-.*"), + ( + "openedx", + r"openedx-(?!platform)(.*)", + ), # any openedx-* repo except openedx-platform ("openedx", "opaque-keys"), ("openedx", r"platform-plugin-.*"), ]