Conversation
src/sentry/web/client_config.py
Outdated
There was a problem hiding this comment.
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.
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.
@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.
The better way to do this is to:
- Set
SENTRY_SELF_HOSTEDin the downstream apps (getsentryandsingle-tenant) as a no-op duplicate. It sits right next toSENTRY_ONPREMISEbut nothing reads it. - Modify the upstream (i.e.,
sentry, here) to use/readSENTRY_SELF_HOSTEDon the backend (basically this here PR here). - Remove
SENTRY_ONPREMISEfrom the downstreams. - Modify the upstream to set
isSelfHostedas a no-op duplicate on the frontend. - Modify the downstreams to read from
isSelfHosted. - Modify the upstream to read from
isSelfHostedand 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.
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.