diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40ee175a43..a70dda792f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,7 +38,7 @@ jobs: # https://github.com/actions/setup-python uses: actions/setup-python@v6 with: - python-version: 3.9 + python-version: 3.10 cache: 'pip' cache-dependency-path: requirements/dev.txt - name: Install Hatch diff --git a/.github/workflows/smoke-k8s.yml b/.github/workflows/smoke-k8s.yml index 69b6a1774f..6b98e6d493 100644 --- a/.github/workflows/smoke-k8s.yml +++ b/.github/workflows/smoke-k8s.yml @@ -38,8 +38,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - # TODO: Update to 3.10 in main as 3.9 is EOL - python-version: "3.9" + python-version: "3.10" # kind is preferred over minikube for CI: no VM overhead (~300 MB for # control-plane vs ~2 GB), no tunnel daemon needed for LoadBalancer, and diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 66dbe8918f..4d668388a1 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -37,8 +37,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - # TODO: Update to 3.10 in main as 3.9 is EOL - python-version: "3.9" + python-version: "3.10" - name: Install tutor run: pip install -e .[dev] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9cd8058618..112e011668 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.9', '3.12'] + python-version: ['3.10', '3.14'] steps: - uses: actions/checkout@v6 - name: Set up Python diff --git a/changelog.d/20251111_011520_kshitij_env_saved_action.md b/changelog.d/20251111_011520_kshitij_env_saved_action.md new file mode 100644 index 0000000000..6359072d86 --- /dev/null +++ b/changelog.d/20251111_011520_kshitij_env_saved_action.md @@ -0,0 +1,2 @@ +- [Feature] Add ENV_SAVED Action that allows hooks to run after a save + operation. (by @xitij2000) diff --git a/changelog.d/20260121_123520_feanil_patch_2.md b/changelog.d/20260121_123520_feanil_patch_2.md new file mode 100644 index 0000000000..9a5910fe30 --- /dev/null +++ b/changelog.d/20260121_123520_feanil_patch_2.md @@ -0,0 +1,13 @@ + + + + + +[Improvement] Update to use Python 3.12 for edx-platform diff --git a/changelog.d/20260415_114034_ali.abbas02_python_version_upgrade_latest.md b/changelog.d/20260415_114034_ali.abbas02_python_version_upgrade_latest.md new file mode 100644 index 0000000000..0fccd14f53 --- /dev/null +++ b/changelog.d/20260415_114034_ali.abbas02_python_version_upgrade_latest.md @@ -0,0 +1 @@ +- 💥[Improvement] Add Python 3.13 and 3.14 support. Drop Python 3.9 (end-of-life). Update CI matrix from Python 3.9/3.12 to 3.10/3.14. Update `requires-python` to `>= 3.10`. Use `sphinx>=9.1.0` for Python 3.14+ and `sphinx>=7.4.7` for Python 3.10 to account for Sphinx 9.x dropping Python 3.10 support. (by @Syed-Ali-Abbas-568) diff --git a/changelog.d/20260417_verawood_upgrade.md b/changelog.d/20260417_verawood_upgrade.md new file mode 100644 index 0000000000..570a108909 --- /dev/null +++ b/changelog.d/20260417_verawood_upgrade.md @@ -0,0 +1 @@ +- 💥[Feature] Upgrade to Verawood. (generated by Claude Code on behalf of @ahmed-arb) diff --git a/changelog.d/20260611_upgrade_dependencies.md b/changelog.d/20260611_upgrade_dependencies.md new file mode 100644 index 0000000000..2200961ce9 --- /dev/null +++ b/changelog.d/20260611_upgrade_dependencies.md @@ -0,0 +1,2 @@ +- [Improvement] Upgrade Caddy to v2.11.4 and Redis to v7.4.9. (by @ahmed-arb) +- [Improvement] Upgrade Python to v3.12.13 and Node.js to v24.16.0 in the Open edX Docker image. (by @ahmed-arb) diff --git a/changelog.d/20260611_upgrade_mongodb.md b/changelog.d/20260611_upgrade_mongodb.md new file mode 100644 index 0000000000..264f043999 --- /dev/null +++ b/changelog.d/20260611_upgrade_mongodb.md @@ -0,0 +1 @@ +- [Security] Upgrade MongoDB to v7.0.35 to pull in upstream security patches, remaining on the 7.0 line that Open edX tests against. (by @ahmed-arb) diff --git a/changelog.d/20260611_upgrade_mysql.md b/changelog.d/20260611_upgrade_mysql.md new file mode 100644 index 0000000000..38d3bc66e5 --- /dev/null +++ b/changelog.d/20260611_upgrade_mysql.md @@ -0,0 +1 @@ +- [Improvement] Upgrade MySQL to v8.4.9, the latest patch on the 8.4 LTS line. (by @ahmed-arb) diff --git a/changelog.d/20260616_140000_abdul.muqadim_bump_setuptools_main.md b/changelog.d/20260616_140000_abdul.muqadim_bump_setuptools_main.md new file mode 100644 index 0000000000..2269cd272d --- /dev/null +++ b/changelog.d/20260616_140000_abdul.muqadim_bump_setuptools_main.md @@ -0,0 +1 @@ +- [Bugfix] On the main branch, bump the pinned build-time `setuptools` to 80.9.0 (the release branch keeps 69.1.1). The older version cannot build packages that declare their license with the PEP 639 `project.license` field (e.g. `mysqlclient`) against the Open edX master branch, which broke `tutor images build openedx` on main. (by @Abdul-Muqadim-Arbisoft) diff --git a/changelog.d/20260616_192205_danyalfaheem_py39depr_ci.md b/changelog.d/20260616_192205_danyalfaheem_py39depr_ci.md new file mode 100644 index 0000000000..42ad1f3f1d --- /dev/null +++ b/changelog.d/20260616_192205_danyalfaheem_py39depr_ci.md @@ -0,0 +1 @@ +- [Improvement] Run smoke workflows on Python 3.10 instead of 3.9 as it has reached EOL. (by @Danyal-Faheem) \ No newline at end of file diff --git a/changelog.d/20260713_upgrade_meilisearch.md b/changelog.d/20260713_upgrade_meilisearch.md new file mode 100644 index 0000000000..d42667d194 --- /dev/null +++ b/changelog.d/20260713_upgrade_meilisearch.md @@ -0,0 +1,12 @@ +- 💥[Improvement] Upgrade Meilisearch to v1.36.0. This changes the on-disk index format, so v1.36.0 refuses to start on a database created by v1.8.4: the container restart-loops with a "database version (1.8.4) is incompatible with your current engine version (1.36.0)" error. Meilisearch is only a derived index in Open edX and never a source of truth, so the existing index must be discarded and rebuilt after upgrading. Stop the platform, delete `data/meilisearch/data.ms`, then re-run initialisation and reindex: (by @HammadYousaf01) + + tutor local stop + rm -rf "$(tutor config printroot)/data/meilisearch/data.ms" + tutor local start -d + tutor local do init + tutor local exec cms ./manage.py cms reindex_studio + tutor local exec cms ./manage.py cms reindex_course --active + +- On a large site, the reindex takes a while and search stays incomplete until it finishes, so plan a maintenance window. + +- Rolling back is not just reverting the image tag. Because the format only moves forward, v1.8.4 cannot read a v1.36.0 database either, so you also need to restore your pre-upgrade data/meilisearch/data.ms backup. \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index e7dd7fb66a..35a7832b42 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -58,6 +58,10 @@ # ParamSpec objects are not classes but may be referenced as such ("py:class", "tutor.core.hooks.actions.T"), ("py:class", "typing_extensions.ParamSpec"), + # Python 3.14: TypeVar references in autodoc are emitted as py:obj with + # the `typing.~T` short-name form, which has no resolvable target. + ("py:obj", "typing.~T"), + ("py:obj", "typing.~T2"), ] # Even outside nitpicky mode, some type-hint rendering can produce "ref.class" @@ -83,6 +87,8 @@ # https://github.com/emdgroup/baybe/pull/67 "Action": "tutor.core.hooks.actions.Action", "Filter": "tutor.core.hooks.filters.Filter", + # Python 3.14 + "ActionCallbackFunc": "tutor.core.hooks.actions.ActionCallbackFunc", } diff --git a/docs/configuration.rst b/docs/configuration.rst index 2f4bfdfb69..8b65d19298 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -67,11 +67,11 @@ This configuration parameter defines the name of the Docker image to run the dev .. https://hub.docker.com/r/devture/exim-relay/tags -- ``DOCKER_IMAGE_CADDY`` (default: ``"docker.io/caddy:2.6.2"``) +- ``DOCKER_IMAGE_CADDY`` (default: ``"docker.io/caddy:2.11.4"``) This configuration parameter defines which Caddy Docker image to use. -- ``DOCKER_IMAGE_MEILISEARCH`` (default: ``"docker.io/getmeili/meilisearch:v1.8.4"``) +- ``DOCKER_IMAGE_MEILISEARCH`` (default: ``"docker.io/getmeili/meilisearch:v1.36.0"``) This configuration parameter defines which Meilisearch Docker image to use. @@ -81,13 +81,13 @@ This configuration parameter defines which MongoDB Docker image to use. .. https://hub.docker.com/_/mysql/tags?page=1&name=8.0 -- ``DOCKER_IMAGE_MYSQL`` (default: ``"docker.io/mysql:8.4.0"``) +- ``DOCKER_IMAGE_MYSQL`` (default: ``"docker.io/mysql:8.4.9"``) This configuration parameter defines which MySQL Docker image to use. .. https://hub.docker.com/_/redis/tags -- ``DOCKER_IMAGE_REDIS`` (default: ``"docker.io/redis:7.4.5"``) +- ``DOCKER_IMAGE_REDIS`` (default: ``"docker.io/redis:7.4.9"``) This configuration parameter defines which Redis Docker image to use. @@ -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/ulmo.3"``, or ``master`` in :ref:`Tutor Main
`) +- ``OPENEDX_COMMON_VERSION`` (default: ``"release/verawood"``, or ``master`` in :ref:`Tutor Main
`) This defines the default version that will be pulled from all Open edX git repositories. @@ -391,9 +391,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-Ulmo) version of edx-platform: this will simply not work. +- Do not try to run a fork from an older (pre-Verawood) 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/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. +- Do not try to run a fork from the release/verawood branch: Tutor will attempt to apply security and bug fix patches that might already be included in the release/verawood but which were not yet applied to the latest release tag. Patch application will thus fail if you base your fork from the release/verawood branch. .. _i18n: @@ -405,7 +405,7 @@ Tutor builds images with the latest translations using the ``atlas pull`` `comma By default the translations are pulled from the `openedx-translations repository `_ from the ``ATLAS_REVISION`` branch. You can use custom translations on your fork of the openedx-translations repository by setting the following configuration parameters: -- ``ATLAS_REVISION`` (default: ``"main"`` for Tutor Main, or ``"{{ OPENEDX_COMMON_VERSION }}"`` if a named release is used). Note that if you're running on a point release (for example, ``release/ulmo.1``), you will not be able to pull any upstream additions to translations - they will be "frozen" at that Git tag. If you're making changes to your language on Transifex, it is recommended to set this value to the Git branch (for example, ``release/ulmo``) to pick up any new translations that occur for that release. +- ``ATLAS_REVISION`` (default: ``"main"`` for Tutor Main, or ``"{{ OPENEDX_COMMON_VERSION }}"`` if a named release is used). Note that if you're running on a point release (for example, ``release/verawood.1``), you will not be able to pull any upstream additions to translations - they will be "frozen" at that Git tag. If you're making changes to your language on Transifex, it is recommended to set this value to the Git branch (for example, ``release/verawood``) to pick up any new translations that occur for that release. - ``ATLAS_REPOSITORY`` (default: ``"openedx/openedx-translations"``). There's a feature request to `support GitLab and other providers `_. - ``ATLAS_OPTIONS`` (default: ``""``) Pass additional arguments to ``atlas pull``. Refer to the `atlas documentations `_ for more information. diff --git a/docs/developing/main.rst b/docs/developing/main.rst index 4ab7e4c05a..0e353e9311 100644 --- a/docs/developing/main.rst +++ b/docs/developing/main.rst @@ -46,6 +46,19 @@ However, these images include the application master branch at the point in time tutor images build --no-cache all +.. note:: + On the ``main`` branch, image tags carry a ``-main`` suffix. Only the ``openedx`` and ``indigo`` images are published to Docker Hub with that suffix; the ``-main`` images for other plugins are not. As a result, ``tutor images pull all`` cannot fetch them and you must build these images yourself, for example:: + + tutor images build mfe + + On Kubernetes, the images also need to be available from a registry that the cluster can reach. Set the ``DOCKER_REGISTRY`` configuration value (with a trailing slash) to a registry you can push to, then build and push the plugin images:: + + tutor config save --set DOCKER_REGISTRY=docker.io/myusername/ + tutor images build mfe + tutor images push mfe + + If you do not specifically need the master branches, running a :ref:`tagged release ` avoids this step entirely. + Running Tutor Main alongside the latest release ----------------------------------------------- diff --git a/docs/developing/openedx.rst b/docs/developing/openedx.rst index 26fb9a1a05..15f6e7f07e 100644 --- a/docs/developing/openedx.rst +++ b/docs/developing/openedx.rst @@ -117,7 +117,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/developing/plugins/indexes.rst b/docs/developing/plugins/indexes.rst index 281100a2e4..6c2ddbad0c 100644 --- a/docs/developing/plugins/indexes.rst +++ b/docs/developing/plugins/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 "Ulmo" 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 "Verawood" release: -- https://overhang.io/tutor/main/ulmo/plugins.yml -- ``/path/to/your/local/index/ulmo/plugins.yml`` +- https://overhang.io/tutor/main/verawood/plugins.yml +- ``/path/to/your/local/index/verawood/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/ulmo/ + mkdir -p ~/localindex/verawood/ # Edit the index - vim ~/localindex/ulmo/plugins.yml + vim ~/localindex/verawood/plugins.yml Add the following to the index:: diff --git a/docs/gettingstarted/installation.rst b/docs/gettingstarted/installation.rst index abc2630f16..65071f4727 100644 --- a/docs/gettingstarted/installation.rst +++ b/docs/gettingstarted/installation.rst @@ -80,4 +80,5 @@ 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' | +| Verawood | v22 | pip install 'tutor[full]>=22.0.0,<23.0.0' | +-------------------+---------------+--------------------------------------------+ diff --git a/docs/sysadmin/edx-platform.rst b/docs/sysadmin/edx-platform.rst index 55434d9846..2a9491dae3 100644 --- a/docs/sysadmin/edx-platform.rst +++ b/docs/sysadmin/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/upgrading.rst b/docs/upgrading.rst index a30fa6c053..72473cc37e 100644 --- a/docs/upgrading.rst +++ b/docs/upgrading.rst @@ -39,7 +39,7 @@ 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 Teak to Ulmo 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 Ulmo to Verawood and rebuild some Docker images, run:: tutor config save tutor images build all # list the images that should be rebuilt here diff --git a/pyproject.toml b/pyproject.toml index 52a14e1732..207b975ad6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,17 +9,18 @@ authors = [ ] description = "The Docker-based Open edX distribution designed for peace of mind" readme = {file = "README.rst", content-type = "text/x-rst"} -requires-python = ">= 3.9" +requires-python = ">= 3.10" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] # these fields will be set by hatch_build.py dynamic = ["version", "dependencies", "optional-dependencies"] diff --git a/requirements/base.txt b/requirements/base.txt index 025a141bfb..72180f5a67 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.9 +# This file is autogenerated by pip-compile with Python 3.10 # by the following command: # # pip-compile requirements/base.in diff --git a/requirements/plugins.txt b/requirements/plugins.txt index 2cf7cc71ed..9a5e86a293 100644 --- a/requirements/plugins.txt +++ b/requirements/plugins.txt @@ -1,14 +1,14 @@ -# change version ranges when upgrading from ulmo -tutor-android>=21.0.0,<22.0.0 -tutor-cairn>=21.0.0,<22.0.0 -tutor-credentials>=21.0.0,<22.0.0 -tutor-discovery>=21.0.0,<22.0.0 -tutor-deck>=21.0.0,<22.0.0 -tutor-forum>=21.0.0,<22.0.0 -tutor-indigo>=21.0.0,<22.0.0 -tutor-jupyter>=21.0.0,<22.0.0 -tutor-livedeps>=21.0.0,<22.0.0 -tutor-mfe>=21.0.0,<22.0.0 -tutor-minio>=21.0.0,<22.0.0 -tutor-notes>=21.0.0,<22.0.0 -tutor-xqueue>=21.0.0,<22.0.0 +# 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/commands/test_images.py b/tests/commands/test_images.py index 74aaa07a70..81008530f8 100644 --- a/tests/commands/test_images.py +++ b/tests/commands/test_images.py @@ -49,7 +49,7 @@ def test_images_pull_all_vendor_images(self, image_pull: Mock) -> None: self.assertIsNone(result.exception) self.assertEqual(0, result.exit_code) # Note: we should update this tag whenever the mysql image is updated - image_pull.assert_called_once_with("docker.io/mysql:8.4.0") + image_pull.assert_called_once_with("docker.io/mysql:8.4.9") def test_images_printtag_image(self) -> None: result = self.invoke(["images", "printtag", "openedx"]) diff --git a/tests/test_env.py b/tests/test_env.py index cdf1f0478a..4cc504d5f9 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("ulmo", env.get_env_release(root)) + self.assertEqual("verawood", 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 b4c4acc2fb..baa0920cba 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__ = "21.0.8" +__version__ = "22.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/upgrade/__init__.py b/tutor/commands/upgrade/__init__.py index 56abf03548..a84593bf99 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 ulmo +# Note: don't forget to change this when we upgrade from verawood OPENEDX_RELEASE_NAMES = [ "ironwood", "juniper", @@ -13,4 +13,5 @@ "sumac", "teak", "ulmo", + "verawood", ] diff --git a/tutor/commands/upgrade/compose.py b/tutor/commands/upgrade/compose.py index 56d75b9f46..a35c90afc1 100644 --- a/tutor/commands/upgrade/compose.py +++ b/tutor/commands/upgrade/compose.py @@ -60,6 +60,9 @@ def upgrade_from(context: click.Context, from_release: str) -> None: if running_release == "teak": running_release = "ulmo" + if running_release == "ulmo": + running_release = "verawood" + 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 8402511ac4..dcad75f76c 100644 --- a/tutor/commands/upgrade/k8s.py +++ b/tutor/commands/upgrade/k8s.py @@ -59,6 +59,9 @@ def upgrade_from(context: click.Context, from_release: str) -> None: if running_release == "teak": running_release = "ulmo" + if running_release == "ulmo": + running_release = "verawood" + def upgrade_from_ironwood(config: Config) -> None: upgrade_mongodb(config, "3.4.24", "3.4") diff --git a/tutor/env.py b/tutor/env.py index ecd0f5b83d..2af0070f18 100644 --- a/tutor/env.py +++ b/tutor/env.py @@ -342,6 +342,15 @@ def save(root: str, config: Config) -> None: save_all_from(src, os.path.join(root_env, dst), config) upgrade_obsolete(root) + + config_copy = deepcopy(config) + hooks.Actions.ENV_SAVED.do(root_env, config_copy) + if config_copy != config: + fmt.echo_alert( + "A plugin just modified the config during the ENV_SAVED hook. " + "This could have unintended consequences." + ) + fmt.echo_info(f"Environment generated in {base_dir(root)}") @@ -478,6 +487,7 @@ def get_release(version: str) -> str: "19": "sumac", "20": "teak", "21": "ulmo", + "22": "verawood", }[version.split(".", maxsplit=1)[0]] diff --git a/tutor/hooks/catalog.py b/tutor/hooks/catalog.py index b962669b8f..013db4d22d 100644 --- a/tutor/hooks/catalog.py +++ b/tutor/hooks/catalog.py @@ -94,6 +94,16 @@ def run_this_on_start(root, config, name): #: :parameter kwargs: job named arguments. DO_JOB: Action[[str, Any]] = Action() + #: This action is called at the end of the tutor.env.save function after all + #: the changes to the environment have been applied, all obsolete config has + #: been upgraded. + #: Modifying the config object will not trigger changes in the configuration. + #: For all purposes, it should be considered read-only. + #: + #: :parameter str root: project root. + #: :parameter dict config: project configuration. + ENV_SAVED: Action[[str, Config]] = Action() + #: Triggered when a single plugin needs to be loaded. Only plugins that have previously been #: discovered can be loaded (see :py:data:`CORE_READY`). #: diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index c7fa0266db..7a71965233 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -20,7 +20,7 @@ ARG PIP_COMMAND="uv pip" # setuptools 81 removed pkg_resources. Inherited by all stages, and reused as # the single source of truth for the venv setuptools pin below. # https://github.com/overhangio/tutor/issues/1350 -RUN echo "setuptools==69.1.1" > /etc/openedx-build-constraints.txt +RUN echo "setuptools==80.9.0" > /etc/openedx-build-constraints.txt ENV UV_BUILD_CONSTRAINT=/etc/openedx-build-constraints.txt ENV PIP_CONSTRAINT=/etc/openedx-build-constraints.txt @@ -39,9 +39,9 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ # Install pyenv # https://www.python.org/downloads/ # https://github.com/pyenv/pyenv/releases -ARG PYTHON_VERSION=3.11.8 +ARG PYTHON_VERSION=3.12.13 ENV PYENV_ROOT=/opt/pyenv -RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.36 --depth 1 +RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.7.2 --depth 1 # Install Python RUN $PYENV_ROOT/bin/pyenv install $PYTHON_VERSION @@ -150,7 +150,7 @@ ENV PATH=/openedx/nodeenv/bin:/openedx/venv/bin:${PATH} # Install nodeenv with the version provided by edx-platform # https://github.com/openedx/edx-platform/blob/master/requirements/edx/assets.txt RUN $PIP_COMMAND install nodeenv==1.9.1 -RUN nodeenv /openedx/nodeenv --node=24.12.0 --prebuilt +RUN nodeenv /openedx/nodeenv --node=24.16.0 --prebuilt # Install nodejs requirements ARG NPM_REGISTRY={{ NPM_REGISTRY }} diff --git a/tutor/templates/build/openedx/revisions.yml b/tutor/templates/build/openedx/revisions.yml index b7edda008f..9b13686e2e 100644 --- a/tutor/templates/build/openedx/revisions.yml +++ b/tutor/templates/build/openedx/revisions.yml @@ -1 +1 @@ -EDX_PLATFORM_REVISION: ulmo +EDX_PLATFORM_REVISION: verawood diff --git a/tutor/templates/config/defaults.yml b/tutor/templates/config/defaults.yml index 1b0f6bb0d3..d26c7333e7 100644 --- a/tutor/templates/config/defaults.yml +++ b/tutor/templates/config/defaults.yml @@ -15,16 +15,16 @@ DOCKER_REGISTRY: "docker.io/" DOCKER_IMAGE_OPENEDX: "{{ DOCKER_REGISTRY }}overhangio/openedx:{{ TUTOR_VERSION }}" DOCKER_IMAGE_OPENEDX_DEV: "openedx-dev:{{ TUTOR_VERSION }}" # https://hub.docker.com/_/caddy/tags -DOCKER_IMAGE_CADDY: "docker.io/caddy:2.7.4" +DOCKER_IMAGE_CADDY: "docker.io/caddy:2.11.4" # https://hub.docker.com/r/getmeili/meilisearch/tags -DOCKER_IMAGE_MEILISEARCH: "docker.io/getmeili/meilisearch:v1.8.4" +DOCKER_IMAGE_MEILISEARCH: "docker.io/getmeili/meilisearch:v1.36.0" # https://hub.docker.com/_/mongo/tags -DOCKER_IMAGE_MONGODB: "docker.io/mongo:7.0.28" +DOCKER_IMAGE_MONGODB: "docker.io/mongo:7.0.35" # https://hub.docker.com/_/mysql/tags -DOCKER_IMAGE_MYSQL: "docker.io/mysql:8.4.0" +DOCKER_IMAGE_MYSQL: "docker.io/mysql:8.4.9" DOCKER_IMAGE_PERMISSIONS: "{{ DOCKER_REGISTRY }}overhangio/openedx-permissions:{{ TUTOR_VERSION }}" # https://hub.docker.com/_/redis/tags -DOCKER_IMAGE_REDIS: "docker.io/redis:7.4.5" +DOCKER_IMAGE_REDIS: "docker.io/redis:7.4.9" # https://hub.docker.com/r/devture/exim-relay/tags DOCKER_IMAGE_SMTP: "docker.io/devture/exim-relay:4.96-r1-0" EDX_PLATFORM_REPOSITORY: "https://github.com/openedx/edx-platform.git" @@ -61,7 +61,7 @@ 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/ulmo.3" +OPENEDX_COMMON_VERSION: "release/verawood" OPENEDX_EXTRA_PIP_REQUIREMENTS: [] MYSQL_HOST: "mysql" MYSQL_PORT: 3306