Skip to content

Commit

Permalink
Merge branch 'onboarding-proxy-step' of github.com:PostHog/posthog in…
Browse files Browse the repository at this point in the history
…to onboarding-proxy-step
  • Loading branch information
zlwaterfield committed Mar 14, 2024
2 parents 5d877aa + 063d26a commit 750031e
Show file tree
Hide file tree
Showing 62 changed files with 754 additions and 229 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/container-images-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ jobs:
event_type: posthog_deploy
message: |
{
"image_tag": "${{ steps.build.outputs.digest }}"
"image_tag": "${{ steps.build.outputs.digest }}",
"context": ${{ toJson(github) }}
}
- name: Check for changes in plugins directory
Expand All @@ -103,7 +104,8 @@ jobs:
event_type: ingestion_deploy
message: |
{
"image_tag": "${{ steps.build.outputs.digest }}"
"image_tag": "${{ steps.build.outputs.digest }}",
"context": ${{ toJson(github) }}
}
- name: Check for changes that affect batch exports temporal worker
Expand All @@ -122,7 +124,8 @@ jobs:
message: |
{
"image_tag": "${{ steps.build.outputs.digest }}",
"worker_name": "temporal-worker"
"worker_name": "temporal-worker",
"context": ${{ toJson(github) }}
}
- name: Check for changes that affect data warehouse temporal worker
Expand All @@ -141,5 +144,6 @@ jobs:
message: |
{
"image_tag": "${{ steps.build.outputs.digest }}",
"worker_name": "temporal-worker-data-warehouse"
"worker_name": "temporal-worker-data-warehouse",
"context": ${{ toJson(github) }}
}
8 changes: 5 additions & 3 deletions cypress/e2e/onboarding.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ describe('Onboarding', () => {
cy.get('[data-attr=product_analytics-onboarding-card]').click()

// Confirm product intro is not included as the first step in the upper right breadcrumbs
cy.get('[data-attr=onboarding-breadcrumbs] > :first-child > * span').should('not.contain', 'Product Intro')
cy.get('[data-attr=onboarding-breadcrumbs] > :first-child > * span').should('not.contain', 'Product intro')

// Navigate to the product intro page by clicking the left side bar
cy.get('[data-attr=menu-item-replay').click()

// Confirm we're on the product_intro page
cy.get('[data-attr=top-bar-name] > span').contains('Product intro')
cy.get('[data-attr=top-bar-name] > span').contains('Onboarding')
cy.get('[data-attr=product-intro-title]').contains('Watch how users experience your app')

// Go back to /products
cy.visit('/products')
Expand All @@ -37,6 +38,7 @@ describe('Onboarding', () => {
cy.visit(urls.onboarding('session_replay', 'product_intro'))

// Confirm we're on the product intro page
cy.get('[data-attr=top-bar-name] > span').contains('Product intro')
cy.get('[data-attr=top-bar-name] > span').contains('Onboarding')
cy.get('[data-attr=product-intro-title]').contains('Watch how users experience your app')
})
})
40 changes: 4 additions & 36 deletions docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,14 @@ services:
#
image: ${CLICKHOUSE_SERVER_IMAGE:-clickhouse/clickhouse-server:23.11.2.11-alpine}
restart: on-failure
depends_on:
- kafka
- zookeeper

zookeeper:
image: zookeeper:3.7.0
restart: on-failure

kafka:
image: ghcr.io/posthog/kafka-container:v2.8.2
restart: on-failure
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1001
KAFKA_CFG_RESERVED_BROKER_MAX_ID: 1001
Expand All @@ -50,8 +46,6 @@ services:
kafka_ui:
image: provectuslabs/kafka-ui:latest
restart: on-failure
depends_on:
- kafka
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
Expand Down Expand Up @@ -94,12 +88,6 @@ services:
PGUSER: posthog
PGPASSWORD: posthog
DEPLOYMENT: hobby
depends_on:
- db
- redis
- clickhouse
- kafka
- object_storage

web:
<<: *worker
Expand All @@ -114,9 +102,7 @@ services:
KAFKA_TOPIC: 'events_plugin_ingestion'
KAFKA_HOSTS: 'kafka:9092'
REDIS_URL: 'redis://redis:6379/'
depends_on:
- redis
- kafka


plugins:
command: ./bin/plugin-server --no-restart-loop
Expand All @@ -129,12 +115,6 @@ services:
CLICKHOUSE_DATABASE: 'posthog'
CLICKHOUSE_SECURE: 'false'
CLICKHOUSE_VERIFY: 'false'
depends_on:
- db
- redis
- clickhouse
- kafka
- object_storage

migrate:
<<: *worker
Expand Down Expand Up @@ -172,9 +152,7 @@ services:
volumes:
- /var/lib/elasticsearch/data
temporal:
depends_on:
db:
condition: service_healthy
environment:
- DB=postgresql
Expand All @@ -194,16 +172,12 @@ services:
volumes:
- ./docker/temporal/dynamicconfig:/etc/temporal/config/dynamicconfig
temporal-admin-tools:
depends_on:
- temporal
environment:
- TEMPORAL_CLI_ADDRESS=temporal:7233
image: temporalio/admin-tools:1.20.0
stdin_open: true
tty: true
temporal-ui:
depends_on:
- temporal
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
Expand All @@ -216,10 +190,4 @@ services:
restart: on-failure
environment:
TEMPORAL_HOST: temporal
depends_on:
- db
- redis
- clickhouse
- kafka
- object_storage
- temporal
34 changes: 34 additions & 0 deletions docker-compose.dev-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ services:
- ./docker/clickhouse/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./docker/clickhouse/config.xml:/etc/clickhouse-server/config.xml
- ./docker/clickhouse/users-dev.xml:/etc/clickhouse-server/users.xml
depends_on:
- kafka
- zookeeper

zookeeper:
extends:
Expand All @@ -49,6 +52,8 @@ services:
service: kafka
ports:
- '9092:9092'
depends_on:
- zookeeper

object_storage:
extends:
Expand Down Expand Up @@ -88,6 +93,12 @@ services:
- .:/app/posthog
environment:
- DEBUG=1
depends_on:
- db
- redis
- clickhouse
- kafka
- object_storage

capture:
extends:
Expand All @@ -97,6 +108,9 @@ services:
- 3000:3000
environment:
- DEBUG=1
depends_on:
- redis
- kafka

plugins:
extends:
Expand All @@ -108,6 +122,12 @@ services:
environment:
- DEBUG=1
- DOCKER=1
depends_on:
- db
- redis
- clickhouse
- kafka
- object_storage

migrate:
extends:
Expand Down Expand Up @@ -136,16 +156,30 @@ services:
extends:
file: docker-compose.base.yml
service: temporal-admin-tools
depends_on:
- temporal
temporal-ui:
extends:
file: docker-compose.base.yml
service: temporal-ui
ports:
- 8081:8080
depends_on:
temporal:
condition: service_started
db:
condition: service_healthy
temporal-django-worker:
extends:
file: docker-compose.base.yml
service: temporal-django-worker
build: .
volumes:
- .:/app/posthog
depends_on:
- db
- redis
- clickhouse
- kafka
- object_storage
- temporal
17 changes: 17 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ services:
- ./docker/clickhouse/users-dev.xml:/etc/clickhouse-server/users.xml
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
- kafka
- zookeeper

zookeeper:
extends:
Expand All @@ -64,13 +67,17 @@ services:
service: kafka
ports:
- '9092:9092'
depends_on:
- zookeeper

kafka_ui:
extends:
file: docker-compose.base.yml
service: kafka_ui
ports:
- '9093:8080'
depends_on:
- kafka

object_storage:
extends:
Expand Down Expand Up @@ -98,6 +105,9 @@ services:
- 3000:3000
environment:
- DEBUG=1
depends_on:
- redis
- kafka

# Temporal containers
elasticsearch:
Expand All @@ -115,7 +125,14 @@ services:
extends:
file: docker-compose.base.yml
service: temporal-admin-tools
depends_on:
- temporal
temporal-ui:
extends:
file: docker-compose.base.yml
service: temporal-ui
depends_on:
temporal:
condition: service_started
db:
condition: service_healthy
28 changes: 28 additions & 0 deletions docker-compose.hobby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ services:
extends:
file: docker-compose.base.yml
service: kafka
depends_on:
- zookeeper

worker:
extends:
Expand All @@ -75,6 +77,12 @@ services:
SITE_URL: https://$DOMAIN
SECRET_KEY: $POSTHOG_SECRET
RECORDINGS_INGESTER_URL: http://plugins:6738
depends_on:
- db
- redis
- clickhouse
- kafka
- object_storage

plugins:
extends:
Expand All @@ -85,6 +93,12 @@ services:
SENTRY_DSN: $SENTRY_DSN
SITE_URL: https://$DOMAIN
SECRET_KEY: $POSTHOG_SECRET
depends_on:
- db
- redis
- clickhouse
- kafka
- object_storage

caddy:
image: caddy:2.6.1
Expand Down Expand Up @@ -130,12 +144,19 @@ services:
extends:
file: docker-compose.base.yml
service: temporal-admin-tools
depends_on:
- temporal
temporal-ui:
extends:
file: docker-compose.base.yml
service: temporal-ui
ports:
- 8081:8080
depends_on:
temporal:
condition: service_started
db:
condition: service_healthy
temporal-django-worker:
command: /compose/temporal-django-worker
extends:
Expand All @@ -147,6 +168,13 @@ services:
environment:
SENTRY_DSN: $SENTRY_DSN
SITE_URL: https://$DOMAIN
depends_on:
- db
- redis
- clickhouse
- kafka
- object_storage
- temporal

volumes:
zookeeper-data:
Expand Down
2 changes: 1 addition & 1 deletion ee/benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# isort: skip_file
# Needs to be first to set up django environment
from .helpers import *
from .helpers import benchmark_clickhouse, no_materialized_columns, now
from datetime import timedelta
from typing import List, Tuple
from ee.clickhouse.materialized_columns.analyze import (
Expand Down
Loading

0 comments on commit 750031e

Please sign in to comment.