Skip to content

Commit

Permalink
Merge branch 'master' into fix/links-migrate-js-lite-major
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto committed Mar 18, 2024
2 parents 59b3fe9 + cbe5d3c commit bb1d3c3
Show file tree
Hide file tree
Showing 274 changed files with 19,481 additions and 4,214 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ module.exports = {
'Radio',
'Divider',
'Popconfirm',
'Table',
],
message: 'please use the Lemon equivalent instead',
},
Expand Down
6 changes: 5 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
<!-- If there are frontend changes, please include screenshots. -->
<!-- If a reference design was involved, include a link to the relevant Figma frame! -->

👉 *Stay up-to-date with [PostHog coding conventions](https://posthog.com/docs/contribute/coding-conventions) for a smoother review.*
👉 _Stay up-to-date with [PostHog coding conventions](https://posthog.com/docs/contribute/coding-conventions) for a smoother review._

## Does this work well for both Cloud and self-hosted?

<!-- Yes / no / it doesn't have an impact. -->

## How did you test this code?

Expand Down
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: 4 additions & 4 deletions cypress/e2e/experiments.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ describe('Experiments', () => {

// Select goal type
cy.get('[data-attr="experiment-goal-type-select"]').click()
cy.contains('Trend').should('be.visible')
cy.contains('Conversion funnel').should('be.visible')
cy.get('.Popover__content').contains('Trend').should('be.visible')
cy.get('.Popover__content').contains('Conversion funnel').should('be.visible')

// Add secondary metric
const secondaryMetricName = `Secondary metric ${Math.floor(Math.random() * 10000000)}`
Expand All @@ -65,8 +65,8 @@ describe('Experiments', () => {
.type(secondaryMetricName)
.should('have.value', secondaryMetricName)
cy.get('[data-attr="metrics-selector"]').click()
cy.contains('Trends').should('be.visible')
cy.contains('Funnels').should('be.visible')
cy.get('.Popover__content').contains('Funnels').should('be.visible')
cy.get('.Popover__content').contains('Trends').should('be.visible')
cy.get('[data-attr="create-annotation-submit"]').click()
cy.contains(secondaryMetricName).should('exist')

Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/invites.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Invite Signup', () => {

cy.location('pathname').should('contain', '/settings/organization')
cy.get('[id="invites"]').should('exist')
cy.contains('Pending Invites').should('exist')
cy.contains('Pending invites').should('exist')

// Test invite creation flow
cy.get('[data-attr=invite-teammate-button]').click()
Expand Down Expand Up @@ -102,15 +102,15 @@ describe('Invite Signup', () => {

// Change membership level
cy.contains('[data-attr=org-members-table] tr', user).within(() => {
cy.get('[data-attr=membership-level]').last().should('contain', 'member')
cy.get('[data-attr=membership-level]').last().should('contain', 'Member')
cy.get('[data-attr=more-button]').last().click()
})

// more menu is not within the row
cy.get('[data-test-level=8]').click()

cy.contains('[data-attr=org-members-table] tr', user).within(() => {
cy.get('[data-attr=membership-level]').last().should('contain', 'admin')
cy.get('[data-attr=membership-level]').last().should('contain', 'Admin')
})

// Delete member
Expand Down
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')
})
})
10 changes: 8 additions & 2 deletions cypress/productAnalytics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ export const insight = {
const networkInterceptAlias = interceptInsightLoad(tabName)

cy.get(`[data-attr="insight-${(tabName === 'PATHS' ? 'PATH' : tabName).toLowerCase()}-tab"]`).click()
cy.wait(`@${networkInterceptAlias}`)
if (tabName !== 'FUNNELS') {
// funnel insights require two steps before making an api call
cy.wait(`@${networkInterceptAlias}`)
}
},
newInsight: (insightType: string = 'TRENDS'): void => {
const networkInterceptAlias = interceptInsightLoad(insightType)
Expand All @@ -94,7 +97,10 @@ export const insight = {
cy.get(`[data-attr-insight-type="${insightType}"]`).click()
}

cy.wait(`@${networkInterceptAlias}`)
if (insightType !== 'FUNNELS') {
// funnel insights require two steps before making an api call
cy.wait(`@${networkInterceptAlias}`)
}
},
visitInsight: (insightName: string): void => {
cy.clickNavMenu('savedinsights')
Expand Down
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
Loading

0 comments on commit bb1d3c3

Please sign in to comment.