Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
0acd6cf
Upgrade to Python 3.14 with compatibility fixes
samuelclay Jan 14, 2026
786c9bc
Downgrade to Python 3.13 for Django 4.2 compatibility
samuelclay Jan 14, 2026
e32db95
Add DEFAULT_AUTO_FIELD setting to silence Django warnings
samuelclay Jan 14, 2026
a7d3d5a
Fix test suite for Python 3.13 compatibility (324 tests passing)
samuelclay Jan 14, 2026
d416109
Fix KeyError in monitor errors view when statistics missing
samuelclay Jan 14, 2026
6bbdd48
Remove Twitter API tests - Twitter discontinued their API
samuelclay Jan 14, 2026
0b98467
Fix facebook_disconnect test - create MSocialServices first
samuelclay Jan 14, 2026
33fc558
Fix feed_autocomplete test - handle ES connection errors in CI
samuelclay Jan 14, 2026
cd8ca1e
Fix search tests - handle ES connection errors in CI
samuelclay Jan 14, 2026
5583a1a
Fix more_like_this_post test - handle ES connection errors in CI
samuelclay Jan 14, 2026
bf66786
Add Elasticsearch wait to CI and require ES in tests
samuelclay Jan 14, 2026
160ae69
Remove ARM-specific JVM flags from Elasticsearch config
samuelclay Jan 14, 2026
f3ae94d
Fix Elasticsearch permissions in CI workflow
samuelclay Jan 14, 2026
c107b6c
Use CI-specific docker-compose override for Elasticsearch
samuelclay Jan 14, 2026
4ea955c
Use tmpfs for ES data directory in CI
samuelclay Jan 14, 2026
6cebdb0
Use alternative data path for ES in CI to avoid bind mount permissions
samuelclay Jan 14, 2026
c11c749
Add --keepdb to test command to avoid cleanup error
samuelclay Jan 14, 2026
5958350
Revert MongoDB to 4.0 to match production
samuelclay Jan 14, 2026
0893181
Remove endpoint test improvements checklist
samuelclay Jan 15, 2026
4c8f04f
Merge main into python313, resolve conflicts
samuelclay Jan 23, 2026
8a4a714
Merge main into python313, resolve conflicts
samuelclay Jan 29, 2026
27ca5ea
Resolve merge conflicts from main, keeping re_path for Django 4.x compat
samuelclay Feb 11, 2026
04beb0d
Fix test import conflicts and MongoDB state leak
samuelclay Feb 11, 2026
bbfc6d3
Add py313 Docker image tag for staging deployment
samuelclay Feb 11, 2026
4d55055
Fix briefing urls.py: use re_path instead of removed url()
samuelclay Feb 11, 2026
dc56795
Pin pymongo >=4.9,<4.14 for MongoDB 4.0 + Python 3.13 compat
samuelclay Feb 11, 2026
feebcc2
Add py313 deploy image and fix static asset compression
samuelclay Feb 11, 2026
9bda9bb
Merge main into python313, resolve conflicts with re_path and Django …
samuelclay Feb 20, 2026
af4573c
Merge main into python313, resolve urls.py and search tests conflicts
samuelclay Feb 25, 2026
7db5139
Fix url() -> re_path() in reader urls for Django 4.x compat
samuelclay Feb 26, 2026
d4539cc
Move search tests to tests/ subdirectory
samuelclay Mar 2, 2026
f3a5416
Merge branch 'main' into python313
samuelclay Mar 2, 2026
53997aa
Merge branch 'main' into python313
samuelclay Mar 4, 2026
e3d4df5
Fix merge conflict in briefing urls, keep re_path
samuelclay Mar 5, 2026
42e3323
Fix static page routing, yaml loading, and add comprehensive static p…
samuelclay Mar 7, 2026
41c70a7
Resolve merge conflicts from main into python313
samuelclay Mar 16, 2026
9381db8
Fix pymongo 4.x _collection.count() calls in monitor views
samuelclay Mar 16, 2026
c3168d0
Resolve merge conflicts from main into python313
samuelclay Mar 25, 2026
71ed30e
Resolve merge conflicts from main into python313
samuelclay Mar 27, 2026
a44aec1
Use Python 3.13 Docker image in CI and increase test timeout
samuelclay Mar 27, 2026
5392731
Fix newsletter test: accept 404 for unmatched recipient
samuelclay Mar 27, 2026
3c2a66b
Fix discover-feeds test: URL now requires feed_id argument
samuelclay Mar 27, 2026
294d223
Pinning versions and docker containers for python 3.13
samuelclay Mar 27, 2026
d8c0550
Fix flaky sleep stagger test: reset mock before assertions
samuelclay Mar 27, 2026
75ea401
Migrate Python dependencies to uv lockfile
samuelclay Mar 27, 2026
981b76d
Fix discover-feeds test: handle missing OpenAI key in CI
samuelclay Mar 27, 2026
08ad319
Mock count_similar_feeds in discover-feeds test
samuelclay Mar 27, 2026
9c7c3ad
Retrigger CI with test fixes
samuelclay Mar 27, 2026
123b611
Add workflow_dispatch trigger to CI for manual reruns
samuelclay Mar 27, 2026
57cd555
Remove tweepy/Twitter support for Python 3.13 compatibility
samuelclay Mar 27, 2026
cad2ade
Add NO_CACHE flag support to Docker build targets
samuelclay Mar 27, 2026
ff2f870
Stabilize reader tests in Python 3.13 CI
samuelclay Mar 27, 2026
e184851
Honor git_branch in repo role for staging deploys
samuelclay Mar 27, 2026
935421c
Merge branch 'main' into python313
samuelclay Mar 27, 2026
c3d9a93
Handle mocked similar feeds in discover view
samuelclay Mar 27, 2026
5b819cb
Restore discover feed route name
samuelclay Mar 27, 2026
ed09e27
Fix Python 3.13 notification and feedback test failures
samuelclay Mar 27, 2026
4c5f389
Fix test runner Mongo isolation and Twitter feed rejection
samuelclay Mar 27, 2026
f0d22c1
Merge branch 'main' into python313
samuelclay Mar 27, 2026
f911a40
Fix pytest test database setup
samuelclay Mar 27, 2026
d7dca52
Merge branch 'main' into python313
samuelclay Apr 1, 2026
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
10 changes: 6 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Django Tests
name: "Django Tests"

on:
workflow_dispatch:
push:
branches:
- main
Expand All @@ -22,7 +23,8 @@ jobs:

- name: Pull Docker images
run: |
docker pull newsblur/newsblur_python3:latest || true
docker pull newsblur/newsblur_python3:py313 || true
docker tag newsblur/newsblur_python3:py313 newsblur/newsblur_python3:latest || true
docker pull newsblur/newsblur_node:latest || true
# Pre-pull Elasticsearch with retries to avoid TLS timeout issues
for i in 1 2 3; do
Expand Down Expand Up @@ -54,7 +56,7 @@ jobs:
# Retry docker compose up in case of transient network issues
# Use CI override to remove ARM-specific JVM flags (UseSVE) that crash on x86_64
for i in 1 2 3; do
docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d && break
docker compose -f docker-compose.yml -f docker-compose.ci.yml up -d newsblur_web && break
echo "Retry $i for docker compose up..."
docker compose -f docker-compose.yml -f docker-compose.ci.yml down -v || true
sleep 10
Expand Down Expand Up @@ -95,7 +97,7 @@ jobs:
# Django fails to DROP the test DB because lingering connections (from Sentry SDK
# name resolution failures) keep it open. The CI container is ephemeral anyway.
docker compose -f docker-compose.yml -f docker-compose.ci.yml exec -T newsblur_web python3 manage.py test apps --noinput -v 1 --failfast --keepdb
timeout-minutes: 5
timeout-minutes: 10

- name: Show logs on failure
if: failure()
Expand Down
58 changes: 41 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -328,22 +328,40 @@ lint:
docker exec -t newsblur_web flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=venv,apps/analyzer/archive,utils/archive,vendor,.worktree,.claude

deps:
docker exec -t newsblur_web pip install -U uv
docker exec -t newsblur_web uv pip install -r requirements.txt
@WORKSPACE_NAME=$$(basename "$$(pwd)"); \
if [ -d ".git" ]; then \
CONTAINER_NAME="newsblur_web"; \
else \
CONTAINER_NAME="newsblur_web_$$WORKSPACE_NAME"; \
fi; \
docker exec -t $$CONTAINER_NAME sh -lc "cd /srv/newsblur && UV_PROJECT_ENVIRONMENT=/venv uv sync --locked"; \
docker exec -t $$CONTAINER_NAME sh -lc "cd /srv/newsblur && UV_PROJECT_ENVIRONMENT=/venv uv export --locked --no-hashes -o config/requirements.txt"

jekyll_build:
cd blog && JEKYLL_ENV=production bundle exec jekyll build

# runs tests
# Usage: make test [SCOPE=apps.reader] [ARGS="--noinput -v 2"]
# runs Django tests
# Usage: make test [SCOPE=apps] [ARGS="-v 1 --failfast"]
SCOPE ?= apps
ARGS ?= --noinput -v 1 --failfast
ARGS ?= -v 1 --failfast
test:
docker compose exec -T newsblur_web python3 manage.py test $(SCOPE) --noinput $(ARGS)

# runs Django tests (legacy alias)
# Usage: make test-django [SCOPE=apps.reader] [ARGS="-v 2"]
test-django:
docker compose exec -T newsblur_web python3 manage.py test $(SCOPE) --noinput $(ARGS)

# runs tests with pytest
# Usage: make test-pytest [PYTEST_SCOPE=apps] [PYTEST_ARGS="-v --tb=short"]
PYTEST_SCOPE ?= apps
PYTEST_ARGS ?= -v --tb=short
test-pytest:
docker compose exec -T newsblur_web pytest $(PYTEST_SCOPE) $(PYTEST_ARGS)

# runs river stories tests with query profiling
test-river:
docker compose exec -T newsblur_web python3 manage.py test apps.reader.test_river_stories --noinput -v 2
docker compose exec -T newsblur_web pytest apps/reader/test_river_stories.py -v

keys:
@if [ -f "config/certificates/localhost.pem" ]; then \
Expand Down Expand Up @@ -409,7 +427,7 @@ pull:

local_build_web:
# docker buildx build --load . --file=docker/newsblur_base_image.Dockerfile --tag=newsblur/newsblur_python3
docker build . --file=docker/newsblur_base_image.Dockerfile --tag=newsblur/newsblur_python3
docker build $(if $(filter 1 true yes,$(NO_CACHE)),--no-cache,) . --file=docker/newsblur_base_image.Dockerfile --tag=newsblur/newsblur_python3

# Ensure buildx builder exists for multi-platform builds
# The default 'docker' driver doesn't support multi-platform; we need 'docker-container'
Expand All @@ -426,27 +444,33 @@ buildx_setup:
buildx_clean:
docker buildx prune -f

BUILDX_NO_CACHE_FLAG := $(if $(filter 1 true yes,$(NO_CACHE)),--no-cache,)

build_web: buildx_setup
docker buildx build . --platform linux/amd64,linux/arm64 --file=docker/newsblur_base_image.Dockerfile --tag=newsblur/newsblur_python3
docker buildx build . $(BUILDX_NO_CACHE_FLAG) --platform linux/amd64,linux/arm64 --file=docker/newsblur_base_image.Dockerfile --tag=newsblur/newsblur_python3
build_node: buildx_setup
docker buildx build . --platform linux/amd64,linux/arm64 --file=docker/node/Dockerfile --tag=newsblur/newsblur_node
docker buildx build . $(BUILDX_NO_CACHE_FLAG) --platform linux/amd64,linux/arm64 --file=docker/node/Dockerfile --tag=newsblur/newsblur_node
build_monitor: buildx_setup
docker buildx build . --platform linux/amd64,linux/arm64 --file=docker/monitor/Dockerfile --tag=newsblur/newsblur_monitor
docker buildx build . $(BUILDX_NO_CACHE_FLAG) --platform linux/amd64,linux/arm64 --file=docker/monitor/Dockerfile --tag=newsblur/newsblur_monitor
build_deploy: buildx_setup
docker buildx build . --platform linux/amd64,linux/arm64 --file=docker/newsblur_deploy.Dockerfile --tag=newsblur/newsblur_deploy
docker buildx build . $(BUILDX_NO_CACHE_FLAG) --platform linux/amd64,linux/arm64 --file=docker/newsblur_deploy.Dockerfile --tag=newsblur/newsblur_deploy
build_mcp: buildx_setup
docker buildx build ./newsblur_mcp --platform linux/amd64,linux/arm64 --file=newsblur_mcp/Dockerfile --tag=newsblur/newsblur_mcp
docker buildx build ./newsblur_mcp $(BUILDX_NO_CACHE_FLAG) --platform linux/amd64,linux/arm64 --file=newsblur_mcp/Dockerfile --tag=newsblur/newsblur_mcp
build: build_web build_node build_monitor build_deploy build_mcp
push_web: buildx_setup
docker buildx build . --push --platform linux/amd64,linux/arm64 --file=docker/newsblur_base_image.Dockerfile --tag=newsblur/newsblur_python3
docker buildx build . $(BUILDX_NO_CACHE_FLAG) --push --platform linux/amd64,linux/arm64 --file=docker/newsblur_base_image.Dockerfile --tag=newsblur/newsblur_python3
push_web_py313: buildx_setup
docker buildx build . $(BUILDX_NO_CACHE_FLAG) --push --platform linux/amd64,linux/arm64 --file=docker/newsblur_base_image.Dockerfile --tag=newsblur/newsblur_python3:py313
push_node: buildx_setup
docker buildx build . --push --platform linux/amd64,linux/arm64 --file=docker/node/Dockerfile --tag=newsblur/newsblur_node
docker buildx build . $(BUILDX_NO_CACHE_FLAG) --push --platform linux/amd64,linux/arm64 --file=docker/node/Dockerfile --tag=newsblur/newsblur_node
push_monitor: buildx_setup
docker buildx build . --push --platform linux/amd64,linux/arm64 --file=docker/monitor/Dockerfile --tag=newsblur/newsblur_monitor
docker buildx build . $(BUILDX_NO_CACHE_FLAG) --push --platform linux/amd64,linux/arm64 --file=docker/monitor/Dockerfile --tag=newsblur/newsblur_monitor
push_deploy: buildx_setup
docker buildx build . --push --platform linux/amd64,linux/arm64 --file=docker/newsblur_deploy.Dockerfile --tag=newsblur/newsblur_deploy
docker buildx build . $(BUILDX_NO_CACHE_FLAG) --push --platform linux/amd64,linux/arm64 --file=docker/newsblur_deploy.Dockerfile --tag=newsblur/newsblur_deploy
push_deploy_py313: buildx_setup
docker buildx build . $(BUILDX_NO_CACHE_FLAG) --push --platform linux/amd64,linux/arm64 --file=docker/newsblur_deploy.Dockerfile --build-arg BASE_IMAGE=newsblur/newsblur_python3:py313 --tag=newsblur/newsblur_deploy:py313
push_mcp: buildx_setup
docker buildx build ./newsblur_mcp --push --platform linux/amd64,linux/arm64 --file=newsblur_mcp/Dockerfile --tag=newsblur/newsblur_mcp
docker buildx build ./newsblur_mcp $(BUILDX_NO_CACHE_FLAG) --push --platform linux/amd64,linux/arm64 --file=newsblur_mcp/Dockerfile --tag=newsblur/newsblur_mcp
push_cli:
gh workflow run publish-cli.yml -f dry_run=false
push_images: push_web push_node push_monitor push_deploy push_mcp
Expand Down
3 changes: 2 additions & 1 deletion ansible/group_vars/staging.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
git_branch: mcp-server
git_branch: python313
newsblur_image_tag: py313
disable_consul_services_ie_staging: yes
4 changes: 2 additions & 2 deletions ansible/playbooks/deploy_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
- name: Updating NewsBlur Deploy container
run_once: yes
connection: local
command: chdir={{ newsblur_repo_path }} docker pull newsblur/newsblur_deploy
command: chdir={{ newsblur_repo_path }} docker pull newsblur/newsblur_deploy:{{ newsblur_image_tag | default('latest') }}
tags:
- never
- static

- name: Compressing JS/CSS assets
run_once: yes
connection: local
command: chdir={{ newsblur_repo_path }} docker run --rm -v {{ newsblur_repo_path }}:/srv/newsblur newsblur/newsblur_deploy
command: chdir={{ newsblur_repo_path }} docker run --rm -v {{ newsblur_repo_path }}:/srv/newsblur newsblur/newsblur_deploy:{{ newsblur_image_tag | default('latest') }}
tags:
- never
- static
Expand Down
2 changes: 1 addition & 1 deletion ansible/playbooks/deploy_app_group_static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
- name: Restart newsblur_web container
docker_container:
name: newsblur_web
image: newsblur/newsblur_python3
image: "newsblur/newsblur_python3:{{ newsblur_image_tag | default('latest') }}"
container_default_behavior: no_defaults
pull: yes
env:
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/celery_task/tasks/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
become: yes
docker_container:
name: "{{ item.container_name }}"
image: newsblur/newsblur_python3
image: "newsblur/newsblur_python3:{{ newsblur_image_tag | default('latest') }}"
state: started
pull: yes
restart: "{{ container_restart | default(false) }}"
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/repo/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
git:
repo: https://github.com/samuelclay/NewsBlur.git
dest: /srv/newsblur/
version: main
version: "{{ git_branch }}"
2 changes: 1 addition & 1 deletion ansible/roles/web/tasks/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
throttle: 3
docker_container:
name: newsblur_web
image: newsblur/newsblur_python3
image: "newsblur/newsblur_python3:{{ newsblur_image_tag | default('latest') }}"
container_default_behavior: no_defaults
pull: yes
env:
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/web/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
- name: Update to latest NewsBlur Web Docker image
become: yes
docker_image:
name: newsblur/newsblur_python3
name: "newsblur/newsblur_python3:{{ newsblur_image_tag | default('latest') }}"
source: pull

- include_tasks: container.yml
Expand Down
Empty file added apps/analyzer/tests/__init__.py
Empty file.
File renamed without changes.
Loading
Loading