feat: upgrade to quince

This commit is contained in:
Talha 2023-11-30 22:21:48 +05:00 committed by Régis Behmo
parent cd533f0597
commit c471070e4b
7 changed files with 32 additions and 32 deletions

View File

@ -2,7 +2,7 @@ variables:
TUTOR_PLUGIN: credentials
TUTOR_IMAGES: credentials
TUTOR_PYPI_PACKAGE: tutor-credentials
OPENEDX_RELEASE: palm
OPENEDX_RELEASE: quince
GITHUB_REPO: overhangio/tutor-credentials
TUTOR_EXTRA_ENABLED_PLUGINS: discovery mfe

View File

@ -19,15 +19,18 @@ instructions, because git commits are used to generate release notes:
<!-- scriv-insert-here -->
<a id='changelog-17.0.0'></a>
## v17.0.0 (2023-12-09)
- 💥[Feature] Upgrade to Quince. (by @ Talha-Rizwan)
- [Feature] Add support for the Learner Record MFE. (by @arbrandes)
<a id='changelog-16.1.0'></a>
## v16.1.0 (2023-11-30)
- [Improvement] Added Typing to code, Makefile and test action to the repository and formatted code with Black and isort. (by @CodeWithEmad)
- [Bugfix] Fix build error due to outdated nodeenv. (by @regisb)
- [Bugfix] Added missing default configs that were missed during merge. (by @Faraz32123)
- 💥[Improvement] Simplify plugin settings. As a consequence, many marketing settings are deprecated. If they were useful to you, you can override them using the "credentials-settings-common" patch. (by @regisb)
<a id='changelog-16.0.3'></a>

View File

@ -1,3 +0,0 @@
- [Fix] Broken OAUTH2 configuration variables in production. (by @arbrandes)
- [Fix] Broken development mode. (by @arbrandes)
- [Feature] Add support for the Learner Record MFE. (by @arbrandes)

View File

@ -43,8 +43,8 @@ setup(
packages=find_packages(exclude=["tests*"]),
include_package_data=True,
python_requires=">=3.8",
install_requires=["tutor>=16.0.0,<17.0.0", "tutor-discovery>=16.0.0,<17.0.0", "tutor-mfe>=16.0.0,<17.0.0"],
extras_require={"dev": ["tutor[dev]>=16.0.0,<17.0.0"]},
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"]},
entry_points={"tutor.plugin.v1": ["credentials = tutorcredentials.plugin"]},
classifiers=[
"Development Status :: 5 - Production/Stable",

View File

@ -1 +1 @@
__version__ = "16.1.0"
__version__ = "17.0.0"

View File

@ -69,7 +69,7 @@ def _add_learner_record_mfe(apps: dict[str, MFE_ATTRS_TYPE]) -> dict[str, MFE_AT
apps.update(
{
"learner-record": {
"repository": "https://github.com/openedx/frontend-app-learner-record",
"repository": "https://github.com/openedx/frontend-app-learner-record.git",
"port": 1990,
},
}

View File

@ -1,11 +1,11 @@
{% if is_buildkit_enabled() %}# syntax=docker/dockerfile:1.4{% endif %}
# 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 <lpm0073@gmail.com>"
ENV DEBIAN_FRONTEND=noninteractive
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \
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
@ -16,8 +16,8 @@ ENV LC_ALL en_US.UTF-8
###### Install python with pyenv in /opt/pyenv and create virtualenv in /openedx/venv
FROM minimal as python
# https://github.com/pyenv/pyenv/wiki/Common-build-problems#prerequisites
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked {% endif %}apt update && \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked apt update && \
apt install -y libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
@ -25,9 +25,9 @@ RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,shari
# Install pyenv
# https://www.python.org/downloads/
# https://github.com/pyenv/pyenv/releases
ARG PYTHON_VERSION=3.8.15
ARG PYTHON_VERSION=3.8.18
ENV PYENV_ROOT /opt/pyenv
RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.17 --depth 1
RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.29 --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 && \
git clone $CREDENTIALS_REPOSITORY --branch $CREDENTIALS_VERSION --depth 1 /openedx/credentials
RUN mkdir -p /openedx/credentials
ADD --keep-git-dir=true $CREDENTIALS_REPOSITORY#$CREDENTIALS_VERSION /openedx/credentials
WORKDIR /openedx/credentials
{{ patch("credentials-dockerfile-post-git-checkout") }}
@ -50,8 +50,8 @@ FROM python as python-requirements
ENV PATH /openedx/venv/bin:${PATH}
ENV VIRTUAL_ENV /openedx/venv/
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked {% endif %}apt update \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked apt update \
&& apt install -y software-properties-common libmysqlclient-dev libxmlsec1-dev
# Note that this means that we need to reinstall all requirements whenever there is a
@ -61,25 +61,25 @@ COPY --from=code /openedx/credentials /openedx/credentials
WORKDIR /openedx/credentials
# Install the right version of pip/setuptools
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install \
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==67.7.2 pip==23.1.2. wheel==0.40.0
setuptools==68.2.2 pip==23.2.1. wheel==0.41.2
# Install base requirements
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install -r requirements/production.txt
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install -r requirements/production.txt
# Install extra requirements
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install \
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.2.0 \
django-redis==5.4.0 \
# uwsgi server https://pypi.org/project/uWSGI/
uwsgi==2.0.21
uwsgi==2.0.22
{{ patch("credentials-dockerfile-post-python-requirements") }}
{% for extra_requirement in CREDENTIALS_EXTRA_PIP_REQUIREMENTS %}RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install '{{ extra_requirement }}'
{% for extra_requirement in CREDENTIALS_EXTRA_PIP_REQUIREMENTS %}RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install '{{ extra_requirement }}'
{% endfor %}
###### Install nodejs with nodeenv in /openedx/nodeenv
@ -95,14 +95,14 @@ RUN nodeenv /openedx/nodeenv --node=16.14.0 --prebuilt
ARG NPM_REGISTRY='{{ NPM_REGISTRY }}'
COPY --from=code /openedx/credentials/package.json /openedx/credentials/package.json
WORKDIR /openedx/credentials
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.npm/,sharing=shared {% endif %}npm install --verbose --registry=$NPM_REGISTRY
RUN --mount=type=cache,target=/openedx/.npm/,sharing=shared npm install --verbose --registry=$NPM_REGISTRY
###### Production image with system and python requirements
FROM minimal as production
# Install system requirements
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked {% endif %}apt update \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked apt update \
&& apt install -y libxml2 libmysqlclient-dev mime-support
# From then on, run as unprivileged "app" user