Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Richie to 2.28.0 #243

Merged
merged 5 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ commands:
jobs:
build-back:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
parameters:
site:
type: string
Expand All @@ -43,7 +43,7 @@ jobs:
working_directory: ~/fun/sites/<< parameters.site >>
build-front-production:
docker:
- image: cimg/node:16.15
- image: cimg/node:20.13
parameters:
site:
type: string
Expand All @@ -52,8 +52,8 @@ jobs:
path: ~/fun
- restore_cache:
keys:
- v1-front-dependencies-<< parameters.site >>-{{ checksum "yarn.lock" }}
- v1-front-dependencies-<< parameters.site >>-
- v2-front-dependencies-<< parameters.site >>-{{ checksum "yarn.lock" }}
- v2-front-dependencies-<< parameters.site >>-
- run:
command: yarn install --frozen-lockfile
name: Install frontend dependencies (with locked dependencies)
Expand All @@ -64,13 +64,13 @@ jobs:
command: yarn build-ts-production
name: Build application js (production mode)
- save_cache:
key: v1-front-dependencies-<< parameters.site >>-{{ checksum "yarn.lock" }}
key: v2-front-dependencies-<< parameters.site >>-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
working_directory: ~/fun/sites/<< parameters.site >>/src/frontend/
check-changelog:
docker:
- image: cimg/base:2022.06
- image: cimg/base:current
parameters:
site:
type: string
Expand All @@ -83,7 +83,7 @@ jobs:
working_directory: ~/fun
check-configuration:
machine:
image: ubuntu-2004:202107-02
image: default
parameters:
ci_update_options:
type: string
Expand All @@ -98,7 +98,7 @@ jobs:
docker:
- environment:
RICHIE_SITE: << parameters.site >>
image: cimg/base:2022.06
image: cimg/base:current
parameters:
image_name:
type: string
Expand All @@ -108,8 +108,7 @@ jobs:
- checkout
- generate-version-file:
site: << parameters.site >>
- setup_remote_docker:
version: 19.03.13
- setup_remote_docker
- run:
command: make env.d/aws && make build
name: Build docker images
Expand Down Expand Up @@ -188,7 +187,7 @@ jobs:
working_directory: ~/fun
lint-back:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
parameters:
site:
type: string
Expand Down Expand Up @@ -242,7 +241,7 @@ jobs:
working_directory: ~/fun
lint-front:
docker:
- image: cimg/node:16.15
- image: cimg/node:20.13
parameters:
site:
type: string
Expand All @@ -251,15 +250,15 @@ jobs:
path: ~/fun
- restore_cache:
keys:
- v1-front-dependencies-<< parameters.site >>-{{ checksum "yarn.lock" }}
- v1-front-dependencies-<< parameters.site >>-
- v2-front-dependencies-<< parameters.site >>-{{ checksum "yarn.lock" }}
- v2-front-dependencies-<< parameters.site >>-
- run:
command: yarn lint
name: Lint frontend code with prettier & eslint
working_directory: ~/fun/sites/<< parameters.site >>/src/frontend/
lint-git:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
steps:
- checkout
- run:
Expand All @@ -281,7 +280,7 @@ jobs:
working_directory: ~/fun
no-change:
docker:
- image: cimg/base:2022.06
- image: cimg/base:current
steps:
- run: echo "Everything is up-to-date ✅"
working_directory: ~/fun
Expand All @@ -299,7 +298,7 @@ jobs:
DJANGO_SECRET_KEY: ThisIsAnExampleKeyForTestPurposeOnly
DJANGO_SETTINGS_MODULE: << parameters.site >>.settings
PYTHONPATH: /home/circleci/fun/src/backend
image: cimg/python:3.10
image: cimg/python:3.11
- command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
Expand Down
6 changes: 3 additions & 3 deletions .circleci/src/jobs/@backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-back:
site:
type: string
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
working_directory: ~/fun/sites/<< parameters.site >>
steps:
- checkout:
Expand All @@ -30,7 +30,7 @@ lint-back:
site:
type: string
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
working_directory: ~/fun/sites/<< parameters.site >>/src/backend/
steps:
- checkout:
Expand Down Expand Up @@ -62,7 +62,7 @@ test-back:
site:
type: string
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
environment:
DJANGO_SETTINGS_MODULE: << parameters.site >>.settings
PYTHONPATH: /home/circleci/fun/src/backend
Expand Down
4 changes: 2 additions & 2 deletions .circleci/src/jobs/@frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-front-production:
site:
type: string
docker:
- image: cimg/node:16.15
- image: cimg/node:20.13
working_directory: ~/fun/sites/<< parameters.site >>/src/frontend/
steps:
- checkout:
Expand Down Expand Up @@ -33,7 +33,7 @@ lint-front:
site:
type: string
docker:
- image: cimg/node:16.15
- image: cimg/node:20.13
working_directory: ~/fun/sites/<< parameters.site >>/src/frontend/
steps:
- checkout:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/@project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Check that the git history is clean and complies with our expectations
lint-git:
docker:
- image: cimg/python:3.10
- image: cimg/python:3.11
working_directory: ~/fun
steps:
- checkout
Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ ARG SITE=nau
ARG DOCKER_USER=10000

# ---- base image to inherit from ----
FROM python:3.10-buster as base
FROM python:3.11-bookworm as base

# ---- front-end builder image ----
FROM node:16.15 as front-builder
FROM node:20.13 as front-builder

ARG SITE

Expand Down Expand Up @@ -38,7 +38,11 @@ COPY ./sites/${SITE}/requirements/base.txt /builder/requirements.txt
RUN pip install --upgrade pip

RUN mkdir /install && \
pip install --prefix=/install -r requirements.txt
pip install --prefix=/install -r requirements.txt \
pip install --prefix=/install \
# The django-cms fork includes drillable search feature,
# it should be removed when this feature will be officially released.
git+https://github.com/jbpenrath/django-cms@fun-3.11.6#egg=django-cms
#\
# Use temporarily a forked version of django-cms and djangocms-admin-style
# The django-cms fork includes drillable search feature,
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ services:
image: jwilder/dockerize

node:
image: node:16.15
image: node:20.13
working_dir: /app/src/frontend
user: "${DOCKER_USER:-1000}"
volumes:
Expand Down
4 changes: 4 additions & 0 deletions sites/nau/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ Versioning](https://semver.org/spec/v2.0.0.html).
### Fixed

- 🌐(i18n) override translations to remove "Richie news" from blogpost badges
- 🚨(pylint) fix pylint errors on the backend

## [1.25.0] - 2024-05-13

### Changed

- 👷(s3) replace s3cmd with awscli, that is more speedy
- 💚(circleci) upgrade circleci build
- 👷(docker) upgrade nodejs and python
- ⬆️(nau) upgrade richie to v2.28.0

## [1.24.0] - 2024-05-10

Expand Down
20 changes: 10 additions & 10 deletions sites/nau/requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
boto3==1.28.9
django-configurations==2.4.1
boto3==1.34.109
django-configurations==2.5.1
# Superior versions of django-storages are not compatible with
# ManifestStaticFilesStorage
django-storages==1.13.2
dockerflow==2022.8.0
gunicorn==20.1.0
psycopg2-binary==2.9.6
richie==2.24.1
requests==2.31.0
sentry-sdk==1.28.1
django-storages==1.14.3
dockerflow==2024.4.2
factory-boy==3.3.0
gunicorn==22.0.0
psycopg2-binary==2.9.9
richie==2.28.0
sentry-sdk==2.2.1
mysqlclient==2.1.1
# Remove django-cms dep when upgrading to richie 2.25.0
django-cms>=3.11.0,<4.0.0
# django-cms>=3.11.0,<4.0.0
# Plugins
djangocms-snippet==3.1.1
23 changes: 11 additions & 12 deletions sites/nau/requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
bandit==1.7.5
black==23.7.0
factory-boy==3.2.1
Faker==13.2.0
flake8==6.0.0
isort==5.12.0
pylint==2.17.4
pylint-django==2.5.3
pytest==7.4.0
pytest-cov==4.1.0
pytest-django==4.5.2
bandit==1.7.8
black==24.4.2
Faker==25.2.0
flake8==7.0.0
isort==5.13.2
pylint==3.2.2
pylint-django==2.5.5
pytest==8.2.1
pytest-cov==5.0.0
pytest-django==4.8.0
raincoat==1.2.4

# Testing html
lxml==4.9.3
lxml==5.2.2
cssselect==1.2.0
1 change: 1 addition & 0 deletions sites/nau/src/backend/base/tests/test_settings.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test cnfpt configuration."""

from unittest import mock

from django.conf import settings
Expand Down
1 change: 1 addition & 0 deletions sites/nau/src/backend/nau/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# pylint: disable=missing-module-docstring
__version__ = "1.26.0"
1 change: 1 addition & 0 deletions sites/nau/src/backend/nau/cache/cache_ttl.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Cache utility for courses.
"""

from datetime import datetime, timedelta
from typing import List

Expand Down
4 changes: 4 additions & 0 deletions sites/nau/src/backend/nau/force_translations.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
NAU translations
"""

from django.utils.translation import gettext_lazy as _

# File where we can include strings to be forcefully changed for NAU
Expand Down
2 changes: 2 additions & 0 deletions sites/nau/src/backend/nau/help_desk/context_processors.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"""
Help Desk header url context processor
"""

from django.conf import settings


# pylint: disable=unused-argument
def help_desk_url_setting(request):
"""
Help Desk header url context processor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Jira Service desk widget context processor
"""

from django.conf import settings


Expand Down
Loading