diff --git a/Makefile b/Makefile index 51b5ba631a..415facf6b7 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ ci-test-bundle: ## Run basic tests on bundle yes "" | ./dist/tutor config save --interactive ./dist/tutor config save ./dist/tutor plugins list - ./dist/tutor plugins enable android discovery forum license mfe minio notes webui xqueue + ./dist/tutor plugins enable android discovery forum license mfe minio notes xqueue ./dist/tutor plugins list ./dist/tutor license --help diff --git a/README.rst b/README.rst index 567815c7bd..9dc7de49b7 100644 --- a/README.rst +++ b/README.rst @@ -44,7 +44,7 @@ Features * 100% `open source `__ * Runs entirely on Docker * World-famous 1-click `installation and upgrades `__ -* Comes with batteries included: `theming `__, `SCORM `__, `HTTPS `__, `web-based administration interface `__, `mobile app `__, `custom translations `__... +* Comes with batteries included: `theming `__, `SCORM `__, `HTTPS `__, `mobile app `__, `custom translations `__... * Extensible architecture with `plugins `__ * Works with `Kubernetes `__ * No technical skill required with the `zero-click Tutor AWS image `__ diff --git a/changelog.d/20250521_185646_danyal.faheem_remove_preview.md b/changelog.d/20250521_185646_danyal.faheem_remove_preview.md new file mode 100644 index 0000000000..786ba5b1fc --- /dev/null +++ b/changelog.d/20250521_185646_danyal.faheem_remove_preview.md @@ -0,0 +1 @@ +- 💥[Deprecation] Remove preview page configuration as the page has been migrated to the learning MFE. (by @Danyal-Faheem) \ No newline at end of file diff --git a/changelog.d/20250805_140709_abdul.muqadim_remove_webui_from_tutor_nightly.md b/changelog.d/20250805_140709_abdul.muqadim_remove_webui_from_tutor_nightly.md new file mode 100644 index 0000000000..5cf6c33ed6 --- /dev/null +++ b/changelog.d/20250805_140709_abdul.muqadim_remove_webui_from_tutor_nightly.md @@ -0,0 +1 @@ +💥[Deprecation] Remove deprecated WebUI plugin in favor of Tutor Deck. (by @Abdul-Muqadim-Arbisoft) diff --git a/changelog.d/20251029_144855_ahmed.khalid_ulmo.md b/changelog.d/20251029_144855_ahmed.khalid_ulmo.md new file mode 100644 index 0000000000..6937580258 --- /dev/null +++ b/changelog.d/20251029_144855_ahmed.khalid_ulmo.md @@ -0,0 +1 @@ +💥[Feature] Upgrade to Ulmo. (by @ahmed-arb) diff --git a/changelog.d/20251103_123634_maria.grimaldi_authz_load_policy.md b/changelog.d/20251103_123634_maria.grimaldi_authz_load_policy.md new file mode 100644 index 0000000000..b481dacea1 --- /dev/null +++ b/changelog.d/20251103_123634_maria.grimaldi_authz_load_policy.md @@ -0,0 +1 @@ +- [Feature] Add authorization policy loading functionality to LMS/CMS services. (by @mariajgrimaldi) diff --git a/changelog.d/20251105_123807_jhony.avella_kustomize_patches_migration.md b/changelog.d/20251105_123807_jhony.avella_kustomize_patches_migration.md new file mode 100644 index 0000000000..9f64fd9fe1 --- /dev/null +++ b/changelog.d/20251105_123807_jhony.avella_kustomize_patches_migration.md @@ -0,0 +1,3 @@ +- 💥[Improvement] Replacing "patchesStrategicMerge" key with "patches" key in the main Kustomization file (by @jfavellar90). [patchesStrategicMerge](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patchesstrategicmerge/) was deprecated in the release v5.0.0 of the Kustomization API. It is replaced by the [patches](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/) key which is more powerful and allows defining different patch types. This has the following consequences: + - The patch "kustomization-patches-strategic-merge" was renamed to "kustomization-patches" + - Extra Kustomization patches added via the "kustomization-patches" Tutor patch must respect the format specified [here](https://kubectl.docs.kubernetes.io/references/kustomize/kustomization/patches/). It implies moving old "patchesStrategicMerge" extra patches to the "patches" format. diff --git a/changelog.d/20251110_164518_mlabeeb03_add_livedeps_main.md b/changelog.d/20251110_164518_mlabeeb03_add_livedeps_main.md new file mode 100644 index 0000000000..a9e30c9603 --- /dev/null +++ b/changelog.d/20251110_164518_mlabeeb03_add_livedeps_main.md @@ -0,0 +1 @@ +- [Feature] Add tutor livedeps to the list of plugins available by default. (by @mlabeeb03) \ No newline at end of file diff --git a/docs/configuration.rst b/docs/configuration.rst index 0d4d9ac296..4fd6db5041 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -132,7 +132,7 @@ Open edX customisation This defines the git repository from which you install Open edX platform code. If you run an Open edX fork with custom patches, set this to your own git repository. You may also override this configuration parameter at build time, by providing a ``--build-arg`` option. -- ``OPENEDX_COMMON_VERSION`` (default: ``"release/teak.2"``, or ``master`` in :ref:`Tutor Main
`) +- ``OPENEDX_COMMON_VERSION`` (default: ``"release/ulmo"``, or ``master`` in :ref:`Tutor Main
`) This defines the default version that will be pulled from all Open edX git repositories. @@ -292,7 +292,6 @@ When ``ENABLE_HTTPS`` is ``true``, the whole Open edX platform will be reconfigu The following DNS records must exist and point to your server:: LMS_HOST (e.g: myopenedx.com) - PREVIEW_LMS_HOST (e.g: preview.myopenedx.com) CMS_HOST (e.g: studio.myopenedx.com) Thus, **this feature will (probably) not work in development** because the DNS records will (probably) not point to your development machine. @@ -384,9 +383,9 @@ Note that your edx-platform version must be a fork of the latest release **tag** If you don't create your fork from this tag, you *will* have important compatibility issues with other services. In particular: -- Do not try to run a fork from an older (pre-Teak) version of edx-platform: this will simply not work. +- Do not try to run a fork from an older (pre-Ulmo) version of edx-platform: this will simply not work. - Do not try to run a fork from the edx-platform master branch: there is a 99% probability that it will fail. -- Do not try to run a fork from the release/teak branch: Tutor will attempt to apply security and bug fix patches that might already be included in the release/teak but which were not yet applied to the latest release tag. Patch application will thus fail if you base your fork from the release/teak branch. +- Do not try to run a fork from the release/ulmo branch: Tutor will attempt to apply security and bug fix patches that might already be included in the release/ulmo but which were not yet applied to the latest release tag. Patch application will thus fail if you base your fork from the release/ulmo branch. .. _i18n: diff --git a/docs/dev.rst b/docs/dev.rst index f75dfd31fc..e1b6f53917 100644 --- a/docs/dev.rst +++ b/docs/dev.rst @@ -113,7 +113,7 @@ The ``openedx-dev`` Docker image is based on the same ``openedx`` image used by - The user that runs inside the container has the same UID as the user on the host, to avoid permission problems inside mounted volumes (and in particular in the edx-platform repository). - Additional Python and system requirements are installed for convenient debugging: `ipython `__, `ipdb `__, vim, telnet. -- The edx-platform `development requirements `__ are installed. +- The edx-platform `development requirements `__ are installed. If you are using a custom ``openedx`` image, then you will need to rebuild ``openedx-dev`` every time you modify ``openedx``. To so, run:: diff --git a/docs/install.rst b/docs/install.rst index 8ecf4bb56f..d1c44fb033 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -137,11 +137,11 @@ Major Open edX releases are published twice a year, in June and December, by the 4. Test the new release in a sandboxed environment. 5. If you are running edx-platform, or some other repository from a custom branch, then you should rebase (and test) your changes on top of the latest release tag (see :ref:`edx_platform_fork`). -The process for upgrading from one major release to the next works similarly to any other upgrade, with the ``launch`` command (see above). The single difference is that if the ``launch`` command detects that your tutor environment was generated with an older release, it will perform a few release-specific upgrade steps. These extra upgrade steps will be performed just once. But they will be ignored if you updated your local environment (for instance: with ``tutor config save``) before running ``launch``. This situation typically occurs if you need to re-build some Docker images (see above). In such a case, you should make use of the ``upgrade`` command. For instance, to upgrade a local installation from Sumac to Teak and rebuild some Docker images, run:: +The process for upgrading from one major release to the next works similarly to any other upgrade, with the ``launch`` command (see above). The single difference is that if the ``launch`` command detects that your tutor environment was generated with an older release, it will perform a few release-specific upgrade steps. These extra upgrade steps will be performed just once. But they will be ignored if you updated your local environment (for instance: with ``tutor config save``) before running ``launch``. This situation typically occurs if you need to re-build some Docker images (see above). In such a case, you should make use of the ``upgrade`` command. For instance, to upgrade a local installation from Teak to Ulmo and rebuild some Docker images, run:: tutor config save tutor images build all # list the images that should be rebuilt here - tutor local upgrade --from=sumac + tutor local upgrade --from=teak tutor local launch @@ -173,6 +173,8 @@ Instructions for installing the appropriate Tutor version for older Open edX rel +-------------------+---------------+--------------------------------------------+ | Teak | v20 | pip install 'tutor[full]>=20.0.0,<21.0.0' | +-------------------+---------------+--------------------------------------------+ +| Ulmo | v21 | pip install 'tutor[full]>=21.0.0,<22.0.0' | ++-------------------+---------------+--------------------------------------------+ .. _autocomplete: diff --git a/docs/reference/indexes.rst b/docs/reference/indexes.rst index a3b9f39475..281100a2e4 100644 --- a/docs/reference/indexes.rst +++ b/docs/reference/indexes.rst @@ -7,10 +7,10 @@ Plugin indexes are a great way to have your plugins discovered by other users. P Index file paths ================ -A plugin index is a yaml-formatted file. It can be stored on the web or on your computer. In both cases, the index file location must end with "/plugins.yml". For instance, the following are valid index locations if you run the Open edX "Teak" release: +A plugin index is a yaml-formatted file. It can be stored on the web or on your computer. In both cases, the index file location must end with "/plugins.yml". For instance, the following are valid index locations if you run the Open edX "Ulmo" release: -- https://overhang.io/tutor/main/teak/plugins.yml -- ``/path/to/your/local/index/teak/plugins.yml`` +- https://overhang.io/tutor/main/ulmo/plugins.yml +- ``/path/to/your/local/index/ulmo/plugins.yml`` To add either indexes, run the ``tutor plugins index add`` command without the suffix. For instance:: @@ -106,9 +106,9 @@ Manage plugins in development Plugin developers and maintainers often want to install local versions of their plugins. They usually achieve this with ``pip install -e /path/to/tutor-plugin``. We can improve that workflow by creating an index for local plugins:: # Create the plugin index directory - mkdir -p ~/localindex/teak/ + mkdir -p ~/localindex/ulmo/ # Edit the index - vim ~/localindex/teak/plugins.yml + vim ~/localindex/ulmo/plugins.yml Add the following to the index:: diff --git a/docs/reference/patches.rst b/docs/reference/patches.rst index ab07c550e2..6c77aa62b7 100644 --- a/docs/reference/patches.rst +++ b/docs/reference/patches.rst @@ -145,14 +145,14 @@ File: ``kustomization.yml`` File: ``kustomization.yml`` -.. patch:: kustomization-patches-strategic-merge +.. patch:: kustomization-patches -``kustomization-patches-strategic-merge`` +``kustomization-patches`` ========================================= File: ``kustomization.yml`` -This can be used to add more Kustomization patches that make use of the `strategic merge mechanism `__. +This can be used to add more Kustomization patches. See more details `here `__. .. patch:: kustomization-resources diff --git a/docs/tutor.rst b/docs/tutor.rst index d897f079af..2f833b59b3 100644 --- a/docs/tutor.rst +++ b/docs/tutor.rst @@ -121,7 +121,7 @@ Contributions to Tutor and its plugins are highly encouraged. Please adhere to t - Target ``release`` if your change is compatible with the latest official Open edX release and it carries no major backwards-incompatibility nor risk of regression. This ensures that the latest stable release of Tutor benefits from bug fixes and incremental improvements. Once merged, your change will automatically be forward-ported to ``main``. - Target ``main`` if your change is only compatible with Open edX's master branches and/or your change would be disruptive to production Tutor site operators. If merged, your change will become part of the next pending release branch (described below) and then incorporated into ``release`` at the time of the next named Open edX release. - - At the beginning of each Open edX named release testing period, we split off from ``main`` a special pending release branch (e.g., ``sumac`` or ``teak``). If your Tutor change is necessary for that pending release, merge it to said branch. At the end of the testing period, the pending branch will be merged into ``release`` and deleted. As with any set of changes merged to ``release``, they will then be forward-ported to ``main``. + - At the beginning of each Open edX named release testing period, we split off from ``main`` a special pending release branch (e.g., ``teak`` or ``sumac``). If your Tutor change is necessary for that pending release, merge it to said branch. At the end of the testing period, the pending branch will be merged into ``release`` and deleted. As with any set of changes merged to ``release``, they will then be forward-ported to ``main``. - **Running Tests and Code Formatting**: diff --git a/docs/tutorials/edx-platform.rst b/docs/tutorials/edx-platform.rst index 6ffa8448ef..c0f67c5cd1 100644 --- a/docs/tutorials/edx-platform.rst +++ b/docs/tutorials/edx-platform.rst @@ -69,7 +69,7 @@ Quite often, developers don't want to work on edx-platform directly, but on a de cd /my/workspace/edx-ora2 git clone https://github.com/openedx/edx-ora2 . -Then, check out the right version of the package. This is the version that is indicated in the `edx-platform/requirements/edx/base.txt `__. Be careful that the version that is currently in use in your version of edx-platform is **not necessarily the head of the master branch**:: +Then, check out the right version of the package. This is the version that is indicated in the `edx-platform/requirements/edx/base.txt `__. Be careful that the version that is currently in use in your version of edx-platform is **not necessarily the head of the master branch**:: git checkout diff --git a/docs/tutorials/proxy.rst b/docs/tutorials/proxy.rst index 94e961f0f7..a4581299b5 100644 --- a/docs/tutorials/proxy.rst +++ b/docs/tutorials/proxy.rst @@ -20,7 +20,7 @@ With these changes, Tutor will no longer listen to ports 80 and 443 on the host. It is then your responsibility to configure the web proxy on the host. There are too many use cases and proxy vendors, so Tutor does not provide configuration files that will work for everyone. You should configure your web proxy to: -- Capture traffic for the following hostnames: LMS_HOST, PREVIEW_LMS_HOST, CMS_HOST, as well as any additional host exposed by your plugins (MFE_HOST, CREDENTIALS_HOST, etc.). See each plugin documentation for more information. +- Capture traffic for the following hostnames: LMS_HOST, CMS_HOST, as well as any additional host exposed by your plugins (MFE_HOST, CREDENTIALS_HOST, etc.). See each plugin documentation for more information. - If SSL/TLS is enabled: - Perform SSL/TLS termination using your own certificates. - Forward http traffic to https. diff --git a/requirements/plugins.txt b/requirements/plugins.txt index f7dd5a24a1..9a5e86a293 100644 --- a/requirements/plugins.txt +++ b/requirements/plugins.txt @@ -1,14 +1,14 @@ -# change version ranges when upgrading from teak -tutor-android>=20.0.0,<21.0.0 -tutor-cairn>=20.0.0,<21.0.0 -tutor-credentials>=20.0.0,<21.0.0 -tutor-discovery>=20.0.0,<21.0.0 -tutor-deck>=20.0.0,<21.0.0 -tutor-forum>=20.0.0,<21.0.0 -tutor-indigo>=20.0.0,<21.0.0 -tutor-jupyter>=20.0.0,<21.0.0 -tutor-mfe>=20.0.0,<21.0.0 -tutor-minio>=20.0.0,<21.0.0 -tutor-notes>=20.0.0,<21.0.0 -tutor-webui>=20.0.0,<21.0.0 -tutor-xqueue>=20.0.0,<21.0.0 \ No newline at end of file +# For Tutor Main, we install plugins from their main branches instead of from PyPI +tutor-android@git+https://github.com/overhangio/tutor-android@main +tutor-cairn@git+https://github.com/overhangio/tutor-cairn@main +tutor-credentials@git+https://github.com/overhangio/tutor-credentials@main +tutor-deck@git+https://github.com/overhangio/tutor-deck@main +tutor-discovery@git+https://github.com/overhangio/tutor-discovery@main +tutor-forum@git+https://github.com/overhangio/tutor-forum@main +tutor-indigo@git+https://github.com/overhangio/tutor-indigo@main +tutor-jupyter@git+https://github.com/overhangio/tutor-jupyter@main +tutor-livedeps@git+https://github.com/overhangio/tutor-livedeps@main +tutor-mfe@git+https://github.com/overhangio/tutor-mfe@main +tutor-minio@git+https://github.com/overhangio/tutor-minio@main +tutor-notes@git+https://github.com/overhangio/tutor-notes@main +tutor-xqueue@git+https://github.com/overhangio/tutor-xqueue@main diff --git a/tests/test_env.py b/tests/test_env.py index ac0ab8534b..cd322bb61e 100644 --- a/tests/test_env.py +++ b/tests/test_env.py @@ -260,7 +260,7 @@ def test_current_version_in_latest_env(self) -> None: ) as f: f.write(__version__) self.assertEqual(__version__, env.current_version(root)) - self.assertEqual("teak", env.get_env_release(root)) + self.assertEqual("ulmo", env.get_env_release(root)) self.assertIsNone(env.should_upgrade_from_release(root)) self.assertTrue(env.is_up_to_date(root)) diff --git a/tutor/__about__.py b/tutor/__about__.py index 0f53bbffc0..aa0aa8ee4d 100644 --- a/tutor/__about__.py +++ b/tutor/__about__.py @@ -2,7 +2,7 @@ # Increment this version number to trigger a new release. See # docs/tutor.html#versioning for information on the versioning scheme. -__version__ = "20.0.2" +__version__ = "21.0.0" # The version suffix will be appended to the actual version, separated by a # dash. Use this suffix to differentiate between the actual released version and diff --git a/tutor/commands/jobs_utils.py b/tutor/commands/jobs_utils.py index efbd0b2b68..c385912ddc 100644 --- a/tutor/commands/jobs_utils.py +++ b/tutor/commands/jobs_utils.py @@ -177,8 +177,6 @@ def assign_theme(name, domain): "{{ LMS_HOST }}:8000", "{{ CMS_HOST }}", "{{ CMS_HOST }}:8001", - "{{ PREVIEW_LMS_HOST }}", - "{{ PREVIEW_LMS_HOST }}:8000", ] for domain_name in domain_names: python_command += f"assign_theme('{theme_name}', '{domain_name}')\n" diff --git a/tutor/commands/upgrade/__init__.py b/tutor/commands/upgrade/__init__.py index 9c7abd0735..56abf03548 100644 --- a/tutor/commands/upgrade/__init__.py +++ b/tutor/commands/upgrade/__init__.py @@ -1,4 +1,4 @@ -# Note: don't forget to change this when we upgrade from teak +# Note: don't forget to change this when we upgrade from ulmo OPENEDX_RELEASE_NAMES = [ "ironwood", "juniper", @@ -12,4 +12,5 @@ "redwood", "sumac", "teak", + "ulmo", ] diff --git a/tutor/commands/upgrade/compose.py b/tutor/commands/upgrade/compose.py index d09bf008ed..b2fc1d9683 100644 --- a/tutor/commands/upgrade/compose.py +++ b/tutor/commands/upgrade/compose.py @@ -57,6 +57,9 @@ def upgrade_from(context: click.Context, from_release: str) -> None: if running_release == "sumac": running_release = "teak" + if running_release == "teak": + running_release = "ulmo" + def upgrade_from_ironwood(context: click.Context, config: Config) -> None: click.echo(fmt.title("Upgrading from Ironwood")) diff --git a/tutor/commands/upgrade/k8s.py b/tutor/commands/upgrade/k8s.py index 96d44c910b..01111cd8ce 100644 --- a/tutor/commands/upgrade/k8s.py +++ b/tutor/commands/upgrade/k8s.py @@ -56,6 +56,9 @@ def upgrade_from(context: click.Context, from_release: str) -> None: if running_release == "sumac": running_release = "teak" + if running_release == "teak": + running_release = "ulmo" + def upgrade_from_ironwood(config: Config) -> None: upgrade_mongodb(config, "3.4.24", "3.4") diff --git a/tutor/config.py b/tutor/config.py index 03a7f85f97..af88ad719b 100644 --- a/tutor/config.py +++ b/tutor/config.py @@ -342,19 +342,3 @@ def _update_enabled_plugins_on_unload(_plugin: str, _root: str, config: Config) Note that this action must be performed after the plugin has been unloaded, hence the low priority. """ save_enabled_plugins(config) - - -@hooks.Actions.CONFIG_LOADED.add() -def _check_preview_lms_host(config: Config) -> None: - """ - This will check if the PREVIEW_LMS_HOST is a subdomain of LMS_HOST. - if not, prints a warning to notify the user. - """ - - lms_host = get_typed(config, "LMS_HOST", str, "") - preview_lms_host = get_typed(config, "PREVIEW_LMS_HOST", str, "") - if not preview_lms_host.endswith("." + lms_host): - fmt.echo_alert( - f'Warning: PREVIEW_LMS_HOST="{preview_lms_host}" is not a subdomain of LMS_HOST="{lms_host}". ' - "This configuration is not typically recommended and may lead to unexpected behavior." - ) diff --git a/tutor/env.py b/tutor/env.py index 746b5bd7ed..ecd0f5b83d 100644 --- a/tutor/env.py +++ b/tutor/env.py @@ -477,6 +477,7 @@ def get_release(version: str) -> str: "18": "redwood", "19": "sumac", "20": "teak", + "21": "ulmo", }[version.split(".", maxsplit=1)[0]] diff --git a/tutor/plugins/v0.py b/tutor/plugins/v0.py index 44a60adfee..e26066502b 100644 --- a/tutor/plugins/v0.py +++ b/tutor/plugins/v0.py @@ -290,7 +290,6 @@ class OfficialPlugin(BasePlugin): "mfe", "minio", "notes", - "webui", "xqueue", ] diff --git a/tutor/templates/apps/caddy/Caddyfile b/tutor/templates/apps/caddy/Caddyfile index 77eb152ec4..ad94a97f48 100644 --- a/tutor/templates/apps/caddy/Caddyfile +++ b/tutor/templates/apps/caddy/Caddyfile @@ -41,7 +41,7 @@ {{ patch("caddyfile-proxy")|indent(4) }} } -{{ LMS_HOST }}{$default_site_port}, {{ PREVIEW_LMS_HOST }}{$default_site_port} { +{{ LMS_HOST }}{$default_site_port} { @favicon_matcher { path_regexp ^/favicon.ico$ } diff --git a/tutor/templates/apps/openedx/config/cms.env.yml b/tutor/templates/apps/openedx/config/cms.env.yml index 8eb7b462d8..17ba857d54 100644 --- a/tutor/templates/apps/openedx/config/cms.env.yml +++ b/tutor/templates/apps/openedx/config/cms.env.yml @@ -8,7 +8,6 @@ FEATURES: {{ patch("common-env-features")|indent(2) }} {{ patch("cms-env-features")|indent(2) }} CERTIFICATES_HTML_VIEW: true - PREVIEW_LMS_BASE: "{{ PREVIEW_LMS_HOST }}" ENABLE_CSMH_EXTENDED: false ENABLE_LEARNER_RECORDS: false ENABLE_LIBRARY_INDEX: true diff --git a/tutor/templates/apps/openedx/config/lms.env.yml b/tutor/templates/apps/openedx/config/lms.env.yml index bc9927f23c..44fe04d7b9 100644 --- a/tutor/templates/apps/openedx/config/lms.env.yml +++ b/tutor/templates/apps/openedx/config/lms.env.yml @@ -8,7 +8,6 @@ FEATURES: {{ patch("common-env-features")|indent(2) }} {{ patch("lms-env-features")|indent(2) }} CERTIFICATES_HTML_VIEW: true - PREVIEW_LMS_BASE: "{{ PREVIEW_LMS_HOST }}" ENABLE_CSMH_EXTENDED: false ENABLE_COMBINED_LOGIN_REGISTRATION: true ENABLE_GRADE_DOWNLOADS: true diff --git a/tutor/templates/apps/openedx/settings/cms/development.py b/tutor/templates/apps/openedx/settings/cms/development.py index ee4c3b3b5b..ef413a9a21 100644 --- a/tutor/templates/apps/openedx/settings/cms/development.py +++ b/tutor/templates/apps/openedx/settings/cms/development.py @@ -16,8 +16,6 @@ SOCIAL_AUTH_EDX_OAUTH2_KEY = "{{ CMS_OAUTH2_KEY_SSO_DEV }}" SOCIAL_AUTH_EDX_OAUTH2_PUBLIC_URL_ROOT = LMS_ROOT_URL -FEATURES["PREVIEW_LMS_BASE"] = "{{ PREVIEW_LMS_HOST }}:8000" - # Setup correct webpack configuration file for development WEBPACK_CONFIG_PATH = "webpack.dev.config.js" diff --git a/tutor/templates/apps/openedx/settings/lms/production.py b/tutor/templates/apps/openedx/settings/lms/production.py index 6c2793b3bc..c9e62fe094 100644 --- a/tutor/templates/apps/openedx/settings/lms/production.py +++ b/tutor/templates/apps/openedx/settings/lms/production.py @@ -6,7 +6,6 @@ ALLOWED_HOSTS = [ ENV_TOKENS.get("LMS_BASE"), - FEATURES["PREVIEW_LMS_BASE"], "lms", ] CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}") diff --git a/tutor/templates/apps/openedx/settings/partials/common_all.py b/tutor/templates/apps/openedx/settings/partials/common_all.py index 495861c1ab..4d2a69d112 100644 --- a/tutor/templates/apps/openedx/settings/partials/common_all.py +++ b/tutor/templates/apps/openedx/settings/partials/common_all.py @@ -153,13 +153,16 @@ import warnings # REMOVE-AFTER-V20: check if we can remove these lines after upgrade. -from django.utils.deprecation import RemovedInDjango50Warning, RemovedInDjango51Warning -# RemovedInDjango5xWarning: 'xxx' is deprecated. Use 'yyy' in 'zzz' instead. -warnings.filterwarnings("ignore", category=RemovedInDjango50Warning) -warnings.filterwarnings("ignore", category=RemovedInDjango51Warning) -# DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 -warnings.filterwarnings("ignore", category=DeprecationWarning, module="pgpy.constants") - +try: + from django.utils.deprecation import RemovedInDjango50Warning, RemovedInDjango51Warning + # RemovedInDjango5xWarning: 'xxx' is deprecated. Use 'yyy' in 'zzz' instead. + warnings.filterwarnings("ignore", category=RemovedInDjango50Warning) + warnings.filterwarnings("ignore", category=RemovedInDjango51Warning) + # DeprecationWarning: 'imghdr' is deprecated and slated for removal in Python 3.13 + warnings.filterwarnings("ignore", category=DeprecationWarning, module="pgpy.constants") +except ImportError: + pass # If the warnings don't exist we don't need to filter them. + # Email EMAIL_USE_SSL = {{ SMTP_USE_SSL }} # Forward all emails from edX's Automated Communication Engine (ACE) to django. diff --git a/tutor/templates/build/openedx/revisions.yml b/tutor/templates/build/openedx/revisions.yml index e9b7878c47..b7edda008f 100644 --- a/tutor/templates/build/openedx/revisions.yml +++ b/tutor/templates/build/openedx/revisions.yml @@ -1 +1 @@ -EDX_PLATFORM_REVISION: teak +EDX_PLATFORM_REVISION: ulmo diff --git a/tutor/templates/build/openedx/settings/partials/assets.py b/tutor/templates/build/openedx/settings/partials/assets.py index 86ef9110ab..556228a397 100644 --- a/tutor/templates/build/openedx/settings/partials/assets.py +++ b/tutor/templates/build/openedx/settings/partials/assets.py @@ -14,5 +14,8 @@ DATABASES = { "default": {}, } +# Dummy value required for the static asset build steps to run, +# but it has no impact on the output produced by those steps. +LMS_ROOT_URL = "https://lms.local" {{ patch("openedx-common-assets-settings") }} diff --git a/tutor/templates/build/openedx/settings/partials/i18n.py b/tutor/templates/build/openedx/settings/partials/i18n.py index 4c5e98a77f..b66f93b1bf 100644 --- a/tutor/templates/build/openedx/settings/partials/i18n.py +++ b/tutor/templates/build/openedx/settings/partials/i18n.py @@ -9,6 +9,9 @@ DATABASES = { "default": {}, } +# Dummy value required for the i18n build steps to run, but +# it has no impact on the output produced by those steps. +LMS_ROOT_URL = "https://lms.local" derive_settings(__name__) diff --git a/tutor/templates/config/defaults.yml b/tutor/templates/config/defaults.yml index 6ad300e717..d259bd16e0 100644 --- a/tutor/templates/config/defaults.yml +++ b/tutor/templates/config/defaults.yml @@ -61,14 +61,13 @@ OPENEDX_LMS_UWSGI_WORKERS: 2 OPENEDX_MYSQL_DATABASE: "openedx" OPENEDX_MYSQL_USERNAME: "openedx" # the common version will be automatically set to "master" in the main branch -OPENEDX_COMMON_VERSION: "release/teak.2" +OPENEDX_COMMON_VERSION: "release/ulmo" OPENEDX_EXTRA_PIP_REQUIREMENTS: [] MYSQL_HOST: "mysql" MYSQL_PORT: 3306 MYSQL_ROOT_USERNAME: "root" NPM_REGISTRY: "https://registry.npmjs.org/" PLATFORM_NAME: "My Open edX" -PREVIEW_LMS_HOST: "preview.{{ LMS_HOST }}" REDIS_HOST: "redis" REDIS_PORT: 6379 REDIS_USERNAME: "" diff --git a/tutor/templates/jobs/init/cms.sh b/tutor/templates/jobs/init/cms.sh index d3caeab3c1..cb38d6d1c6 100644 --- a/tutor/templates/jobs/init/cms.sh +++ b/tutor/templates/jobs/init/cms.sh @@ -20,3 +20,12 @@ fi ./manage.py cms reindex_studio --experimental --init # Create the courseware content index ./manage.py cms reindex_course --active + +# Load default policies for the Open edX Authorization framework +# Check if openedx-authz package is installed if not skip loading policies and exit +if python -c "import pkg_resources; pkg_resources.require('openedx-authz')" 2>/dev/null; then + ./manage.py cms load_policies +else + echo "openedx-authz package is not installed, skipping loading default policies" + exit 1 +fi diff --git a/tutor/templates/jobs/init/lms.sh b/tutor/templates/jobs/init/lms.sh index 93d179c127..f492422e4f 100644 --- a/tutor/templates/jobs/init/lms.sh +++ b/tutor/templates/jobs/init/lms.sh @@ -46,3 +46,12 @@ fi # Create waffle switches to enable some features, if they have not been explicitly defined before # Completion tracking: add green ticks to every completed unit (./manage.py lms waffle_switch --list | grep completion.enable_completion_tracking) || ./manage.py lms waffle_switch --create completion.enable_completion_tracking on + +# Load default policies for the Open edX Authorization framework +# Check if openedx-authz package is installed if not skip loading policies and exit +if python -c "import pkg_resources; pkg_resources.require('openedx-authz')" 2>/dev/null; then + ./manage.py lms load_policies +else + echo "openedx-authz package is not installed, skipping loading default policies" + exit 1 +fi diff --git a/tutor/templates/kustomization.yml b/tutor/templates/kustomization.yml index f29fea1e81..c3c3b6d7ec 100644 --- a/tutor/templates/kustomization.yml +++ b/tutor/templates/kustomization.yml @@ -65,12 +65,12 @@ configMapGenerator: app.kubernetes.io/name: redis {{ patch("kustomization-configmapgenerator") }} -{%- if patch("k8s-override") or patch("kustomization-patches-strategic-merge") %} -patchesStrategicMerge: +{%- if patch("k8s-override") or patch("kustomization-patches") %} +patches: {%- if patch("k8s-override") %} -- k8s/override.yml +- path: k8s/override.yml {%- endif %} -{{ patch("kustomization-patches-strategic-merge") }} +{{ patch("kustomization-patches") }} {%- endif %} {{ patch("kustomization") }}