Skip to content

Commit 11d5850

Browse files
committed
Rename to self-hosted in backend
1 parent 896bae3 commit 11d5850

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

src/sentry/conf/server.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,7 +1921,11 @@ def build_cdc_postgres_init_db_volume(settings):
19211921
STATUS_PAGE_ID = None
19221922
STATUS_PAGE_API_HOST = "statuspage.io"
19231923

1924-
SENTRY_ONPREMISE = True
1924+
# Downstream apps (getsentry, single-tenant) set SENTRY_ONPREMISE, so keep
1925+
# reading from that for now, but in the rest of _this_ codebase we should
1926+
# reference SENTRY_SELF_HOSTED.
1927+
SENTRY_ONPREMISE = True # deprecated, use ...
1928+
SENTRY_SELF_HOSTED = SENTRY_ONPREMISE # ... this instead
19251929

19261930
# Whether we should look at X-Forwarded-For header or not
19271931
# when checking REMOTE_ADDR ip addresses
@@ -2181,7 +2185,7 @@ def build_cdc_postgres_init_db_volume(settings):
21812185
# This should be the url pointing to the JS SDK
21822186
JS_SDK_LOADER_DEFAULT_SDK_URL = ""
21832187

2184-
# block domains which are generally used by spammers -- keep this configurable in case an onpremise
2188+
# block domains which are generally used by spammers -- keep this configurable in case a self-hosted
21852189
# install wants to allow it
21862190
INVALID_EMAIL_ADDRESS_PATTERN = re.compile(r"\@qq\.com$", re.I)
21872191

src/sentry/web/client_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def get_client_config(request=None):
153153
"statuspage": _get_statuspage(),
154154
"messages": [{"message": msg.message, "level": msg.tags} for msg in messages],
155155
"apmSampling": float(settings.SENTRY_FRONTEND_APM_SAMPLING or 0),
156-
"isOnPremise": settings.SENTRY_ONPREMISE,
156+
"isOnPremise": settings.SENTRY_SELF_HOSTED,
157157
"invitesEnabled": settings.SENTRY_ENABLE_INVITES,
158158
"gravatarBaseUrl": settings.SENTRY_GRAVATAR_BASE_URL,
159159
"termsUrl": settings.TERMS_URL,

src/sentry/web/frontend/out.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
class OutView(View):
99
def get(self, request):
10-
if not settings.SENTRY_ONPREMISE:
10+
if not settings.SENTRY_SELF_HOSTED:
1111
raise Http404
1212

1313
install_id = options.get("sentry:install-id")

src/sentry/web/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def get_default_context(request, existing_context=None, team=None):
2020
"URL_PREFIX": options.get("system.url-prefix"),
2121
"SINGLE_ORGANIZATION": settings.SENTRY_SINGLE_ORGANIZATION,
2222
"PLUGINS": plugins,
23-
"ONPREMISE": settings.SENTRY_ONPREMISE,
23+
"ONPREMISE": settings.SENTRY_SELF_HOSTED,
2424
}
2525

2626
if existing_context:

src/sentry_plugins/sessionstack/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def get_config(self, project, **kwargs):
123123
},
124124
]
125125

126-
if settings.SENTRY_ONPREMISE:
126+
if settings.SENTRY_SELF_HOSTED:
127127
configurations.extend(
128128
[
129129
{

0 commit comments

Comments
 (0)