🗑️(settings) deprecate SUMMARY_SERVICE_VERSION=1

Add a deprecation warning when SUMMARY_SERVICE_VERSION=1 and
an endpoint is configured meaning summary service is in use.
This commit is contained in:
Florent Chehab
2026-07-09 13:33:25 +02:00
parent 1022780027
commit 2509452c52
2 changed files with 20 additions and 0 deletions
+5
View File
@@ -8,6 +8,11 @@ and this project adheres to
## [Unreleased]
### Changed
- 🗑️(settings) deprecate SUMMARY_SERVICE_VERSION=1
## [1.23.0] - 2026-07-08
### Added
+15
View File
@@ -13,6 +13,7 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
# pylint: disable=too-many-lines
import json
import warnings
from os import path
from socket import gethostbyname, gethostname
@@ -1128,6 +1129,20 @@ class Base(Configuration):
"FILE_UPLOAD_TMP_PATH cannot be the same as FILE_UPLOAD_PATH"
)
if (
cls.SUMMARY_SERVICE_VERSION == 1
and cls.SUMMARY_SERVICE_ENDPOINT is not None
):
warnings.warn(
"SUMMARY_SERVICE_VERSION=1 is deprecated. "
"The legacy v1 API has been removed from the experimental "
"Summary service. Please update your Summary service deployment to "
"the v2 API and set SUMMARY_SERVICE_VERSION=2.",
# We use UserWarning to make sure it shows up in production deployment
UserWarning,
stacklevel=2,
)
# The SENTRY_DSN setting should be available to activate sentry for an environment
if cls.SENTRY_DSN is not None:
sentry_sdk.init(