Compare commits

...

3 Commits

Author SHA1 Message Date
dependabot[bot]
06dcf9b874 docker(deps): bump astral-sh/uv
Bumps [astral-sh/uv](https://github.com/astral-sh/uv) from 0.9.14-python3.12-trixie-slim to 0.9.15-python3.12-trixie-slim.
- [Release notes](https://github.com/astral-sh/uv/releases)
- [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/uv/compare/0.9.14...0.9.15)

---
updated-dependencies:
- dependency-name: astral-sh/uv
  dependency-version: 0.9.15-python3.12-trixie-slim
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-03 19:05:33 +00:00
shamoon
ce642409e8 Chore: add some output of social login errors (#11527) 2025-12-03 18:52:49 +00:00
Trenton H
2e5bd02e7e chore: Improves dependabot groups, in particular the Django group not catching everything (#11397) 2025-12-03 09:25:59 -08:00
4 changed files with 75 additions and 13 deletions

View File

@@ -41,30 +41,56 @@ updates:
- "backend"
- "dependencies"
groups:
# Development & CI/CD Tooling
development:
patterns:
- "*pytest*"
- "ruff"
- "mkdocs-material"
- "pre-commit*"
django:
# Django & DRF Ecosystem
django-ecosystem:
patterns:
- "*django*"
- "drf-*"
major-versions:
- "djangorestframework"
- "whitenoise"
- "bleach"
- "jinja2"
# Async, Task Queuing & Caching
async-tasks:
patterns:
- "celery*"
- "channels*"
- "flower"
- "redis"
# Document, PDF, and OCR Processing
document-processing:
patterns:
- "ocrmypdf"
- "pdf2image"
- "pyzbar"
- "zxing-cpp"
- "tika-client"
- "gotenberg-client"
- "python-magic"
- "python-gnupg"
# Data, NLP, and Search
data-nlp-search:
patterns:
- "nltk"
- "scikit-learn"
- "langdetect"
- "rapidfuzz"
- "whoosh-reloaded"
# Utilities (Patch Updates)
utilities-patch:
update-types:
- "major"
small-changes:
- "patch"
# Utilities (Minor Updates)
utilities-minor:
update-types:
- "minor"
- "patch"
exclude-patterns:
- "*django*"
- "drf-*"
pre-built:
patterns:
- psycopg*
- zxing-cpp
# Enable updates for GitHub Actions
- package-ecosystem: "github-actions"
target-branch: "dev"

View File

@@ -32,7 +32,7 @@ RUN set -eux \
# Purpose: Installs s6-overlay and rootfs
# Comments:
# - Don't leave anything extra in here either
FROM ghcr.io/astral-sh/uv:0.9.14-python3.12-trixie-slim AS s6-overlay-base
FROM ghcr.io/astral-sh/uv:0.9.15-python3.12-trixie-slim AS s6-overlay-base
WORKDIR /usr/src/s6

View File

@@ -137,3 +137,25 @@ class CustomSocialAccountAdapter(DefaultSocialAccountAdapter):
user.save()
handle_social_account_updated(None, request, sociallogin)
return user
def on_authentication_error(
self,
request,
provider,
error=None,
exception=None,
extra_context=None,
):
"""
Just log errors and pass them along.
"""
logger.warning(
f"Social authentication error for provider `{provider!s}`: {error!s} ({exception!s})",
)
return super().on_authentication_error(
request,
provider,
error,
exception,
extra_context,
)

View File

@@ -167,3 +167,17 @@ class TestCustomSocialAccountAdapter(TestCase):
self.assertEqual(user.groups.count(), 1)
self.assertTrue(user.groups.filter(name="group1").exists())
self.assertFalse(user.groups.filter(name="group2").exists())
def test_error_logged_on_authentication_error(self):
adapter = get_social_adapter()
request = HttpRequest()
with self.assertLogs("paperless.auth", level="INFO") as log_cm:
adapter.on_authentication_error(
request,
provider="test-provider",
error="Error",
exception="Test authentication error",
)
self.assertTrue(
any("Test authentication error" in message for message in log_cm.output),
)