From df29286ca78b3d39b18b9026cfa4ea7e4ec29a40 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Wed, 8 May 2024 14:12:19 +0500 Subject: [PATCH 1/4] feat: upgrade python version to 3.11.9 --- .../credentials/build/credentials/Dockerfile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tutorcredentials/templates/credentials/build/credentials/Dockerfile b/tutorcredentials/templates/credentials/build/credentials/Dockerfile index 0dc9ca1..c68e1e9 100644 --- a/tutorcredentials/templates/credentials/build/credentials/Dockerfile +++ b/tutorcredentials/templates/credentials/build/credentials/Dockerfile @@ -25,9 +25,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.8.18 +ARG PYTHON_VERSION=3.11.9 ENV PYENV_ROOT /opt/pyenv -RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.29 --depth 1 +RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.4.0 --depth 1 # Install Python RUN $PYENV_ROOT/bin/pyenv install $PYTHON_VERSION @@ -39,8 +39,8 @@ RUN $PYENV_ROOT/versions/$PYTHON_VERSION/bin/python -m venv /openedx/venv FROM minimal as code ARG CREDENTIALS_REPOSITORY="{{ CREDENTIALS_REPOSITORY }}" ARG CREDENTIALS_VERSION="{{ CREDENTIALS_REPOSITORY_VERSION }}" -RUN mkdir -p /openedx/credentials -ADD --keep-git-dir=true $CREDENTIALS_REPOSITORY#$CREDENTIALS_VERSION /openedx/credentials +RUN mkdir -p /openedx/credentials && \ + git clone $CREDENTIALS_REPOSITORY --branch $CREDENTIALS_VERSION --depth 1 /openedx/credentials WORKDIR /openedx/credentials {{ patch("credentials-dockerfile-post-git-checkout") }} @@ -65,7 +65,7 @@ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install \ # https://pypi.org/project/setuptools/ # https://pypi.org/project/pip/ # https://pypi.org/project/wheel/ - setuptools==68.2.2 pip==23.2.1. wheel==0.41.2 + setuptools==69.1.1 pip==24.0 wheel==0.43.0 # Install base requirements RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install -r requirements/production.txt @@ -75,7 +75,7 @@ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install \ # Use redis as a django cache https://pypi.org/project/django-redis/ django-redis==5.4.0 \ # uwsgi server https://pypi.org/project/uWSGI/ - uwsgi==2.0.22 + uwsgi==2.0.24 {{ patch("credentials-dockerfile-post-python-requirements") }} @@ -89,7 +89,7 @@ ENV PATH /openedx/nodeenv/bin:/openedx/venv/bin:${PATH} # Install nodeenv with the version provided by credentials # https://github.com/ekalinin/nodeenv/releases RUN pip install nodeenv==1.8.0 -RUN nodeenv /openedx/nodeenv --node=16.14.0 --prebuilt +RUN nodeenv /openedx/nodeenv --node=16.14.2 --prebuilt # Install nodejs requirements ARG NPM_REGISTRY='{{ NPM_REGISTRY }}' From ac434094eee5169a0ebf39a3d6c0bd44e2aa3315 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Wed, 8 May 2024 14:13:11 +0500 Subject: [PATCH 2/4] add changelog entry --- .../20240508_141227_faraz.maqsood_python_upgrade_to_v3_11_9.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/20240508_141227_faraz.maqsood_python_upgrade_to_v3_11_9.md diff --git a/changelog.d/20240508_141227_faraz.maqsood_python_upgrade_to_v3_11_9.md b/changelog.d/20240508_141227_faraz.maqsood_python_upgrade_to_v3_11_9.md new file mode 100644 index 0000000..073b8e9 --- /dev/null +++ b/changelog.d/20240508_141227_faraz.maqsood_python_upgrade_to_v3_11_9.md @@ -0,0 +1 @@ +- 💥[Feature] Upgrade Python version to 3.11.9. (by @Faraz32123) From 380cbc1118b901f6e953795b011f05c20bf2c716 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Wed, 8 May 2024 17:53:56 +0500 Subject: [PATCH 3/4] remove label from dockerfile as the maintainer's and author's information already mentioned in the setup.py --- .../templates/credentials/build/credentials/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/tutorcredentials/templates/credentials/build/credentials/Dockerfile b/tutorcredentials/templates/credentials/build/credentials/Dockerfile index c68e1e9..6f15c15 100644 --- a/tutorcredentials/templates/credentials/build/credentials/Dockerfile +++ b/tutorcredentials/templates/credentials/build/credentials/Dockerfile @@ -1,7 +1,6 @@ # syntax=docker/dockerfile:1 ###### Minimal image with base system requirements for most stages FROM docker.io/ubuntu:20.04 as minimal -LABEL maintainer="Lawrence McDaniel " ENV DEBIAN_FRONTEND=noninteractive RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ From 51403c6b5c9768577e0909cfca7c78f5cd2461c3 Mon Sep 17 00:00:00 2001 From: Danyal-Faheem Date: Mon, 13 May 2024 16:28:33 +0500 Subject: [PATCH 4/4] ci: temporarily skip building on arm64 As the upstream credentials repo seems to be breaking on arm64 and they are skipping arm64 builds as well due to the didkit package dependency not available on arm64 yet --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fc23a92..5808620 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,7 @@ variables: TUTOR_PYPI_PACKAGE: tutor-credentials GITHUB_REPO: overhangio/tutor-credentials TUTOR_EXTRA_ENABLED_PLUGINS: discovery mfe + IMAGES_BUILD_PLATFORM: "linux/amd64" include: - project: 'community/tutor-ci'