From a6d4c62775deba92d8db880cbe712da356664630 Mon Sep 17 00:00:00 2001 From: Naincy Chourasia Date: Fri, 6 Nov 2026 05:50:25 +0000 Subject: [PATCH] fix: don't wait for edxapp health before syncing requirements provision-lms.sh started lms/cms with `docker compose up --wait` before installing requirements from the bind-mounted edx-platform checkout. The edxapp images are built nightly, so when edx-platform merges code that needs a newer package (e.g. manage.py importing openedx_filters.management.filters, which needs openedx-filters>=3.16.0), runserver crashes on import, the container never becomes healthy, and provisioning fails before reaching the step that would install the missing package. Start the containers without --wait (exec only needs them running), and wait for health only after requirements are installed and the containers restarted. Co-Authored-By: Claude Opus 5.5 --- provision-lms.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/provision-lms.sh b/provision-lms.sh index 235e5f4..cde93b0 100755 --- a/provision-lms.sh +++ b/provision-lms.sh @@ -10,9 +10,16 @@ cms_port=18010 ./load-db.sh edxapp ./load-db.sh edxapp_csmh -# Bring edxapp containers online +# Bring edxapp containers online. +# +# Do NOT use --wait here: the edxapp image is built nightly from edx-platform's +# requirements, but the edx-platform code is bind-mounted from the local +# checkout. If the checkout depends on a package version newer than what the +# image has, runserver crashes on import and the container can never become +# healthy until the requirements below are installed. We only need the +# container running so we can `exec` into it. for app in "${apps[@]}"; do - docker compose up -d --wait --no-deps $app + docker compose up -d --no-deps $app done # install git for both LMS and CMS @@ -25,6 +32,12 @@ for app in "${apps[@]}"; do docker compose restart $app done +# Now that requirements match the checked-out code, make sure the devservers +# actually come up healthy before continuing. +for app in "${apps[@]}"; do + docker compose up -d --wait --no-deps $app +done + # Run edxapp migrations first since they are needed for the service users and OAuth clients # Make migrate runs migrations for both lms and cms. docker compose exec -T lms bash -e -c 'source /edx/app/edxapp/edxapp_env && make migrate'