-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: RemoteConfig logic (decide replacement) #26348
base: master
Are you sure you want to change the base?
Conversation
…nto feat/serverless-decide
# Conflicts: # posthog/migrations/max_migration.txt
Size Change: +30 B (0%) Total Size: 1.11 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated18 snapshot changes in total. 0 added, 18 modified, 0 deleted:
Triggered by this commit. |
# Conflicts: # frontend/__snapshots__/scenes-other-settings--settings-project--dark.png # frontend/__snapshots__/scenes-other-settings--settings-project--light.png # frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--dark.png # frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--light.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--dark.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--light.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--dark.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--light.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--dark.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--light.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--dark.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--light.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--dark.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--light.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--dark.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--light.png # frontend/src/lib/constants.tsx # posthog/migrations/max_migration.txt
📸 UI snapshots have been updated16 snapshot changes in total. 0 added, 16 modified, 0 deleted:
Triggered by this commit. |
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.
Cool stuff
# Conflicts: # posthog/migrations/max_migration.txt
# Conflicts: # posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
# Conflicts: # frontend/__snapshots__/scenes-other-settings--settings-project--dark.png # frontend/__snapshots__/scenes-other-settings--settings-project--light.png # frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--dark.png # frontend/__snapshots__/scenes-other-settings--settings-project-with-replay-features--light.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--dark.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-all-options--light.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--dark.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-password-only--light.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--dark.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-github--light.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--dark.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-google--light.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--dark.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-enforced-saml--light.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--dark.png # frontend/__snapshots__/scenes-other-settings--settings-session-timeout-sso-only--light.png # posthog/api/site_app.py # posthog/migrations/max_migration.txt # posthog/plugins/site.py # posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr # posthog/urls.py
📸 UI snapshots have been updated16 snapshot changes in total. 0 added, 16 modified, 0 deleted:
Triggered by this commit. |
@@ -257,7 +257,7 @@ | |||
LOGOUT_URL = "/logout" | |||
LOGIN_REDIRECT_URL = "/" | |||
APPEND_SLASH = False | |||
CORS_URLS_REGEX = r"^(/site_app/|/api/(?!early_access_features|surveys|web_experiments).*$)" | |||
CORS_URLS_REGEX = r"^(/site_app/|/array/|/api/(?!early_access_features|surveys|web_experiments).*$)" |
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.
there's a config somewhere in this file iirc to enable gzip for these new endpoints
Problem
Needs #26534
See https://github.com/PostHog/product-internal/pull/680 for more info.
Generally the idea is that the new flags service will replace the "decide" django endpoint with a much more scalable solution. The thing it won't do necessarily is handle the "remote config" side of things which is currently the other main use for decide.
My idea is to generate the "config" parts into a dedicated helper model which takes care of creating this config derived from the various settings allowing us to do a few cool things:
Megaissue here
Changes
This PR is just part 1 - generate the RemoteConfigs as and when they should be, with new endpoints to serve them (endpoints that will eventually be served by the CDN instead).
Follow up work
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
How did you test this code?