From 3ea33ae78652bb2cd3e5e8596ae7314417cbd8da Mon Sep 17 00:00:00 2001 From: Deborah Kaplan Date: Thu, 29 Jan 2026 21:44:22 +0000 Subject: [PATCH 1/2] feat: improved local translation handling - pulls in any extra sources configured for credentials and edxapp - technically I suppose there could be problems if they aren't in the environment but we are absolutely populating the environment in edx-internal - added to the credentials docker file twice, because there's 2 different potential images where we build translations --- dockerfiles/credentials.Dockerfile | 5 +++++ dockerfiles/edx-platform.Dockerfile | 2 ++ 2 files changed, 7 insertions(+) diff --git a/dockerfiles/credentials.Dockerfile b/dockerfiles/credentials.Dockerfile index 4bb7461..3412a73 100644 --- a/dockerfiles/credentials.Dockerfile +++ b/dockerfiles/credentials.Dockerfile @@ -4,6 +4,7 @@ FROM ubuntu:jammy AS base ARG OPENEDX_TRANSLATIONS_REPO +ARG OPENEDX_ATLAS_EXTRA_SOURCES ARG CREDENTIALS_SERVICE_REPO=edx/credentials ARG CREDENTIALS_SERVICE_VERSION=master ARG PYTHON_VERSION=3.12 @@ -11,6 +12,7 @@ ENV TZ=UTC ENV TERM=xterm-256color ENV DEBIAN_FRONTEND=noninteractive ENV ATLAS_OPTIONS="--repository=$OPENEDX_TRANSLATIONS_REPO" +ENV ATLAS_EXTRA_SOURCES="--repository=$OPENEDX_ATLAS_EXTRA_SOURCES" # software-properties-common is needed to setup our Python 3.12 env RUN apt-get update && \ @@ -133,7 +135,10 @@ CMD gunicorn --workers=2 --name credentials -c /edx/app/credentials/credentials/ FROM base AS dev USER root +ARG OPENEDX_ATLAS_EXTRA_SOURCES ARG OPENEDX_TRANSLATIONS_REPO +ENV ATLAS_EXTRA_SOURCES="--repository=$OPENEDX_ATLAS_EXTRA_SOURCES" + RUN curl -L -o credentials/settings/devstack.py https://raw.githubusercontent.com/edx/devstack/${CREDENTIALS_SERVICE_VERSION}/py_configuration_files/credentials.py diff --git a/dockerfiles/edx-platform.Dockerfile b/dockerfiles/edx-platform.Dockerfile index a6dcaec..014829c 100644 --- a/dockerfiles/edx-platform.Dockerfile +++ b/dockerfiles/edx-platform.Dockerfile @@ -291,8 +291,10 @@ RUN pip install -e . # out the stage allows us to shed all of the unwanted out-of-repo changes. FROM app-deps AS translations +ARG OPENEDX_ATLAS_EXTRA_SOURCES ARG OPENEDX_TRANSLATIONS_VERSION ARG OPENEDX_TRANSLATIONS_REPO +ENV ATLAS_EXTRA_SOURCES="--repository=$OPENEDX_ATLAS_EXTRA_SOURCES" # Install translations files. Note that this leaves the git working directory in # a "dirty" state. From 298c01667d57aa9925de171b54596ddbc1760c03 Mon Sep 17 00:00:00 2001 From: Deborah Kaplan Date: Tue, 3 Feb 2026 19:54:30 +0000 Subject: [PATCH 2/2] chore: re-factoring mild re-factoring of environment variable per code review suggestion --- dockerfiles/edx-platform.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockerfiles/edx-platform.Dockerfile b/dockerfiles/edx-platform.Dockerfile index 014829c..534e48a 100644 --- a/dockerfiles/edx-platform.Dockerfile +++ b/dockerfiles/edx-platform.Dockerfile @@ -294,7 +294,6 @@ FROM app-deps AS translations ARG OPENEDX_ATLAS_EXTRA_SOURCES ARG OPENEDX_TRANSLATIONS_VERSION ARG OPENEDX_TRANSLATIONS_REPO -ENV ATLAS_EXTRA_SOURCES="--repository=$OPENEDX_ATLAS_EXTRA_SOURCES" # Install translations files. Note that this leaves the git working directory in # a "dirty" state. @@ -306,6 +305,7 @@ RUN <