feat: upgrade to quince

This commit is contained in:
Zia Fazal 2023-11-10 11:39:46 +05:00 committed by Régis Behmo
parent 073fe08a04
commit 52af6adb57
10 changed files with 28 additions and 27 deletions

View File

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

View File

@ -19,6 +19,13 @@ instructions, because git commits are used to generate release notes:
<!-- scriv-insert-here --> <!-- scriv-insert-here -->
<a id='changelog-17.0.0'></a>
## v17.0.0 (2023-12-09)
- 💥 [Feature] Upgrade to Quince. (by @ziafazal)
- [Bugfix] Fix missing pkg-config during image build. (by @regisb)
- [Feature] Pull translations via `atlas` during Docker build. (by @OmarIthawi)
<a id='changelog-16.0.2'></a> <a id='changelog-16.0.2'></a>
## v16.0.2 (2023-12-09) ## v16.0.2 (2023-12-09)

View File

@ -14,15 +14,9 @@ Then, to enable this plugin, run::
tutor plugins enable discovery tutor plugins enable discovery
You will have to re-generate the environment:: Restart and initialize your platform with::
tutor config save tutor local launch
Then, run migrations::
tutor local init
This last step is unnecessary if you run instead ``tutor local launch``.
Operations Operations
---------- ----------

View File

@ -1 +0,0 @@
- [Bugfix] Fix missing pkg-config during image build. (by @regisb)

View File

@ -1 +0,0 @@
- [Feature] Pull translations via `atlas` during Docker build. (by @OmarIthawi)

View File

@ -34,8 +34,8 @@ setup(
long_description_content_type="text/x-rst", long_description_content_type="text/x-rst",
packages=find_packages(exclude=["tests*"]), packages=find_packages(exclude=["tests*"]),
include_package_data=True, include_package_data=True,
install_requires=["tutor>=16.0.0,<17.0.0"], install_requires=["tutor>=17.0.0,<18.0.0"],
extras_require={"dev": "tutor[dev]>=16.0.0,<17.0.0"}, extras_require={"dev": "tutor[dev]>=17.0.0,<18.0.0"},
python_requires=">=3.8", python_requires=">=3.8",
entry_points={"tutor.plugin.v1": ["discovery = tutordiscovery.plugin"]}, entry_points={"tutor.plugin.v1": ["discovery = tutordiscovery.plugin"]},
classifiers=[ classifiers=[

View File

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

View File

@ -32,6 +32,7 @@ config: t.Dict[str, t.Dict[str, t.Any]] = {
"OAUTH2_KEY_SSO_DEV": "discovery-sso-dev", "OAUTH2_KEY_SSO_DEV": "discovery-sso-dev",
"CACHE_REDIS_DB": "{{ OPENEDX_CACHE_REDIS_DB }}", "CACHE_REDIS_DB": "{{ OPENEDX_CACHE_REDIS_DB }}",
"ATLAS_PULL": False, "ATLAS_PULL": False,
"DEFAULT_PRODUCT_SOURCE_SLUG": "edx",
"EXTRA_PIP_REQUIREMENTS": [], "EXTRA_PIP_REQUIREMENTS": [],
"REPOSITORY": "https://github.com/openedx/course-discovery.git", "REPOSITORY": "https://github.com/openedx/course-discovery.git",
"REPOSITORY_VERSION": "{{ OPENEDX_COMMON_VERSION }}", "REPOSITORY_VERSION": "{{ OPENEDX_COMMON_VERSION }}",

View File

@ -47,6 +47,7 @@ PARLER_LANGUAGES[1][0]["code"] = LANGUAGE_CODE
PARLER_LANGUAGES["default"]["fallbacks"] = [PARLER_DEFAULT_LANGUAGE_CODE] PARLER_LANGUAGES["default"]["fallbacks"] = [PARLER_DEFAULT_LANGUAGE_CODE]
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend" EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
DEFAULT_PRODUCT_SOURCE_SLUG = "{{ DISCOVERY_DEFAULT_PRODUCT_SOURCE_SLUG }}"
EMAIL_HOST = "{{ SMTP_HOST }}" EMAIL_HOST = "{{ SMTP_HOST }}"
EMAIL_PORT = "{{ SMTP_PORT }}" EMAIL_PORT = "{{ SMTP_PORT }}"
EMAIL_HOST_USER = "{{ SMTP_USERNAME }}" EMAIL_HOST_USER = "{{ SMTP_USERNAME }}"

View File

@ -1,10 +1,10 @@
{% if is_buildkit_enabled() %}# syntax=docker/dockerfile:1.4{% endif %} # syntax=docker/dockerfile:1.4
###### Minimal image with base system requirements for most stages ###### Minimal image with base system requirements for most stages
FROM docker.io/ubuntu:20.04 as minimal FROM docker.io/ubuntu:20.04 as minimal
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/var/cache/apt,sharing=locked \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked{% endif %} \ --mount=type=cache,target=/var/lib/apt,sharing=locked \
apt update && \ apt update && \
apt install -y curl git-core gettext language-pack-en python3 python3-dev python3-pip python3-venv \ apt install -y curl git-core gettext language-pack-en python3 python3-dev python3-pip python3-venv \
build-essential libcairo2 libffi-dev libmysqlclient-dev libxml2-dev libxslt-dev libjpeg-dev libssl-dev \ build-essential libcairo2 libffi-dev libmysqlclient-dev libxml2-dev libxslt-dev libjpeg-dev libssl-dev \
@ -31,14 +31,14 @@ ENV DISCOVERY_CFG /openedx/config.yml
RUN python3 -m venv ../venv/ RUN python3 -m venv ../venv/
ENV PATH "/openedx/venv/bin:$PATH" ENV PATH "/openedx/venv/bin:$PATH"
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/setuptools/
# https://pypi.org/project/pip/ # https://pypi.org/project/pip/
# https://pypi.org/project/wheel/ # 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 a recent version of nodejs # Install a recent version of nodejs
RUN pip install nodeenv==1.7.0 RUN pip install nodeenv==1.8.0
# nodejs version picked from https://github.com/openedx/course-discovery/blob/master/Dockerfile # nodejs version picked from https://github.com/openedx/course-discovery/blob/master/Dockerfile
RUN nodeenv /openedx/nodeenv --node=16.14.2 --prebuilt RUN nodeenv /openedx/nodeenv --node=16.14.2 --prebuilt
ENV PATH /openedx/nodeenv/bin:${PATH} ENV PATH /openedx/nodeenv/bin:${PATH}
@ -47,21 +47,21 @@ ENV PATH /openedx/nodeenv/bin:${PATH}
# This is identical to "make production-requirements" but it was split in multiple # This is identical to "make production-requirements" but it was split in multiple
# instructions to benefit from docker image caching # instructions to benefit from docker image caching
# Install base requirements # Install base requirements
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/pip,sharing=shared {% endif %}pip install -r requirements.txt RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install -r requirements.txt
{% for extra_requirement in DISCOVERY_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 DISCOVERY_EXTRA_PIP_REQUIREMENTS %}RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install '{{ extra_requirement }}'
{% endfor %} {% endfor %}
# Install npm, bower requirements # Install npm, bower requirements
ARG NPM_REGISTRY='{{ NPM_REGISTRY }}' ARG NPM_REGISTRY='{{ NPM_REGISTRY }}'
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.npm/,sharing=shared,uid=${APP_USER_ID} {% endif %}npm clean-install --verbose --no-audit --registry=$NPM_REGISTRY --production RUN --mount=type=cache,target=/openedx/.npm/,sharing=shared,uid=${APP_USER_ID} npm clean-install --verbose --no-audit --registry=$NPM_REGISTRY --production
RUN {% if is_buildkit_enabled() %}--mount=type=cache,target=/openedx/.cache/bower,sharing=shared,uid=${APP_USER_ID} {% endif %}./node_modules/.bin/bower install --allow-root --production RUN --mount=type=cache,target=/openedx/.cache/bower,sharing=shared,uid=${APP_USER_ID} ./node_modules/.bin/bower install --allow-root --production
# Install extra requirements # 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/ # 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 server https://pypi.org/project/uWSGI/
uwsgi==2.0.21 uwsgi==2.0.22
{% if DISCOVERY_ATLAS_PULL %} {% if DISCOVERY_ATLAS_PULL %}
# Pull translations. Support the OEP-58 proposal behind a feature flag until it's fully implemented. # Pull translations. Support the OEP-58 proposal behind a feature flag until it's fully implemented.