From ff0e8f714015e03d29af4139361d61e7d83a8928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Mon, 28 Nov 2022 11:16:28 +0100 Subject: [PATCH] fix: pin openedx dev Docker image tag with tutor version When running: tutor dev run -m /path/to/edx-platform lms pip install -r requirements/edx/development.txt I realised that I was re-installing packages that should already have been present in the image. The reason for that was that I was running an outdated version of the dev version of the openedx Docker image. This happens because `tutor dev run` does not trigger an image re-build. We solve this issue by pinning the openedx dev Docker image tag to the current tutor version. --- .../20221128_111113_regis_fix_docker_openedx_dev_version.md | 1 + docs/configuration.rst | 2 +- tutor/templates/config/defaults.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog.d/20221128_111113_regis_fix_docker_openedx_dev_version.md diff --git a/changelog.d/20221128_111113_regis_fix_docker_openedx_dev_version.md b/changelog.d/20221128_111113_regis_fix_docker_openedx_dev_version.md new file mode 100644 index 0000000..24fe5f1 --- /dev/null +++ b/changelog.d/20221128_111113_regis_fix_docker_openedx_dev_version.md @@ -0,0 +1 @@ +- [Bugfix] Fix tag of "openedx" development Docker image. Previously, this Docker tag did not include the Tutor version. As a consequence, a different cached image could be used in some cases. For instance: when running `tutor dev run` commands. Now, the image tag is "openedx-dev:TUTOR_VERSION". diff --git a/docs/configuration.rst b/docs/configuration.rst index c3384cf..ef7c360 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -63,7 +63,7 @@ Custom images This configuration parameter defines the name of the Docker image to run for the lms and cms containers. By default, the Docker image tag matches the Tutor version it was built with. -- ``DOCKER_IMAGE_OPENEDX_DEV`` (default: ``"openedx-dev"``) +- ``DOCKER_IMAGE_OPENEDX_DEV`` (default: ``"openedx-dev:{{ TUTOR_VERSION }}"``) This configuration paramater defines the name of the Docker image to run the development version of the lms and cms containers. By default, the Docker image tag matches the Tutor version it was built with. diff --git a/tutor/templates/config/defaults.yml b/tutor/templates/config/defaults.yml index 385013b..533151d 100644 --- a/tutor/templates/config/defaults.yml +++ b/tutor/templates/config/defaults.yml @@ -11,7 +11,7 @@ DEV_PROJECT_NAME: "{{ TUTOR_APP }}_dev" DOCKER_COMPOSE_VERSION: "3.7" DOCKER_REGISTRY: "docker.io/" DOCKER_IMAGE_OPENEDX: "{{ DOCKER_REGISTRY }}overhangio/openedx:{{ TUTOR_VERSION }}" -DOCKER_IMAGE_OPENEDX_DEV: "openedx-dev" +DOCKER_IMAGE_OPENEDX_DEV: "openedx-dev:{{ TUTOR_VERSION }}" DOCKER_IMAGE_CADDY: "docker.io/caddy:2.4.6" DOCKER_IMAGE_ELASTICSEARCH: "docker.io/elasticsearch:7.10.1" DOCKER_IMAGE_MONGODB: "docker.io/mongo:4.2.17"