Skip to content

update olposthog#3370

Merged
ChristopherChudzicki merged 1 commit into
mainfrom
cc/update-olposthog
Mar 10, 2026
Merged

update olposthog#3370
ChristopherChudzicki merged 1 commit into
mainfrom
cc/update-olposthog

Conversation

@ChristopherChudzicki
Copy link
Copy Markdown
Contributor

@ChristopherChudzicki ChristopherChudzicki commented Mar 10, 2026

What are the relevant tickets?

Related to #3356

Description (What does it do?)

Updates ol-posthog to include

How can this be tested?

  1. Rebuild web container
  2. Ensure you have POSTHOG_ENABLED=true and POSTHOG_PROJECT_API_KEY. If you want, you can use mine (see script below)
  3. Define some flag in your personal posthog account and
# POSTHOG_ENABLED=True
# (This is not a secret)
# POSTHOG_PROJECT_API_KEY=phc_k26arhw0Wafe79ZDBTqeN3v4Y7dzNS7os9naQPxJhr5
from mitol.olposthog.features import is_enabled

is_enabled('test-flag') # True 
is_enabled('non-existant-flag') # False 
# User-dependent example
is_enabled('redirect-to-learn-dashboard', 'some-user-id-or-just-this-string') # False 
is_enabled('redirect-to-learn-dashboard', None, '3055af80-6c17-4e98-a19c-af5314
   ...: 564275') # True 

@github-actions
Copy link
Copy Markdown

OpenAPI Changes

Show/hide ## Changes for v0.yaml:
## Changes for v0.yaml:


## Changes for v1.yaml:


## Changes for v2.yaml:


Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

Comment thread main/settings.py
import_settings_modules(
"mitol.authentication.settings.djoser_settings",
"mitol.payment_gateway.settings.cybersource",
"mitol.olposthog.settings.olposthog",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

included some new settings, all of which have defaults. So this gets them automatically.

If we prefer to be more explicit, I can restore the settings below and add the new ones.

All the settings here and in the defaults are the same. (POSTHOG_API_HOST is a slight exception. mitxonline defauls to '' which instantiates the client with None; olposthog defaults to the https://us.posthog.com, but these are equivalent as far as the client is concerned, and we override it in rc/prod anyway.)

@ChristopherChudzicki ChristopherChudzicki merged commit 861e041 into main Mar 10, 2026
12 of 14 checks passed
@ChristopherChudzicki ChristopherChudzicki deleted the cc/update-olposthog branch March 10, 2026 15:14
@odlbot odlbot mentioned this pull request Mar 10, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants