Skip to content

Commit

Permalink
Makes CONTENT_ORIGIN not a required setting
Browse files Browse the repository at this point in the history
  • Loading branch information
dkliban committed Dec 16, 2024
1 parent 486851e commit c5b6f5f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGES/5931.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow CONTENT_ORIGIN to be None. When None, the base_url for Distributions is a relative path.
14 changes: 0 additions & 14 deletions pulpcore/app/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@
from django.core.checks import Error as CheckError, Warning as CheckWarning, register


@register(deploy=True)
def content_origin_check(app_configs, **kwargs):
messages = []
if getattr(settings, "CONTENT_ORIGIN", "UNREACHABLE") == "UNREACHABLE":
messages.append(
CheckError(
"CONTENT_ORIGIN is a required setting but it was not configured. This may be "
"caused by invalid read permissions of the settings file. Note that "
"CONTENT_ORIGIN is set by the installation automatically.",
id="pulpcore.E001",
)
)
return messages


@register(deploy=True)
def secret_key_check(app_configs, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion pulpcore/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
DRF_ACCESS_POLICY = {"reusable_conditions": ["pulpcore.app.global_access_conditions"]}

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

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

0 comments on commit c5b6f5f

Please sign in to comment.