Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master: (73 commits)
  Sync and remove all non-FOSS parts
  chore: use buildjet for visual regression tests (#17098)
  feat: add data model and initial screen for product-specific onboarding (#17081)
  chore: fix story date (#17097)
  chore: cypress on buildjet (#17096)
  chore: jest on buildjet (#17095)
  fix(insights): Show group analytics in exported/shared insights (#17041)
  fix: Default Replay list duration (#17090)
  feat: notebook filtering from notebooks table view (#17027)
  fix(exports): hopefully fix onevent stalling by catching job producing errors (#17087)
  fix: group notifications by five minutes (#17077)
  fix(insights): Hide empty "Display" options section (#17044)
  chore(deps): Update posthog-js to 1.77.0 (#17085)
  feat(surveys): exclude users who have already seen survey wait period (#17064)
  feat: sync distinct ids with billing (#16919)
  fix: Docker compose not picking up env for some reason (#17079)
  chore: metrics for step completions within webhooks (#17056)
  chore: Allow impersonated users to trigger historical exports (#16979)
  feat: Use buildjet for ci-backend (#17069)
  chore(plugin-server): add tags to redisGet/Set (#17057)
  ...
  • Loading branch information
karambir committed Aug 19, 2023
2 parents 967a3c2 + 0ddfe26 commit 61583e8
Show file tree
Hide file tree
Showing 394 changed files with 7,218 additions and 11,585 deletions.
15 changes: 5 additions & 10 deletions .github/actions/run-backend-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ runs:
shell: bash
run: |
export CLICKHOUSE_SERVER_IMAGE=${{ inputs.clickhouse-server-image }}
export DOCKER_REGISTRY_PREFIX="us-east1-docker.pkg.dev/posthog-301601/mirror/"
docker compose -f docker-compose.dev.yml down
docker compose -f docker-compose.dev.yml up -d
Expand All @@ -43,27 +44,21 @@ runs:
run: echo "127.0.0.1 kafka" | sudo tee -a /etc/hosts

- name: Set up Python
uses: actions/setup-python@v4
id: python
uses: buildjet/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
token: ${{ inputs.token }}
cache: pip

- name: Install SAML (python3-saml) dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
- uses: syphar/restore-virtualenv@v1
id: cache-backend-tests
with:
custom_cache_key_element: v1

- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
if: steps.python.outputs.cache-hit != 'true'

- name: Install python dependencies
if: steps.cache-backend-tests.outputs.cache-hit != 'true'
shell: bash
run: |
python -m pip install -r requirements-dev.txt
Expand Down
23 changes: 22 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,33 @@
"console": "integratedTerminal",
"python": "${workspaceFolder}/env/bin/python",
"cwd": "${workspaceFolder}"
},
{
"name": "Temporal Worker",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": ["start_temporal_worker"],
"django": true,
"env": {
"PYTHONUNBUFFERED": "1",
"DJANGO_SETTINGS_MODULE": "posthog.settings",
"DEBUG": "1",
"CLICKHOUSE_SECURE": "False",
"KAFKA_HOSTS": "localhost",
"DATABASE_URL": "postgres://posthog:posthog@localhost:5432/posthog",
"SKIP_SERVICE_VERSION_REQUIREMENTS": "1",
"PRINT_SQL": "1"
},
"console": "integratedTerminal",
"python": "${workspaceFolder}/env/bin/python",
"cwd": "${workspaceFolder}"
}
],
"compounds": [
{
"name": "PostHog",
"configurations": ["Backend", "Celery", "Frontend", "Plugin Server"],
"configurations": ["Backend", "Celery", "Frontend", "Plugin Server", "Temporal Worker"],
"stopAll": true
}
]
Expand Down
11 changes: 11 additions & 0 deletions cypress/e2e/notebooks.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,15 @@ describe('Notebooks', () => {
cy.get('.NotebookEditor').type('{esc}')
cy.get('.NotebookFloatingButton .LemonButton').should('exist')
})

it('Can comment on a recording', () => {
cy.visit(urls.replay())
cy.get('[data-attr="notebooks-replay-comment-button"]').click()

cy.get('.LemonButton').contains('Comment in a new notebook').click()

cy.get('.Notebook.Notebook--editable').should('be.visible')
cy.get('.ph-recording.NotebookNode').should('be.visible')
cy.get('.NotebookRecordingTimestamp').should('contain.text', '0:00')
})
})
22 changes: 11 additions & 11 deletions docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

services:
db:
image: postgres:12-alpine
image: ${DOCKER_REGISTRY_PREFIX:-}postgres:12-alpine
restart: on-failure
environment:
POSTGRES_USER: posthog
Expand All @@ -16,7 +16,7 @@ services:
timeout: 5s

redis:
image: redis:6.2.7-alpine
image: ${DOCKER_REGISTRY_PREFIX:-}redis:6.2.7-alpine
restart: on-failure
command: redis-server --maxmemory-policy allkeys-lru --maxmemory 200mb

Expand All @@ -25,17 +25,17 @@ services:
# Note: please keep the default version in sync across
# `posthog` and the `charts-clickhouse` repos
#
image: ${CLICKHOUSE_SERVER_IMAGE:-clickhouse/clickhouse-server:23.6.1.1524}
image: ${DOCKER_REGISTRY_PREFIX:-}${CLICKHOUSE_SERVER_IMAGE:-clickhouse/clickhouse-server:23.6.1.1524}
restart: on-failure
depends_on:
- kafka
- zookeeper
zookeeper:
image: zookeeper:3.7.0
image: ${DOCKER_REGISTRY_PREFIX:-}zookeeper:3.7.0
restart: on-failure

kafka:
image: bitnami/kafka:2.8.1-debian-10-r99
image: ${DOCKER_REGISTRY_PREFIX:-}bitnami/kafka:2.8.1-debian-10-r99
restart: on-failure
depends_on:
- zookeeper
Expand All @@ -48,7 +48,7 @@ services:
ALLOW_PLAINTEXT_LISTENER: 'true'

object_storage:
image: minio/minio:RELEASE.2022-06-25T15-50-16Z
image: ${DOCKER_REGISTRY_PREFIX:-}minio/minio:RELEASE.2022-06-25T15-50-16Z
restart: on-failure
environment:
MINIO_ROOT_USER: object_storage_root_user
Expand All @@ -57,7 +57,7 @@ services:
command: -c 'mkdir -p /data/posthog && minio server --address ":19000" --console-address ":19001" /data' # create the 'posthog' bucket before starting the service

maildev:
image: maildev/maildev:2.0.5
image: ${DOCKER_REGISTRY_PREFIX:-}maildev/maildev:2.0.5
restart: on-failure

worker: &worker
Expand Down Expand Up @@ -137,7 +137,7 @@ services:
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms256m -Xmx256m
- xpack.security.enabled=false
image: elasticsearch:7.16.2
image: ${DOCKER_REGISTRY_PREFIX:-}elasticsearch:7.16.2
expose:
- 9200
volumes:
Expand All @@ -157,7 +157,7 @@ services:
- ENABLE_ES=true
- ES_SEEDS=elasticsearch
- ES_VERSION=v7
image: temporalio/auto-setup:1.20.0
image: ${DOCKER_REGISTRY_PREFIX:-}temporalio/auto-setup:1.20.0
ports:
- 7233:7233
labels:
Expand All @@ -169,7 +169,7 @@ services:
- temporal
environment:
- TEMPORAL_CLI_ADDRESS=temporal:7233
image: temporalio/admin-tools:1.20.0
image: ${DOCKER_REGISTRY_PREFIX:-}temporalio/admin-tools:1.20.0
stdin_open: true
tty: true
temporal-ui:
Expand All @@ -178,7 +178,7 @@ services:
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
image: temporalio/ui:2.10.3
image: ${DOCKER_REGISTRY_PREFIX:-}temporalio/ui:2.10.3
ports:
- 8081:8080
temporal-django-worker:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/components-cards-text-card--template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/insights-insightstable--default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/insights-insightstable--embedded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/insights-insightstable--hourly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/insights-insightstable--is-legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/scenes-app-dashboards--create-template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/scenes-app-exports--create-export.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/scenes-app-insights--lifecycle--webkit.png
Binary file modified frontend/__snapshots__/scenes-app-insights--lifecycle-edit.png
Binary file modified frontend/__snapshots__/scenes-app-insights--lifecycle.png
Binary file modified frontend/__snapshots__/scenes-app-insights--stickiness-edit.png
Binary file modified frontend/__snapshots__/scenes-app-insights--stickiness.png
Binary file modified frontend/__snapshots__/scenes-app-insights--trends-area.png
Binary file modified frontend/__snapshots__/scenes-app-insights--trends-bar-edit.png
Binary file modified frontend/__snapshots__/scenes-app-insights--trends-bar.png
Binary file modified frontend/__snapshots__/scenes-app-insights--trends-line.png
Binary file modified frontend/__snapshots__/scenes-app-insights--trends-number.png
Binary file modified frontend/__snapshots__/scenes-app-insights--trends-pie-edit.png
Binary file modified frontend/__snapshots__/scenes-app-insights--trends-pie.png
Binary file modified frontend/__snapshots__/scenes-app-insights--trends-table.png
Binary file modified frontend/__snapshots__/scenes-app-insights--trends-value.png
Binary file modified frontend/__snapshots__/scenes-app-insights--user-paths--webkit.png
Binary file modified frontend/__snapshots__/scenes-app-insights--user-paths-edit.png
Binary file modified frontend/__snapshots__/scenes-app-insights--user-paths.png
Binary file modified frontend/__snapshots__/scenes-app-notebooks--notebooks-list.png
Binary file modified frontend/__snapshots__/scenes-app-recordings--recordings-list.png
Binary file modified frontend/__snapshots__/scenes-app-surveys--new-survey.png
35 changes: 35 additions & 0 deletions frontend/scripts/print_property_name_aliases.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { KEY_MAPPING } from 'lib/taxonomy'

// Creates PROPERTY_NAME_ALIASES in posthog/api/property_definition.py
// eslint-disable-next-line no-console
console.log(
JSON.stringify(
Object.fromEntries(
Array.from(Object.entries(KEY_MAPPING.event))
.map(([key, value]) => [key, value.label])
.filter(([key, label]) => {
if (!key) {
return false
}
if (!label || label.includes('deprecated')) {
return false
}

const keyLower = key.toLowerCase()
const labelLower = label.toLowerCase()

if (keyLower.includes(labelLower)) {
return false
}

const keyLowerNoSpecial = keyLower.replace(/[$_]+/g, ' ')
const labelWords = labelLower.split(/\s+/)

return !labelWords.every((word) => keyLowerNoSpecial.includes(word))
})
.sort()
),
null,
4
)
)
5 changes: 5 additions & 0 deletions frontend/src/layout/navigation/SideBar/SideBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,10 @@
.LaunchToolbarButton {
padding-left: 0.5em;
padding-right: 0.5em;

.LemonButton__content {
display: block;
text-overflow: ellipsis;
}
}
}
6 changes: 2 additions & 4 deletions frontend/src/layout/navigation/SideBar/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import { frontendAppsLogic } from 'scenes/apps/frontendAppsLogic'
import { AuthorizedUrlListType, authorizedUrlListLogic } from 'lib/components/AuthorizedUrlList/authorizedUrlListLogic'
import { LemonButton } from 'lib/lemon-ui/LemonButton'
import { Tooltip } from 'lib/lemon-ui/Tooltip'
import Typography from 'antd/lib/typography'
import { Spinner } from 'lib/lemon-ui/Spinner/Spinner'
import { DebugNotice } from 'lib/components/DebugNotice'
import ActivationSidebar from 'lib/components/ActivationSidebar/ActivationSidebar'
Expand Down Expand Up @@ -233,6 +232,7 @@ function Pages(): JSX.Element {
to={urls.projectApps()}
/>
)}

{Object.keys(frontendApps).length > 0 && <SideBarApps />}
</>
) : null}
Expand Down Expand Up @@ -315,9 +315,7 @@ function AppUrls({ setIsToolbarLaunchShown }: { setIsToolbarLaunchShown: (state:
</Tooltip>
}
>
<Typography.Text ellipsis={true} title={appUrl}>
{appUrl}
</Typography.Text>
{appUrl}
</LemonButton>
))}
<LemonButton
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/lib/Chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
Color,
InteractionItem,
TickOptions,
GridLineOptions,
TooltipModel,
TooltipOptions,
ScriptableLineSegmentContext,
Expand Down Expand Up @@ -57,6 +58,7 @@ export {
Color,
InteractionItem,
TickOptions,
GridLineOptions,
TooltipModel,
TooltipOptions,
Plugin,
Expand Down
Loading

0 comments on commit 61583e8

Please sign in to comment.