From 92913ac368f030680f1abb5f2e01c3196c9cf095 Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Wed, 6 Aug 2025 14:08:32 -0300 Subject: [PATCH 1/6] [ci] Remove python3-urllib3, python3-typing-extensions --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85969cfb..c45e1dda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,8 @@ jobs: echo "127.0.0.1 dashboard.openwisp.org api.openwisp.org" | sudo tee -a /etc/hosts # disable metric collection during builds sed -i 's/METRIC_COLLECTION=True/METRIC_COLLECTION=False/' .env + # ERROR: Cannot uninstall urllib3 2.0.7, RECORD file not found. Hint: The package was installed by debian. + sudo apt remove python3-urllib3 python3-typing-extensions sudo pip3 install -r requirements-test.txt - name: QA checks From 2d1b650fd2c91e142d16aafc7aeab0a05d7ab1e4 Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Wed, 6 Aug 2025 14:40:38 -0300 Subject: [PATCH 2/6] [ci] Changed auto-install input from heredoc to printf --- .github/workflows/ci.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c45e1dda..848acaaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,11 +38,8 @@ jobs: id: auto_install_edge if: ${{ !cancelled() && steps.deps.conclusion == 'success' }} run: | - (sudo -E ./deploy/auto-install.sh < Date: Wed, 6 Aug 2025 16:38:57 -0300 Subject: [PATCH 3/6] [deps] Upgraded openssl and postfix (prev versions yanked) --- images/openwisp_postfix/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/openwisp_postfix/Dockerfile b/images/openwisp_postfix/Dockerfile index 52d685c9..42bf703c 100644 --- a/images/openwisp_postfix/Dockerfile +++ b/images/openwisp_postfix/Dockerfile @@ -2,11 +2,11 @@ FROM alpine:3.22 WORKDIR /opt/openwisp/ RUN apk add --no-cache --upgrade \ - openssl~=3.5.0-r0 \ + openssl~=3.5.1-r0 \ cyrus-sasl~=2.1.28-r8 \ cyrus-sasl-login~=2.1.28-r8 && \ apk add --no-cache \ - postfix~=3.10.2-r0 \ + postfix~=3.10.3-r0 \ rsyslog~=8.2410.0-r1 \ tzdata~=2025b-r0 && \ rm -rf /tmp/* /var/cache/apk/* From 526057a52b95a677519414e2f5b90c1ea02b2da3 Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Wed, 6 Aug 2025 18:03:23 -0300 Subject: [PATCH 4/6] [deps] Updated nginx to nginx:1.29.0-alpine --- images/openwisp_nginx/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/images/openwisp_nginx/Dockerfile b/images/openwisp_nginx/Dockerfile index 60f7d9f1..aed47575 100644 --- a/images/openwisp_nginx/Dockerfile +++ b/images/openwisp_nginx/Dockerfile @@ -1,10 +1,10 @@ -FROM nginx:1.27.5-alpine +FROM nginx:1.29.0-alpine RUN apk add --update --no-cache \ - openssl~=3.3.3-r0 \ - py3-pip~=24.3.1-r0 \ - certbot~=3.0.1-r0 \ - certbot-nginx~=3.0.1-r0 && \ + openssl~=3.5.1-r0 \ + py3-pip~=25.1.1-r0 \ + certbot~=4.0.0-r0 \ + certbot-nginx~=4.0.0-r1 && \ rm -rf /var/cache/apk/* /tmp/* WORKDIR /etc/nginx/ From 1702f65aaefa184ab3a93c5aefd26ccc342f767d Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Wed, 6 Aug 2025 19:15:02 -0300 Subject: [PATCH 5/6] [chore:fix] Fixed new collectstatic implementation #246 The new collectstatic script was missing the __main__ idiom. Related to #246 --- images/common/collectstatic.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/images/common/collectstatic.py b/images/common/collectstatic.py index a0cbc036..373b773f 100644 --- a/images/common/collectstatic.py +++ b/images/common/collectstatic.py @@ -29,7 +29,7 @@ def get_pip_freeze_hash(): def run_collectstatic(): try: subprocess.run( - ["python", "manage.py", "collectstatic", "--noinput"], check=True + [sys.executable, "manage.py", "collectstatic", "--noinput"], check=True ) except subprocess.CalledProcessError as e: print(f"Error running 'collectstatic': {e}", file=sys.stderr) @@ -43,9 +43,13 @@ def main(): redis_connection = redis.Redis.from_url(settings.CACHES["default"]["LOCATION"]) current_pip_hash = get_pip_freeze_hash() cached_pip_hash = redis_connection.get("pip_freeze_hash") - if cached_pip_hash is None or cached_pip_hash.decode() != current_pip_hash: + if not cached_pip_hash or cached_pip_hash.decode() != current_pip_hash: print("Changes in Python dependencies detected, running collectstatic...") run_collectstatic() redis_connection.set("pip_freeze_hash", current_pip_hash) else: print("No changes in Python dependencies, skipping collectstatic...") + + +if __name__ == "__main__": + main() From ff3105e094d0a6c706ae37f4a55f2faa7a884d63 Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Wed, 6 Aug 2025 19:47:25 -0300 Subject: [PATCH 6/6] [ci] Temporarily disable auto_install_edge The latest edge image is broken. --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 848acaaf..82e19ed6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,9 +37,10 @@ jobs: - name: Use the auto-install script to start containers with edge images id: auto_install_edge if: ${{ !cancelled() && steps.deps.conclusion == 'success' }} - run: | - printf "edge\n./.env\n" | sudo -E ./deploy/auto-install.sh \ - || (docker compose --file /opt/openwisp/docker-openwisp/docker-compose.yml logs && exit 1) + run: echo "first auto-install.sh run temporarily disabled" + # run: | + # printf "edge\n./.env\n" | sudo -E ./deploy/auto-install.sh \ + # || (docker compose --file /opt/openwisp/docker-openwisp/docker-compose.yml logs && exit 1) - name: Build Images id: build_images