-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Rename to self-hosted in backend #30556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -153,7 +153,7 @@ def get_client_config(request=None): | |||
"statuspage": _get_statuspage(), | |||
"messages": [{"message": msg.message, "level": msg.tags} for msg in messages], | |||
"apmSampling": float(settings.SENTRY_FRONTEND_APM_SAMPLING or 0), | |||
"isOnPremise": settings.SENTRY_ONPREMISE, | |||
"isOnPremise": settings.SENTRY_SELF_HOSTED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On this PR, maintain key name used by frontend.
ea907ab
to
11d5850
Compare
# reading from that for now, but in the rest of _this_ codebase we should | ||
# reference SENTRY_SELF_HOSTED. | ||
SENTRY_ONPREMISE = True # deprecated, use ... | ||
SENTRY_SELF_HOSTED = SENTRY_ONPREMISE # ... this instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all wrong. I need to actually test this in getsentry
. How do I do that?
The result of this PR will be to always set SENTRY_SELF_HOSTED
to true, regardless of the value of SENTRY_ONPREMISE
in a downstream project. Since SENTRY_SELF_HOSTED
then becomes the config passed out to the frontend, if I merge/deploy this then I will effectively turn SaaS into a self-hosted instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chadwhitacre we can add SENTRY_SELF_HOSTED = False
here https://github.com/getsentry/getsentry/blob/40972e7b6f8c369da2324a42d01196040d53e2ca/getsentry/conf/settings/defaults.py#L29
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The better way to do this is to:
- Set
SENTRY_SELF_HOSTED
in the downstream apps (getsentry
andsingle-tenant
) as a no-op duplicate. It sits right next toSENTRY_ONPREMISE
but nothing reads it. - Modify the upstream (i.e.,
sentry
, here) to use/readSENTRY_SELF_HOSTED
on the backend (basically this here PR here). - Remove
SENTRY_ONPREMISE
from the downstreams. - Modify the upstream to set
isSelfHosted
as a no-op duplicate on the frontend. - Modify the downstreams to read from
isSelfHosted
. - Modify the upstream to read from
isSelfHosted
and removeisOnPremise
.
The crux is that downstreams set the backend SENTRY_FOO
but consume the frontend isFooBar
, while upstreams consume the backend and set the frontend. The right approach looks like this:
backend add downstream
backend add upstream
backend remove upstream
backend remove downstream
frontend add upstream
frontend add downstream
frontend remove downstream
frontend remove upstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've folded this back into getsentry/self-hosted#796. To be continued over there ...
Dismissing my approval until the new strategy is in place
Part of getsentry/self-hosted#796, split out from #30528 by request.
Follow up is #30558.