From 8d1f30080ed93db89a3dd88218f9b2bd966e9142 Mon Sep 17 00:00:00 2001 From: Omar Al-Ithawi Date: Fri, 15 Dec 2023 19:40:16 +0300 Subject: [PATCH 1/8] feat: add `atlas pull` --- changelog.d/20240114_095941_i_atlas.md | 1 + .../templates/credentials/build/credentials/Dockerfile | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog.d/20240114_095941_i_atlas.md diff --git a/changelog.d/20240114_095941_i_atlas.md b/changelog.d/20240114_095941_i_atlas.md new file mode 100644 index 0000000..a34376c --- /dev/null +++ b/changelog.d/20240114_095941_i_atlas.md @@ -0,0 +1 @@ +- [Feature] Add `atlas pull` at build-time. (by @omarithawi) diff --git a/tutorcredentials/templates/credentials/build/credentials/Dockerfile b/tutorcredentials/templates/credentials/build/credentials/Dockerfile index 34c5a4d..0dc9ca1 100644 --- a/tutorcredentials/templates/credentials/build/credentials/Dockerfile +++ b/tutorcredentials/templates/credentials/build/credentials/Dockerfile @@ -7,7 +7,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \ apt update && \ - apt install -y build-essential curl git language-pack-en + apt install -y build-essential curl git language-pack-en gettext ENV LC_ALL en_US.UTF-8 {{ patch("credentials-dockerfile-minimal") }} @@ -125,6 +125,9 @@ ENV PATH /openedx/venv/bin:./node_modules/.bin:/openedx/nodeenv/bin:${PATH} ENV VIRTUAL_ENV /openedx/venv/ WORKDIR /openedx/credentials +RUN atlas pull --repository="{{ ATLAS_REPOSITORY }}" --branch="{{ ATLAS_REVISION }}" {{ ATLAS_OPTIONS }} translations/credentials/credentials/conf/locale:credentials/conf/locale +RUN python manage.py compilemessages + # Setup minimal yml config file, which is required by production settings RUN echo "{}" > /openedx/config.yml ENV CREDENTIALS_CFG /openedx/config.yml From da7b0845c665c8c1e62202a295c267a710103ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Tue, 20 Feb 2024 15:15:41 +0100 Subject: [PATCH 2/8] ci: remove now useless OPENEDX_RELEASE variable --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f94ba1..fc23a92 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,6 @@ variables: TUTOR_PLUGIN: credentials TUTOR_IMAGES: credentials TUTOR_PYPI_PACKAGE: tutor-credentials - OPENEDX_RELEASE: quince GITHUB_REPO: overhangio/tutor-credentials TUTOR_EXTRA_ENABLED_PLUGINS: discovery mfe From 3c346791253a1c5ba9d2b4b16d524c328acef59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Tue, 5 Mar 2024 11:51:51 +0500 Subject: [PATCH 3/8] ci: don't even try to auto-add PRs to github project Auto-adding PRs to the Github project is not working because the github-token is not available there. --- .github/workflows/auto-add-to-project.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/auto-add-to-project.yml b/.github/workflows/auto-add-to-project.yml index d4ab7a4..7dadeb6 100644 --- a/.github/workflows/auto-add-to-project.yml +++ b/.github/workflows/auto-add-to-project.yml @@ -1,9 +1,6 @@ -name: Auto Add Issues and Pull Requests to Project +name: Auto Add Issues to Project on: - pull_request: - types: - - opened issues: types: - opened From b883636a8e86d5761619a4c914c3d9c190f6c89f Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Tue, 14 May 2024 10:47:33 +0500 Subject: [PATCH 4/8] Enhancement: Python 3.11 upgrade (#41) * feat: upgrade python version to 3.11.9 * add changelog entry * remove label from dockerfile as the maintainer's and author's information already mentioned in the setup.py * 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 --------- Co-authored-by: Muhammad Faraz Maqsood Co-authored-by: Muhammad Faraz Maqsood Co-authored-by: Danyal-Faheem --- .gitlab-ci.yml | 1 + ...227_faraz.maqsood_python_upgrade_to_v3_11_9.md | 1 + .../credentials/build/credentials/Dockerfile | 15 +++++++-------- 3 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 changelog.d/20240508_141227_faraz.maqsood_python_upgrade_to_v3_11_9.md 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' 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) diff --git a/tutorcredentials/templates/credentials/build/credentials/Dockerfile b/tutorcredentials/templates/credentials/build/credentials/Dockerfile index 0dc9ca1..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 \ @@ -25,9 +24,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 +38,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 +64,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 +74,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 +88,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 506672e03298495a2bc9b7594a4698aa3db8e2a0 Mon Sep 17 00:00:00 2001 From: Eugene Dyudyunov Date: Thu, 6 Jun 2024 23:55:05 +0300 Subject: [PATCH 5/8] fix: custom image pull and push Alow custom images for pull/push. --- tutorcredentials/plugin.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tutorcredentials/plugin.py b/tutorcredentials/plugin.py index b1bdca3..9a97d07 100644 --- a/tutorcredentials/plugin.py +++ b/tutorcredentials/plugin.py @@ -167,6 +167,18 @@ def _mount_credentials_on_build( (), ) ) +tutor_hooks.Filters.IMAGES_PULL.add_item( + ( + "credentials", + "{{ CREDENTIALS_DOCKER_IMAGE }}", + ) +) +tutor_hooks.Filters.IMAGES_PUSH.add_item( + ( + "credentials", + "{{ CREDENTIALS_DOCKER_IMAGE }}", + ) +) ######################################## From e11277690969693a0241dd37188df539b16b8855 Mon Sep 17 00:00:00 2001 From: Eugene Dyudyunov Date: Fri, 7 Jun 2024 11:35:25 +0300 Subject: [PATCH 6/8] docs: update the changelog --- changelog.d/20240607_105741_evgen.dyudyunov_fix_image_push.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/20240607_105741_evgen.dyudyunov_fix_image_push.md diff --git a/changelog.d/20240607_105741_evgen.dyudyunov_fix_image_push.md b/changelog.d/20240607_105741_evgen.dyudyunov_fix_image_push.md new file mode 100644 index 0000000..8e0704a --- /dev/null +++ b/changelog.d/20240607_105741_evgen.dyudyunov_fix_image_push.md @@ -0,0 +1 @@ +- [BugFix] Fix custom image pull/push. (by @dyudyunov) From 0b959bc6e37f65869a9ce63693afd0192c8ef171 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Fri, 7 Jun 2024 22:08:21 +0500 Subject: [PATCH 7/8] feat: upgrade to redwood --- changelog.d/20240607_220730_faraz.maqsood_redwood.md | 1 + setup.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 changelog.d/20240607_220730_faraz.maqsood_redwood.md diff --git a/changelog.d/20240607_220730_faraz.maqsood_redwood.md b/changelog.d/20240607_220730_faraz.maqsood_redwood.md new file mode 100644 index 0000000..b63f78c --- /dev/null +++ b/changelog.d/20240607_220730_faraz.maqsood_redwood.md @@ -0,0 +1 @@ +- 💥[Feature] Upgrade to Redwood. (by @Faraz32123) diff --git a/setup.py b/setup.py index 39f8be8..9cdead3 100644 --- a/setup.py +++ b/setup.py @@ -43,8 +43,8 @@ def load_about(): packages=find_packages(exclude=["tests*"]), include_package_data=True, python_requires=">=3.8", - install_requires=["tutor>=17.0.0,<18.0.0", "tutor-discovery>=17.0.0,<18.0.0", "tutor-mfe>=17.0.0,<18.0.0"], - extras_require={"dev": ["tutor[dev]>=17.0.0,<18.0.0"]}, + install_requires=["tutor>=18.0.0,<19.0.0", "tutor-discovery>=18.0.0,<19.0.0", "tutor-mfe>=18.0.0,<19.0.0"], + extras_require={"dev": ["tutor[dev]>=18.0.0,<19.0.0"]}, entry_points={"tutor.plugin.v1": ["credentials = tutorcredentials.plugin"]}, classifiers=[ "Development Status :: 5 - Production/Stable", From f9db77793c7816c5fc65974a37765db361f6196d Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Fri, 7 Jun 2024 22:09:42 +0500 Subject: [PATCH 8/8] v18.0.0 --- CHANGELOG.md | 11 +++++++++++ changelog.d/20240114_095941_i_atlas.md | 1 - changelog.d/20240212_115536_regis_pkg_resources.md | 1 - changelog.d/20240220_124357_cmltawt0_mounts.md | 1 - changelog.d/20240507_165604_rohansaeed.md | 1 - ..._141227_faraz.maqsood_python_upgrade_to_v3_11_9.md | 1 - .../20240607_105741_evgen.dyudyunov_fix_image_push.md | 1 - changelog.d/20240607_220730_faraz.maqsood_redwood.md | 1 - tutorcredentials/__about__.py | 2 +- 9 files changed, 12 insertions(+), 8 deletions(-) delete mode 100644 changelog.d/20240114_095941_i_atlas.md delete mode 100644 changelog.d/20240212_115536_regis_pkg_resources.md delete mode 100644 changelog.d/20240220_124357_cmltawt0_mounts.md delete mode 100644 changelog.d/20240507_165604_rohansaeed.md delete mode 100644 changelog.d/20240508_141227_faraz.maqsood_python_upgrade_to_v3_11_9.md delete mode 100644 changelog.d/20240607_105741_evgen.dyudyunov_fix_image_push.md delete mode 100644 changelog.d/20240607_220730_faraz.maqsood_redwood.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 14d25b6..d3e1f9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,17 @@ instructions, because git commits are used to generate release notes: + +## v18.0.0 (2024-06-07) + +- 💥[Feature] Upgrade to Redwood. (by @Faraz32123) +- [Feature] Add `atlas pull` at build-time. (by @omarithawi) +- [Bugfix] Make plugin compatible with Python 3.12 by removing dependency on `pkg_resources`. (by @regisb) +- [Feature] Make it possible to use mounts for a local development. (by @cmltawt0) +- [BugFix] Fix award program certificates error. (by @rohan-saeed) +- 💥[Feature] Upgrade Python version to 3.11.9. (by @Faraz32123) +- [BugFix] Fix custom image pull/push. (by @dyudyunov) + ## v17.0.1 (2024-01-23) diff --git a/changelog.d/20240114_095941_i_atlas.md b/changelog.d/20240114_095941_i_atlas.md deleted file mode 100644 index a34376c..0000000 --- a/changelog.d/20240114_095941_i_atlas.md +++ /dev/null @@ -1 +0,0 @@ -- [Feature] Add `atlas pull` at build-time. (by @omarithawi) diff --git a/changelog.d/20240212_115536_regis_pkg_resources.md b/changelog.d/20240212_115536_regis_pkg_resources.md deleted file mode 100644 index 35b6d20..0000000 --- a/changelog.d/20240212_115536_regis_pkg_resources.md +++ /dev/null @@ -1 +0,0 @@ -- [Bugfix] Make plugin compatible with Python 3.12 by removing dependency on `pkg_resources`. (by @regisb) diff --git a/changelog.d/20240220_124357_cmltawt0_mounts.md b/changelog.d/20240220_124357_cmltawt0_mounts.md deleted file mode 100644 index 0dd64b2..0000000 --- a/changelog.d/20240220_124357_cmltawt0_mounts.md +++ /dev/null @@ -1 +0,0 @@ -- [Feature] Make it possible to use mounts for a local development. (by @cmltawt0) diff --git a/changelog.d/20240507_165604_rohansaeed.md b/changelog.d/20240507_165604_rohansaeed.md deleted file mode 100644 index 518c424..0000000 --- a/changelog.d/20240507_165604_rohansaeed.md +++ /dev/null @@ -1 +0,0 @@ -- [BugFix] Fix award program certificates error. (by @rohan-saeed) 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 deleted file mode 100644 index 073b8e9..0000000 --- a/changelog.d/20240508_141227_faraz.maqsood_python_upgrade_to_v3_11_9.md +++ /dev/null @@ -1 +0,0 @@ -- 💥[Feature] Upgrade Python version to 3.11.9. (by @Faraz32123) diff --git a/changelog.d/20240607_105741_evgen.dyudyunov_fix_image_push.md b/changelog.d/20240607_105741_evgen.dyudyunov_fix_image_push.md deleted file mode 100644 index 8e0704a..0000000 --- a/changelog.d/20240607_105741_evgen.dyudyunov_fix_image_push.md +++ /dev/null @@ -1 +0,0 @@ -- [BugFix] Fix custom image pull/push. (by @dyudyunov) diff --git a/changelog.d/20240607_220730_faraz.maqsood_redwood.md b/changelog.d/20240607_220730_faraz.maqsood_redwood.md deleted file mode 100644 index b63f78c..0000000 --- a/changelog.d/20240607_220730_faraz.maqsood_redwood.md +++ /dev/null @@ -1 +0,0 @@ -- 💥[Feature] Upgrade to Redwood. (by @Faraz32123) diff --git a/tutorcredentials/__about__.py b/tutorcredentials/__about__.py index dba3a77..c6a8b8e 100644 --- a/tutorcredentials/__about__.py +++ b/tutorcredentials/__about__.py @@ -1 +1 @@ -__version__ = "17.0.1" +__version__ = "18.0.0"