Skip to content

Commit a809c10

Browse files
committed
Add a sentinal value to CONTENT_ORIGIN
This helps circumventing issues where plugins rely on the setting, but a command is bypassing the checks. fixes #5510
1 parent 274a07a commit a809c10

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

CHANGES/5510.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed openapi command where plugins relied on CONTENT_ORIGIN to be set.

pulpcore/app/checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@register(deploy=True)
88
def content_origin_check(app_configs, **kwargs):
99
messages = []
10-
if not getattr(settings, "CONTENT_ORIGIN", None):
10+
if getattr(settings, "CONTENT_ORIGIN", "UNREACHABLE") == "UNREACHABLE":
1111
messages.append(
1212
CheckError(
1313
"CONTENT_ORIGIN is a required setting but it was not configured. This may be "

pulpcore/app/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@
248248

249249
DRF_ACCESS_POLICY = {"reusable_conditions": ["pulpcore.app.global_access_conditions"]}
250250

251+
# This is a sentinal value for deploy checks, since we don't want to set a default one.
252+
CONTENT_ORIGIN = "UNREACHABLE"
251253
CONTENT_PATH_PREFIX = "/pulp/content/"
252254

253255
API_APP_TTL = 120 # The heartbeat is called from gunicorn notify (defaulting to 45 sec).

0 commit comments

Comments
 (0)