Skip to content
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

fix: Safely add livestream host #28727

Merged
merged 18 commits into from
Feb 25, 2025
Merged

fix: Safely add livestream host #28727

merged 18 commits into from
Feb 25, 2025

Conversation

benjackwhite
Copy link
Contributor

@benjackwhite benjackwhite commented Feb 14, 2025

Problem

Re-adds the livestream host in a way that doesn't break things....

How did you test this code?

locally this runs and livestream works
in self-hosted if i manually add the livestream service then I can see livestream start and try to connect to the incorrect host (because it doesn't have this change)

Copy link
Contributor

github-actions bot commented Feb 14, 2025

Size Change: +32 B (0%)

Total Size: 9.72 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 9.72 MB +32 B (0%)

compressed-size-action

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds proper livestream host configuration across the PostHog stack, focusing on safe and consistent host resolution.

  • Added new LIVESTREAM_HOST environment variable in /posthog/settings/web.py for configuring the livestream connection endpoint
  • Modified /frontend/src/lib/utils/apiHost.ts to use app context for livestream host resolution with proper fallbacks for different environments
  • Added livestream_host to frontend app context in /posthog/utils.py to expose the configuration to client-side
  • Extended AppContext interface in /frontend/src/types.ts with optional livestream_host property

4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week. If you want to permanentely keep it open, use the waiting label.

Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

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

So... I think this works now, but tricky to test

Copy link
Member

@fuziontech fuziontech left a comment

Choose a reason for hiding this comment

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

looks good!

* master:
  fix(cdp): fix broken tsconfig (#29194)
  fix: move billing load to another logic (#29191)
  fix: check if questionResults is not null/undefined (#29187)
  chore(editor-3001): remove loading bar flag (#29155)
  fix(sql): too eager nested aggregation error (#29176)
@@ -126,6 +126,7 @@ $TLS_BLOCK
$DOMAIN, http://, https:// {
encode gzip zstd
reverse_proxy http://web:8000
reverse_proxy http://livestream:8666
Copy link
Member

Choose a reason for hiding this comment

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

aaaaahhhhhhh, dang of course

@fuziontech fuziontech merged commit 6f7c160 into master Feb 25, 2025
98 checks passed
@fuziontech fuziontech deleted the fix/livestream-host branch February 25, 2025 19:22
thmsobrmlr pushed a commit that referenced this pull request Feb 25, 2025
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Paul D'Ambra <[email protected]>
Co-authored-by: James Greenhill <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants