From 66e8ddb6849dee052807e7b85687a344dc7b73e0 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Fri, 31 May 2024 17:11:17 +0200 Subject: [PATCH 01/18] [CHANGE] Remove unnecessary bootstrap classes from the dashboard --- .../authentication/templates/authentication/dashboard.html | 2 +- .../templates/authentication/dashboard_characters.html | 2 +- .../templates/authentication/dashboard_groups.html | 2 +- .../framework/templates/framework/dashboard/widget-title.html | 2 +- allianceauth/optimer/templates/optimer/dashboard.ops.html | 2 +- .../templates/allianceauth/admin-status/esi_check.html | 2 +- .../templates/allianceauth/admin-status/overview.html | 4 ++-- .../timerboard/templates/timerboard/dashboard.timers.html | 2 +- docs/development/custom/framework/templates.md | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/allianceauth/authentication/templates/authentication/dashboard.html b/allianceauth/authentication/templates/authentication/dashboard.html index af1ece0d..640f2691 100644 --- a/allianceauth/authentication/templates/authentication/dashboard.html +++ b/allianceauth/authentication/templates/authentication/dashboard.html @@ -7,7 +7,7 @@ {% translate "Dashboard" %} {% endblock %} {% block content %} -
+
{% for dash in views %} {{ dash | safe }} {% endfor %} diff --git a/allianceauth/authentication/templates/authentication/dashboard_characters.html b/allianceauth/authentication/templates/authentication/dashboard_characters.html index 7021ba46..68b046a8 100644 --- a/allianceauth/authentication/templates/authentication/dashboard_characters.html +++ b/allianceauth/authentication/templates/authentication/dashboard_characters.html @@ -1,5 +1,5 @@ {% load i18n %} -
+
{% translate "Characters" as widget_title %} diff --git a/allianceauth/authentication/templates/authentication/dashboard_groups.html b/allianceauth/authentication/templates/authentication/dashboard_groups.html index 270fcb76..6191ed23 100644 --- a/allianceauth/authentication/templates/authentication/dashboard_groups.html +++ b/allianceauth/authentication/templates/authentication/dashboard_groups.html @@ -1,5 +1,5 @@ {% load i18n %} -
+
{% translate "Membership" as widget_title %} diff --git a/allianceauth/framework/templates/framework/dashboard/widget-title.html b/allianceauth/framework/templates/framework/dashboard/widget-title.html index fdc11845..f6c0c855 100644 --- a/allianceauth/framework/templates/framework/dashboard/widget-title.html +++ b/allianceauth/framework/templates/framework/dashboard/widget-title.html @@ -1,7 +1,7 @@ {#Usage:#} {# {% include "framework/dashboard/widget-title.html" with title="Foobar" %}#} -
+

{{ title }}

diff --git a/allianceauth/optimer/templates/optimer/dashboard.ops.html b/allianceauth/optimer/templates/optimer/dashboard.ops.html index cf990ec4..a406a76f 100644 --- a/allianceauth/optimer/templates/optimer/dashboard.ops.html +++ b/allianceauth/optimer/templates/optimer/dashboard.ops.html @@ -1,7 +1,7 @@ {% load i18n %} {% load evelinks %} -
+
{% translate "Upcoming Fleets" as widget_title %} diff --git a/allianceauth/templates/allianceauth/admin-status/esi_check.html b/allianceauth/templates/allianceauth/admin-status/esi_check.html index 3b8393b9..cea4ef19 100644 --- a/allianceauth/templates/allianceauth/admin-status/esi_check.html +++ b/allianceauth/templates/allianceauth/admin-status/esi_check.html @@ -1,5 +1,5 @@ {% load i18n %} -
+

{% translate 'Your Server received an ESI error response code of ' %}?


diff --git a/allianceauth/templates/allianceauth/admin-status/overview.html b/allianceauth/templates/allianceauth/admin-status/overview.html index 23e4c026..17925aae 100644 --- a/allianceauth/templates/allianceauth/admin-status/overview.html +++ b/allianceauth/templates/allianceauth/admin-status/overview.html @@ -2,7 +2,7 @@ {% load humanize %} {% if notifications %} -
+
{% translate "Alliance Auth Notifications" as widget_title %} @@ -46,7 +46,7 @@
{% endif %} -
+
diff --git a/allianceauth/timerboard/templates/timerboard/dashboard.timers.html b/allianceauth/timerboard/templates/timerboard/dashboard.timers.html index d512e483..cf8c7916 100644 --- a/allianceauth/timerboard/templates/timerboard/dashboard.timers.html +++ b/allianceauth/timerboard/templates/timerboard/dashboard.timers.html @@ -1,7 +1,7 @@ {% load i18n %} {% load evelinks %} -
+
{% translate "Upcoming Timers" as widget_title %} diff --git a/docs/development/custom/framework/templates.md b/docs/development/custom/framework/templates.md index b7581a8c..88157353 100644 --- a/docs/development/custom/framework/templates.md +++ b/docs/development/custom/framework/templates.md @@ -35,7 +35,7 @@ To ensure the dashboard widgets have a unified style, we provide a template part To use it, you can use the following code in your dashboard widget template: ```django -
+
{% translate "My Widget Title" as widget_title %} From 069352fb0f979d0b556aaff388c464139aa930ee Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Sat, 1 Jun 2024 12:01:44 +0200 Subject: [PATCH 02/18] [FIX] Switch to bottom margin instead of top/bottom padding This is the much more commonly used approach. --- .../templates/authentication/dashboard_characters.html | 2 +- .../templates/authentication/dashboard_groups.html | 2 +- allianceauth/optimer/templates/optimer/dashboard.ops.html | 2 +- .../templates/allianceauth/admin-status/esi_check.html | 2 +- .../templates/allianceauth/admin-status/overview.html | 4 ++-- .../timerboard/templates/timerboard/dashboard.timers.html | 2 +- docs/development/custom/framework/templates.md | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/allianceauth/authentication/templates/authentication/dashboard_characters.html b/allianceauth/authentication/templates/authentication/dashboard_characters.html index 68b046a8..3560210f 100644 --- a/allianceauth/authentication/templates/authentication/dashboard_characters.html +++ b/allianceauth/authentication/templates/authentication/dashboard_characters.html @@ -1,5 +1,5 @@ {% load i18n %} -
+
{% translate "Characters" as widget_title %} diff --git a/allianceauth/authentication/templates/authentication/dashboard_groups.html b/allianceauth/authentication/templates/authentication/dashboard_groups.html index 6191ed23..d7d3c3b7 100644 --- a/allianceauth/authentication/templates/authentication/dashboard_groups.html +++ b/allianceauth/authentication/templates/authentication/dashboard_groups.html @@ -1,5 +1,5 @@ {% load i18n %} -
+
{% translate "Membership" as widget_title %} diff --git a/allianceauth/optimer/templates/optimer/dashboard.ops.html b/allianceauth/optimer/templates/optimer/dashboard.ops.html index a406a76f..b9e1d418 100644 --- a/allianceauth/optimer/templates/optimer/dashboard.ops.html +++ b/allianceauth/optimer/templates/optimer/dashboard.ops.html @@ -1,7 +1,7 @@ {% load i18n %} {% load evelinks %} -
+
{% translate "Upcoming Fleets" as widget_title %} diff --git a/allianceauth/templates/allianceauth/admin-status/esi_check.html b/allianceauth/templates/allianceauth/admin-status/esi_check.html index cea4ef19..9c7f1605 100644 --- a/allianceauth/templates/allianceauth/admin-status/esi_check.html +++ b/allianceauth/templates/allianceauth/admin-status/esi_check.html @@ -23,7 +23,7 @@ console.log("ESI Check: ", JSON.stringify(responseJson, null, 2)); const status = responseJson.status; - if (status != 200) { + if (status !== 200) { elemCode.textContent = status elemMessage.textContent = responseJson.data.error; new bootstrap.Collapse(elemCard, { diff --git a/allianceauth/templates/allianceauth/admin-status/overview.html b/allianceauth/templates/allianceauth/admin-status/overview.html index 17925aae..a8de1aca 100644 --- a/allianceauth/templates/allianceauth/admin-status/overview.html +++ b/allianceauth/templates/allianceauth/admin-status/overview.html @@ -2,7 +2,7 @@ {% load humanize %} {% if notifications %} -
+
{% translate "Alliance Auth Notifications" as widget_title %} @@ -46,7 +46,7 @@
{% endif %} -
+
diff --git a/allianceauth/timerboard/templates/timerboard/dashboard.timers.html b/allianceauth/timerboard/templates/timerboard/dashboard.timers.html index cf8c7916..4b6d9a5a 100644 --- a/allianceauth/timerboard/templates/timerboard/dashboard.timers.html +++ b/allianceauth/timerboard/templates/timerboard/dashboard.timers.html @@ -1,7 +1,7 @@ {% load i18n %} {% load evelinks %} -
+
{% translate "Upcoming Timers" as widget_title %} diff --git a/docs/development/custom/framework/templates.md b/docs/development/custom/framework/templates.md index 88157353..c989e53e 100644 --- a/docs/development/custom/framework/templates.md +++ b/docs/development/custom/framework/templates.md @@ -35,7 +35,7 @@ To ensure the dashboard widgets have a unified style, we provide a template part To use it, you can use the following code in your dashboard widget template: ```django -
+
{% translate "My Widget Title" as widget_title %} From 04f3473ef3717aa04b9edcf72f006e1ee72d21e5 Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Mon, 17 Jun 2024 08:42:39 +0000 Subject: [PATCH 03/18] Optimize Dockerfile --- docker/Dockerfile | 27 +++++++++++++-------------- docker/custom.dockerfile | 6 ++++-- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 8ae60b06..e9d6fbb1 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,21 +9,21 @@ ENV AUTH_HOME=/home/allianceauth # Setup user and directory permissions SHELL ["/bin/bash", "-c"] -RUN groupadd -g 61000 ${AUTH_GROUP} -RUN useradd -g 61000 -l -M -s /bin/false -u 61000 ${AUTH_USER} -RUN mkdir -p ${STATIC_BASE} \ - && chown ${AUTH_USERGROUP} ${STATIC_BASE} \ - && mkdir -p ${AUTH_HOME} \ - && chown ${AUTH_USERGROUP} ${AUTH_HOME} +RUN groupadd -g 61000 ${AUTH_GROUP} && \ + useradd -g 61000 -l -m -s /bin/false -u 61000 ${AUTH_USER} -# Install build dependencies -RUN apt-get update && apt-get upgrade -y && apt-get install -y \ - libmariadb-dev gcc git pkg-config +RUN mkdir -p ${STATIC_BASE}/myauth/static \ + && chown ${AUTH_USERGROUP} ${STATIC_BASE}/myauth/static -# Install python dependencies -RUN pip install --upgrade pip -RUN pip install wheel gunicorn -RUN pip install ${AUTH_PACKAGE} +# Install Build Dependencies +RUN apt-get update \ + && apt-get upgrade -y \ + && apt-get install -y --no-install-recommends libmariadb-dev gcc git pkg-config \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +# Install AA and Dependencies +RUN pip install --no-cache-dir ${AUTH_PACKAGE} gunicorn # Switch to non-root user USER ${AUTH_USER} @@ -33,7 +33,6 @@ WORKDIR ${AUTH_HOME} RUN allianceauth start myauth COPY /allianceauth/project_template/project_name/settings/local.py ${AUTH_HOME}/myauth/myauth/settings/local.py RUN allianceauth update myauth -RUN mkdir -p ${STATIC_BASE}/myauth/static RUN echo 'alias auth="python $AUTH_HOME/myauth/manage.py"' >> ~/.bashrc && \ source ~/.bashrc diff --git a/docker/custom.dockerfile b/docker/custom.dockerfile index 99d11d1b..458ff724 100644 --- a/docker/custom.dockerfile +++ b/docker/custom.dockerfile @@ -1,6 +1,8 @@ ARG AA_DOCKER_TAG FROM $AA_DOCKER_TAG -RUN cd /home/allianceauth +WORKDIR ${AUTH_HOME} + COPY /conf/requirements.txt requirements.txt -RUN pip install -r requirements.txt +RUN --mount=type=cache,target=~/.cache \ + pip install -r requirements.txt From 136438f9c2b168323f4c51bb647e6002c51ebf97 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Sat, 13 Jul 2024 00:31:26 +0200 Subject: [PATCH 04/18] [CHANGE] Center HTTPError messages --- .../templates/allianceauth/error.html | 46 +++++++++++-------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/allianceauth/templates/allianceauth/error.html b/allianceauth/templates/allianceauth/error.html index 5d65c676..3c2280ea 100644 --- a/allianceauth/templates/allianceauth/error.html +++ b/allianceauth/templates/allianceauth/error.html @@ -1,31 +1,37 @@ {% extends "allianceauth/base-bs5.html" %} +{% load theme_tags %} + {% block page_title %} {{ error_title }} {% endblock page_title %} {% block content %} -
- {% include "framework/header/page-header.html" with title=error_title %} +
+
+
+ {% include "framework/header/page-header.html" with title=error_title %} -
- - - - +
+ + + + +
+ +

{{ error_message }}

+
- -

{{ error_message }}

{% endblock content %} From db6f4c91dc86eeeca780497b731d1ca863fa12da Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Mon, 15 Jul 2024 11:00:06 +0000 Subject: [PATCH 05/18] More Checks for System Packages and Configs --- .gitlab-ci.yml | 28 +++---- allianceauth/apps.py | 25 +----- allianceauth/checks.py | 171 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 187 insertions(+), 37 deletions(-) create mode 100644 allianceauth/checks.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41582a43..ba0aa5d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,7 @@ before_script: pre-commit-check: <<: *only-default stage: pre-commit - image: python:3.11-bullseye + image: python:3.11-bookworm # variables: # PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit # cache: @@ -53,7 +53,7 @@ secret_detection: test-3.8-core: <<: *only-default - image: python:3.8-bullseye + image: python:3.8-bookworm script: - tox -e py38-core artifacts: @@ -65,7 +65,7 @@ test-3.8-core: test-3.9-core: <<: *only-default - image: python:3.9-bullseye + image: python:3.9-bookworm script: - tox -e py39-core artifacts: @@ -77,7 +77,7 @@ test-3.9-core: test-3.10-core: <<: *only-default - image: python:3.10-bullseye + image: python:3.10-bookworm script: - tox -e py310-core artifacts: @@ -89,7 +89,7 @@ test-3.10-core: test-3.11-core: <<: *only-default - image: python:3.11-bullseye + image: python:3.11-bookworm script: - tox -e py311-core artifacts: @@ -101,7 +101,7 @@ test-3.11-core: test-3.12-core: <<: *only-default - image: python:3.12-rc-bullseye + image: python:3.12-bookworm script: - tox -e py312-core artifacts: @@ -113,7 +113,7 @@ test-3.12-core: test-3.8-all: <<: *only-default - image: python:3.8-bullseye + image: python:3.8-bookworm script: - tox -e py38-all artifacts: @@ -125,7 +125,7 @@ test-3.8-all: test-3.9-all: <<: *only-default - image: python:3.9-bullseye + image: python:3.9-bookworm script: - tox -e py39-all artifacts: @@ -137,7 +137,7 @@ test-3.9-all: test-3.10-all: <<: *only-default - image: python:3.10-bullseye + image: python:3.10-bookworm script: - tox -e py310-all artifacts: @@ -149,7 +149,7 @@ test-3.10-all: test-3.11-all: <<: *only-default - image: python:3.11-bullseye + image: python:3.11-bookworm script: - tox -e py311-all artifacts: @@ -162,7 +162,7 @@ test-3.11-all: test-3.12-all: <<: *only-default - image: python:3.12-rc-bullseye + image: python:3.12-bookworm script: - tox -e py312-all artifacts: @@ -174,7 +174,7 @@ test-3.12-all: build-test: stage: test - image: python:3.11-bullseye + image: python:3.11-bookworm before_script: - python -m pip install --upgrade pip @@ -193,13 +193,13 @@ build-test: test-docs: <<: *only-default - image: python:3.11-bullseye + image: python:3.11-bookworm script: - tox -e docs deploy_production: stage: deploy - image: python:3.11-bullseye + image: python:3.11-bookworm before_script: - python -m pip install --upgrade pip diff --git a/allianceauth/apps.py b/allianceauth/apps.py index 053f71f8..098f50ba 100644 --- a/allianceauth/apps.py +++ b/allianceauth/apps.py @@ -5,26 +5,5 @@ from django.core.checks import Warning, Error, register class AllianceAuthConfig(AppConfig): name = 'allianceauth' - -@register() -def check_settings(app_configs, **kwargs): - from django.conf import settings - - errors = [] - if hasattr(settings, "SITE_URL"): - if settings.SITE_URL[-1] == "/": - errors.append(Warning( - "'SITE_URL' Has a trailing slash. This may lead to incorrect links being generated by Auth.")) - else: - errors.append(Error( - "No 'SITE_URL' found is settings. This may lead to incorrect links being generated by Auth or Errors in 3rd party modules.")) - if hasattr(settings, "CSRF_TRUSTED_ORIGINS"): - if hasattr(settings, "SITE_URL"): - if settings.SITE_URL not in settings.CSRF_TRUSTED_ORIGINS: - errors.append(Warning( - "'SITE_URL' not found in 'CSRF_TRUSTED_ORIGINS'. Auth may not load pages correctly until this is rectified.")) - else: - errors.append(Error( - "No 'CSRF_TRUSTED_ORIGINS' found is settings, Auth may not load pages correctly until this is rectified")) - - return errors + def ready(self) -> None: + import allianceauth.checks # noqa diff --git a/allianceauth/checks.py b/allianceauth/checks.py new file mode 100644 index 00000000..82ee858c --- /dev/null +++ b/allianceauth/checks.py @@ -0,0 +1,171 @@ +from typing import List +from django import db +from django.core.checks import CheckMessage, Error, register, Warning +from allianceauth.utils.cache import get_redis_client +from django.utils import timezone +from packaging.version import InvalidVersion, Version as Pep440Version +from celery import current_app +from django.conf import settings +from sqlite3.dbapi2 import sqlite_version_info + +""" +A = System Packages +B = Configuration +""" + + +@register() +def django_settings(app_configs, **kwargs) -> List[CheckMessage]: + errors: List[CheckMessage] = [] + if hasattr(settings, "SITE_URL"): + if settings.SITE_URL[-1] == "/": + errors.append(Warning("'SITE_URL' Has a trailing slash. This may lead to incorrect links being generated by Auth.", hint="", id="allianceauth.checks.B005")) + else: + errors.append(Error("No 'SITE_URL' found is settings. This may lead to incorrect links being generated by Auth or Errors in 3rd party modules.", hint="", id="allianceauth.checks.B006")) + + if hasattr(settings, "CSRF_TRUSTED_ORIGINS") and hasattr(settings, "SITE_URL"): + if settings.SITE_URL not in settings.CSRF_TRUSTED_ORIGINS: + errors.append(Warning("'SITE_URL' not found in 'CSRF_TRUSTED_ORIGINS'. Auth may not load pages correctly until this is rectified.", hint="", id="allianceauth.checks.B007")) + else: + errors.append(Error("No 'CSRF_TRUSTED_ORIGINS' found is settings, Auth may not load pages correctly until this is rectified", hint="", id="allianceauth.checks.B008")) + + return errors + + +@register() +def system_package_redis(app_configs, **kwargs) -> List[CheckMessage]: + errors: List[CheckMessage] = [] + try: + redis_version = Pep440Version(get_redis_client().info()['redis_version']) + except InvalidVersion: + errors.append(Warning("Unable to confirm Redis Version")) + return errors + + if redis_version.major == 7 and redis_version.minor == 2 and timezone.now() > timezone.datetime(year=2025, month=8, day=31, tzinfo=timezone.utc): + errors.append(Error(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/", id="allianceauth.checks.A001")) + elif redis_version.major == 7 and redis_version.minor == 0: + errors.append(Warning(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/", id="allianceauth.checks.A002")) + elif redis_version.major == 6 and redis_version.minor == 2: + errors.append(Warning(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/", id="allianceauth.checks.A018")) + elif redis_version.major in [6, 5]: + errors.append(Error(f"Redis {redis_version.public} EOL", hint="https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/", id="allianceauth.checks.A003")) + + return errors + + +@register() +def system_package_mysql(app_configs, **kwargs) -> List[CheckMessage]: + errors: List[CheckMessage] = [] + + for connection in db.connections.all(): + if connection.vendor == "mysql": + try: + mysql_version = Pep440Version(".".join(str(i) for i in connection.mysql_version)) + except InvalidVersion: + errors.append(Warning("Unable to confirm MySQL Version")) + return errors + + # MySQL 8 + if mysql_version.major == 8 and mysql_version.minor == 4 and timezone.now() > timezone.datetime(year=2032, month=4, day=30, tzinfo=timezone.utc): + errors.append(Error(f"MySQL {mysql_version.public} EOL", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A004")) + elif mysql_version.major == 8 and mysql_version.minor == 3: + errors.append(Warning(f"MySQL {mysql_version.public} Non LTS", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A005")) + elif mysql_version.major == 8 and mysql_version.minor == 2: + errors.append(Warning(f"MySQL {mysql_version.public} Non LTS", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A006")) + elif mysql_version.major == 8 and mysql_version.minor == 1: + errors.append(Error(f"MySQL {mysql_version.public} EOL", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A007")) + elif mysql_version.major == 8 and mysql_version.minor == 0 and timezone.now() > timezone.datetime(year=2026, month=4, day=30, tzinfo=timezone.utc): + errors.append(Error(f"MySQL {mysql_version.public} EOL", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A008")) + elif mysql_version.major < 8: # This will also catch Mariadb 5.x + errors.append(Error(f"MySQL or MariaDB {mysql_version.public} EOL", hint="https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/", id="allianceauth.checks.A009")) + return errors + + +@register() +def system_package_mariadb(app_configs, **kwargs) -> List[CheckMessage]: + errors: List[CheckMessage] = [] + + for connection in db.connections.all(): + if connection.vendor == "mysql": # Still to find a way to determine MySQL vs MariaDB + try: + mariadb_version = Pep440Version(".".join(str(i) for i in connection.mysql_version)) + except InvalidVersion: + errors.append(Warning("Unable to confirm MariaDB Version")) + return errors + + # MariaDB 11 + if mariadb_version.major == 11 and mariadb_version.minor == 4 and timezone.now() > timezone.datetime(year=2029, month=5, day=19, tzinfo=timezone.utc): + errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A010")) + elif mariadb_version.major == 11 and mariadb_version.minor == 2: + errors.append(Warning(f"MariaDB {mariadb_version.public} Non LTS", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A018")) + if timezone.now() > timezone.datetime(year=2024, month=11, day=21, tzinfo=timezone.utc): + errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A011")) + elif mariadb_version.major == 11 and mariadb_version.minor == 1: + errors.append(Warning(f"MariaDB {mariadb_version.public} Non LTS", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A019")) + if timezone.now() > timezone.datetime(year=2024, month=8, day=21, tzinfo=timezone.utc): + errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A012")) + elif mariadb_version.major == 11 and mariadb_version.minor in [0, 3]: # Demote versions down here once EOL + errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config.", id="allianceauth.checks.A013")) + + # MariaDB 10 + elif mariadb_version.major == 10 and mariadb_version.minor == 11 and timezone.now() > timezone.datetime(year=2028, month=2, day=10, tzinfo=timezone.utc): + errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config.", id="allianceauth.checks.A014")) + elif mariadb_version.major == 10 and mariadb_version.minor == 6 and timezone.now() > timezone.datetime(year=2026, month=7, day=6, tzinfo=timezone.utc): + errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A0015")) + elif mariadb_version.major == 10 and mariadb_version.minor == 5 and timezone.now() > timezone.datetime(year=2025, month=6, day=24, tzinfo=timezone.utc): + errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A016")) + elif mariadb_version.major == 10 and mariadb_version.minor in [0, 1, 2, 3, 4, 7, 9, 10]: # Demote versions down here once EOL + errors.append(Error(f"MariaDB {mariadb_version.public} EOL", hint="https://mariadb.org/download/?t=repo-config", id="allianceauth.checks.A017")) + + return errors + + +@register() +def system_package_sqlite(app_configs, **kwargs) -> List[CheckMessage]: + errors: List[CheckMessage] = [] + for connection in db.connections.all(): + if connection.vendor == "sqlite": + try: + sqlite_version = Pep440Version(".".join(str(i) for i in sqlite_version_info)) + except InvalidVersion: + errors.append(Warning("Unable to confirm SQLite Version")) + return errors + if sqlite_version.major == 3 and sqlite_version.minor < 27: + errors.append(Error(f"SQLite {sqlite_version.public} Unsupported by Django", hint="https://pkgs.org/download/sqlite3", id="allianceauth.checks.A020")) + return errors + + +@register() +def sql_settings(app_configs, **kwargs) -> List[CheckMessage]: + errors: List[CheckMessage] = [] + for connection in db.connections.all(): + if connection.vendor == "mysql": + if connection.settings_dict["OPTIONS"]["charset"] != "utf8mb4": + errors.append(Error("SQL Charset is not set correctly", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001")) + # This hasn't actually been set on AA yet + # if connection.settings_dict["OPTIONS"]["charset"] != "utf8mb4_unicode_ci": + # errors.append(Error("SQL Collation is not set correctly", hint="", id="allianceauth.checks.B002")) + # if connection.vendor == "sqlite": + + return errors + + +@register() +def celery_settings(app_configs, **kwargs) -> List[CheckMessage]: + errors: List[CheckMessage] = [] + if current_app.conf.broker_transport_options != {'priority_steps': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 'queue_order_strategy': 'priority'}: + errors.append(Error("Celery Priorities are not set correctly", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/8861ec0a61790eca0261f1adc1cc04ca5f243cbc", id="allianceauth.checks.B003")) + + if current_app.conf.broker_connection_retry_on_startup != True: + errors.append(Error("Celery broker_connection_retry_on_startup not set correctly", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/380c41400b535447839e5552df2410af35a75280", id="allianceauth.checks.B004")) + return errors + + +# IDEAS + +# Any other celery things weve manually changed over the years +# I'd be happy to add Community App checks, old versions the owners dont want to support etc. + + +# Check Default Collation on DB +# Check Charset Collation on all tables From b6149979aac331df5b522b4d5a12e05d8f395ab4 Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Mon, 15 Jul 2024 11:00:26 +0000 Subject: [PATCH 06/18] Analytics --- allianceauth/analytics/tasks.py | 37 ++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/allianceauth/analytics/tasks.py b/allianceauth/analytics/tasks.py index 02a812a7..cc9ef160 100644 --- a/allianceauth/analytics/tasks.py +++ b/allianceauth/analytics/tasks.py @@ -101,11 +101,38 @@ def analytics_daily_stats(): event_type='Stats') for appconfig in apps.get_app_configs(): - analytics_event(namespace='allianceauth.analytics', - task='send_extension_stats', - label=appconfig.label, - value=1, - event_type='Stats') + if appconfig.label in [ + "django_celery_beat", + "bootstrapform", + "messages", + "sessions", + "auth", + "staticfiles", + "users", + "addons", + "admin", + "humanize", + "contenttypes", + "sortedm2m", + "django_bootstrap5", + "tokens", + "authentication", + "services", + "framework", + "notifications" + "eveonline", + "navhelper", + "analytics", + "menu", + "theme" + ]: + pass + else: + analytics_event(namespace='allianceauth.analytics', + task='send_extension_stats', + label=appconfig.label, + value=1, + event_type='Stats') @shared_task() From 2802ed03a5a50ac9843a43209a7116137456a7dc Mon Sep 17 00:00:00 2001 From: Joel Falknau Date: Mon, 15 Jul 2024 21:22:58 +1000 Subject: [PATCH 07/18] Add Celery to classifiers --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 3045997f..a2568a40 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,6 +18,7 @@ authors = [ requires-python = ">=3.8" classifiers = [ "Environment :: Web Environment", + "Framework :: Celery", "Framework :: Django", "Framework :: Django :: 4.2", "Intended Audience :: Developers", From e416ab8ff2cd1c3a3a3c10aaaf49f19d95df73d1 Mon Sep 17 00:00:00 2001 From: Joel Falknau Date: Mon, 15 Jul 2024 21:25:00 +1000 Subject: [PATCH 08/18] Version Bump 4.2.0 --- allianceauth/__init__.py | 2 +- docker/.env.example | 2 +- docker/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/allianceauth/__init__.py b/allianceauth/__init__.py index ee05a338..520036f5 100644 --- a/allianceauth/__init__.py +++ b/allianceauth/__init__.py @@ -5,7 +5,7 @@ manage online service access. # This will make sure the app is always imported when # Django starts so that shared_task will use this app. -__version__ = '4.1.0' +__version__ = '4.2.0' __title__ = 'Alliance Auth' __url__ = 'https://gitlab.com/allianceauth/allianceauth' NAME = f'{__title__} v{__version__}' diff --git a/docker/.env.example b/docker/.env.example index ea7373ea..5f745177 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -1,7 +1,7 @@ PROTOCOL=https:// AUTH_SUBDOMAIN=%AUTH_SUBDOMAIN% DOMAIN=%DOMAIN% -AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.1.0 +AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.2.0 # Nginx Proxy Manager PROXY_HTTP_PORT=80 diff --git a/docker/Dockerfile b/docker/Dockerfile index e9d6fbb1..db9cfeb2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ FROM python:3.11-slim -ARG AUTH_VERSION=v4.1.0 +ARG AUTH_VERSION=v4.2.0 ARG AUTH_PACKAGE=allianceauth==${AUTH_VERSION} ENV AUTH_USER=allianceauth ENV AUTH_GROUP=allianceauth From 7099b1946da1979c7612171cc16eb71b9bde8dfb Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Mon, 15 Jul 2024 12:18:47 +0000 Subject: [PATCH 09/18] More Detail on the SQL charset check --- allianceauth/checks.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/allianceauth/checks.py b/allianceauth/checks.py index 82ee858c..057efd36 100644 --- a/allianceauth/checks.py +++ b/allianceauth/checks.py @@ -140,11 +140,19 @@ def sql_settings(app_configs, **kwargs) -> List[CheckMessage]: errors: List[CheckMessage] = [] for connection in db.connections.all(): if connection.vendor == "mysql": - if connection.settings_dict["OPTIONS"]["charset"] != "utf8mb4": - errors.append(Error("SQL Charset is not set correctly", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001")) + try: + if connection.settings_dict["OPTIONS"]["charset"] != "utf8mb4": + errors.append(Error(f"SQL Charset is not set to utf8mb4 DB:{connection.alias}", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001")) + except KeyError: + errors.append(Error(f"SQL Charset is not set to utf8mb4 DB:{connection.alias}", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001")) + # This hasn't actually been set on AA yet - # if connection.settings_dict["OPTIONS"]["charset"] != "utf8mb4_unicode_ci": - # errors.append(Error("SQL Collation is not set correctly", hint="", id="allianceauth.checks.B002")) + # try: + # if connection.settings_dict["OPTIONS"]["collation"] != "utf8mb4_unicode_ci": + # errors.append(Error(f"SQL Collation is not set to utf8mb4_unicode_ci DB:{connection.alias}", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001")) + # except KeyError: + # errors.append(Error(f"SQL Collation is not set to utf8mb4_unicode_ci DB:{connection.alias}", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/89be2456fb2d741b86417e889da9b6129525bec8", id="allianceauth.checks.B001")) + # if connection.vendor == "sqlite": return errors From ceb07ebc67b6fa62203641a7a3211157d666ff60 Mon Sep 17 00:00:00 2001 From: Joel Falknau Date: Mon, 15 Jul 2024 22:20:32 +1000 Subject: [PATCH 10/18] Version Bump 4.2.1 --- allianceauth/__init__.py | 2 +- docker/.env.example | 2 +- docker/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/allianceauth/__init__.py b/allianceauth/__init__.py index 520036f5..d5b45b35 100644 --- a/allianceauth/__init__.py +++ b/allianceauth/__init__.py @@ -5,7 +5,7 @@ manage online service access. # This will make sure the app is always imported when # Django starts so that shared_task will use this app. -__version__ = '4.2.0' +__version__ = '4.2.1' __title__ = 'Alliance Auth' __url__ = 'https://gitlab.com/allianceauth/allianceauth' NAME = f'{__title__} v{__version__}' diff --git a/docker/.env.example b/docker/.env.example index 5f745177..d3cae276 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -1,7 +1,7 @@ PROTOCOL=https:// AUTH_SUBDOMAIN=%AUTH_SUBDOMAIN% DOMAIN=%DOMAIN% -AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.2.0 +AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.2.1 # Nginx Proxy Manager PROXY_HTTP_PORT=80 diff --git a/docker/Dockerfile b/docker/Dockerfile index db9cfeb2..3ac30998 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ FROM python:3.11-slim -ARG AUTH_VERSION=v4.2.0 +ARG AUTH_VERSION=v4.2.1 ARG AUTH_PACKAGE=allianceauth==${AUTH_VERSION} ENV AUTH_USER=allianceauth ENV AUTH_GROUP=allianceauth From e56caeb22b5a64fa508126b24a703c4823ac641c Mon Sep 17 00:00:00 2001 From: Matteo Ghia <61846068+Maestro-Zacht@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:53:45 +0200 Subject: [PATCH 11/18] fix missing setting in celery --- docker/conf/celery.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/conf/celery.py b/docker/conf/celery.py index f8eb9a86..5129f00a 100644 --- a/docker/conf/celery.py +++ b/docker/conf/celery.py @@ -9,6 +9,10 @@ from django.conf import settings # noqa app = Celery('myauth') +# Automatically try to establish the connection to the AMQP broker on +# Celery startup if it is unavailable. +app.conf.broker_connection_retry_on_startup = True + # Using a string here means the worker don't have to serialize # the configuration object to child processes. app.config_from_object('django.conf:settings') From a012e7df2f2501ba92e11acae192675380443f63 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Fri, 19 Jul 2024 17:32:48 +0200 Subject: [PATCH 12/18] [FIX] Mumble URL in service card --- .../mumble/templates/services/mumble/mumble_service_ctrl.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html b/allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html index ef70a136..e140ee7c 100644 --- a/allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html +++ b/allianceauth/services/modules/mumble/templates/services/mumble/mumble_service_ctrl.html @@ -7,7 +7,9 @@ {% endblock %} {% block url %} - {{ service_url }} + {% if username != '' %} + {{ service_url }} + {% endif %} {% endblock %} {% block user %} From f3ad092ef23e1228010ab032be42e7505410e3bb Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Fri, 19 Jul 2024 19:13:48 +0200 Subject: [PATCH 13/18] [CHANGNE] Clarify that these instructions are for Docker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should also fix the menu item title, hopefully … --- docs/features/services/mumble-docker.md | 2 +- docs/features/services/openfire-docker.md | 2 +- docs/features/services/teamspeak3-docker.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/features/services/mumble-docker.md b/docs/features/services/mumble-docker.md index 36fa52b3..09df8458 100644 --- a/docs/features/services/mumble-docker.md +++ b/docs/features/services/mumble-docker.md @@ -1,4 +1,4 @@ -# Mumble +# Mumble (Docker) An alternate install guide for Mumble using Docker, better suited to an Alliance Auth Docker install diff --git a/docs/features/services/openfire-docker.md b/docs/features/services/openfire-docker.md index f2ecc217..e2947f24 100644 --- a/docs/features/services/openfire-docker.md +++ b/docs/features/services/openfire-docker.md @@ -1,4 +1,4 @@ -# Openfire +# Openfire (Docker) An alternate install guide for Openfire using Docker, better suited to an Alliance Auth Docker install diff --git a/docs/features/services/teamspeak3-docker.md b/docs/features/services/teamspeak3-docker.md index 4bccdfcd..81c2f24d 100644 --- a/docs/features/services/teamspeak3-docker.md +++ b/docs/features/services/teamspeak3-docker.md @@ -1,4 +1,4 @@ -# TeamSpeak 3 +# TeamSpeak 3 (Docker) ## Overview From 3000545c9824c63d12270f1d750180cced4c49a8 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Fri, 26 Jul 2024 23:09:15 +0200 Subject: [PATCH 14/18] [ADD] A bit margin to the notifications --- .../templates/allianceauth/admin-status/overview.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/allianceauth/templates/allianceauth/admin-status/overview.html b/allianceauth/templates/allianceauth/admin-status/overview.html index a8de1aca..47484a57 100644 --- a/allianceauth/templates/allianceauth/admin-status/overview.html +++ b/allianceauth/templates/allianceauth/admin-status/overview.html @@ -13,9 +13,9 @@ {% for notif in notifications %}
  • {% if notif.state == 'opened' %} - {% translate "Open" %} + {% translate "Open" %} {% else %} - {% translate "Closed" %} + {% translate "Closed" %} {% endif %} #{{ notif.iid }} {{ notif.title }}
  • From ff2f60f7f3d6e74a5e45d1de118bcc852a064e3b Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Sun, 4 Aug 2024 18:29:43 +0200 Subject: [PATCH 15/18] [FIX] Avoid `KeyError` in `celery_settings` checks --- allianceauth/checks.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/allianceauth/checks.py b/allianceauth/checks.py index 057efd36..cae9e01b 100644 --- a/allianceauth/checks.py +++ b/allianceauth/checks.py @@ -161,11 +161,19 @@ def sql_settings(app_configs, **kwargs) -> List[CheckMessage]: @register() def celery_settings(app_configs, **kwargs) -> List[CheckMessage]: errors: List[CheckMessage] = [] - if current_app.conf.broker_transport_options != {'priority_steps': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 'queue_order_strategy': 'priority'}: - errors.append(Error("Celery Priorities are not set correctly", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/8861ec0a61790eca0261f1adc1cc04ca5f243cbc", id="allianceauth.checks.B003")) - if current_app.conf.broker_connection_retry_on_startup != True: - errors.append(Error("Celery broker_connection_retry_on_startup not set correctly", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/380c41400b535447839e5552df2410af35a75280", id="allianceauth.checks.B004")) + try: + if current_app.conf.broker_transport_options != {'priority_steps': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 'queue_order_strategy': 'priority'}: + errors.append(Error("Celery Priorities are not set correctly", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/8861ec0a61790eca0261f1adc1cc04ca5f243cbc", id="allianceauth.checks.B003")) + except KeyError: + errors.append(Error("Celery Priorities are not set", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/8861ec0a61790eca0261f1adc1cc04ca5f243cbc", id="allianceauth.checks.B003")) + + try: + if current_app.conf.broker_connection_retry_on_startup != True: + errors.append(Error("Celery broker_connection_retry_on_startup not set correctly", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/380c41400b535447839e5552df2410af35a75280", id="allianceauth.checks.B004")) + except KeyError: + errors.append(Error("Celery broker_connection_retry_on_startup not set", hint="https://gitlab.com/allianceauth/allianceauth/-/commit/380c41400b535447839e5552df2410af35a75280", id="allianceauth.checks.B004")) + return errors From c651da4011e9f1fb57e1fd1d290c618cb36d46b3 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Mon, 5 Aug 2024 03:12:24 +0200 Subject: [PATCH 16/18] [MISC] Improve Redis installation instructions for Ubuntu --- docs/installation/allianceauth.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/installation/allianceauth.md b/docs/installation/allianceauth.md index 9ebae33b..117b8fd7 100644 --- a/docs/installation/allianceauth.md +++ b/docs/installation/allianceauth.md @@ -181,13 +181,17 @@ If you don't plan on running the database on the same server as auth you still n ### Redis and Other Tools -A few extra utilities are also required for installation of packages. +A few extra utilities are also required for the installation of packages. ::::{tabs} :::{group-tab} Ubuntu 2004, 2204 ```shell +curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg +sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list +sudo apt-get update sudo apt-get install unzip git redis-server curl libssl-dev libbz2-dev libffi-dev build-essential pkg-config ``` From 4c629b193f1e843f865ca2dde9603eb12baf7b73 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Mon, 5 Aug 2024 03:21:14 +0200 Subject: [PATCH 17/18] [CHANGE] Redis hint link --- allianceauth/checks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/allianceauth/checks.py b/allianceauth/checks.py index cae9e01b..19b0adec 100644 --- a/allianceauth/checks.py +++ b/allianceauth/checks.py @@ -42,13 +42,13 @@ def system_package_redis(app_configs, **kwargs) -> List[CheckMessage]: return errors if redis_version.major == 7 and redis_version.minor == 2 and timezone.now() > timezone.datetime(year=2025, month=8, day=31, tzinfo=timezone.utc): - errors.append(Error(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/", id="allianceauth.checks.A001")) + errors.append(Error(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A001")) elif redis_version.major == 7 and redis_version.minor == 0: - errors.append(Warning(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/", id="allianceauth.checks.A002")) + errors.append(Warning(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A002")) elif redis_version.major == 6 and redis_version.minor == 2: - errors.append(Warning(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/", id="allianceauth.checks.A018")) + errors.append(Warning(f"Redis {redis_version.public} in Security Support only, Updating Suggested", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A018")) elif redis_version.major in [6, 5]: - errors.append(Error(f"Redis {redis_version.public} EOL", hint="https://redis.io/docs/latest/operate/oss_and_stack/install/install-redis/install-redis-on-linux/", id="allianceauth.checks.A003")) + errors.append(Error(f"Redis {redis_version.public} EOL", hint="https://allianceauth.readthedocs.io/en/latest/installation/allianceauth.html#redis-and-other-tools", id="allianceauth.checks.A003")) return errors From acff3695bcb912c0785992fb1482a150fe13c7f9 Mon Sep 17 00:00:00 2001 From: Joel Falknau Date: Tue, 6 Aug 2024 12:43:06 +1000 Subject: [PATCH 18/18] Version Bump 4.2.2 --- allianceauth/__init__.py | 2 +- docker/.env.example | 2 +- docker/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/allianceauth/__init__.py b/allianceauth/__init__.py index d5b45b35..4edd6674 100644 --- a/allianceauth/__init__.py +++ b/allianceauth/__init__.py @@ -5,7 +5,7 @@ manage online service access. # This will make sure the app is always imported when # Django starts so that shared_task will use this app. -__version__ = '4.2.1' +__version__ = '4.2.2' __title__ = 'Alliance Auth' __url__ = 'https://gitlab.com/allianceauth/allianceauth' NAME = f'{__title__} v{__version__}' diff --git a/docker/.env.example b/docker/.env.example index d3cae276..24c7c446 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -1,7 +1,7 @@ PROTOCOL=https:// AUTH_SUBDOMAIN=%AUTH_SUBDOMAIN% DOMAIN=%DOMAIN% -AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.2.1 +AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.2.2 # Nginx Proxy Manager PROXY_HTTP_PORT=80 diff --git a/docker/Dockerfile b/docker/Dockerfile index 3ac30998..2f4d70e3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ FROM python:3.11-slim -ARG AUTH_VERSION=v4.2.1 +ARG AUTH_VERSION=v4.2.2 ARG AUTH_PACKAGE=allianceauth==${AUTH_VERSION} ENV AUTH_USER=allianceauth ENV AUTH_GROUP=allianceauth