Skip to content

Commit

Permalink
merge master in
Browse files Browse the repository at this point in the history
  • Loading branch information
zlwaterfield committed Jun 20, 2024
2 parents d93c133 + 8c9fa40 commit 23a20ba
Show file tree
Hide file tree
Showing 178 changed files with 7,023 additions and 4,894 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/build-and-deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,6 @@ on:
- 'livestream/**'

jobs:
slack:
name: Notify Slack of start of deploy
runs-on: ubuntu-20.04
if: github.repository == 'posthog/posthog'
steps:
- name: Notify Platform team on slack
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: platform-bots
SLACK_COLOR: ${{ job.status }} # or a specific color like 'good' or '#ff00ff'
SLACK_ICON: https://github.com/posthog.png?size=48
SLACK_MESSAGE: 'Production Cloud Deploy Beginning :rocket: - ${{ github.event.head_commit.message }}'
SLACK_TITLE: Message
SLACK_USERNAME: Max Hedgehog
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

sentry:
name: Notify Sentry of a production release
runs-on: ubuntu-20.04
Expand Down
54 changes: 27 additions & 27 deletions .github/workflows/livestream-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,31 +58,31 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# deploy:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: get deployer token
# id: deployer
# uses: getsentry/action-github-app-token@v3
# with:
# app_id: ${{ secrets.DEPLOYER_APP_ID }}
# private_key: ${{ secrets.DEPLOYER_APP_PRIVATE_KEY }}
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: get deployer token
id: deployer
uses: getsentry/action-github-app-token@v3
with:
app_id: ${{ secrets.DEPLOYER_APP_ID }}
private_key: ${{ secrets.DEPLOYER_APP_PRIVATE_KEY }}

# - name: Trigger livestream deployment
# uses: peter-evans/repository-dispatch@v3
# with:
# token: ${{ steps.deployer.outputs.token }}
# repository: PostHog/charts
# event-type: commit_state_update
# client-payload: |
# {
# "values": {
# "image": {
# "sha": "${{ needs.build.outputs.sha }}"
# }
# },
# "release": "livestream",
# "commit": ${{ toJson(github.event.head_commit) }},
# "repository": ${{ toJson(github.repository) }}
# }
- name: Trigger livestream deployment
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ steps.deployer.outputs.token }}
repository: PostHog/charts
event-type: commit_state_update
client-payload: |
{
"values": {
"image": {
"sha": "${{ needs.build.outputs.sha }}"
}
},
"release": "livestream",
"commit": ${{ toJson(github.event.head_commit) }},
"repository": ${{ toJson(github.repository) }}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from itertools import product
from unittest import mock
from uuid import uuid4

from dateutil.relativedelta import relativedelta
Expand Down Expand Up @@ -76,46 +75,22 @@ def create_event(
False,
False,
PersonsOnEventsMode.PERSON_ID_NO_OVERRIDE_PROPERTIES_ON_EVENTS,
{
"kperson_filter_pre__0": "rgInternal",
"kpersonquery_person_filter_fin__0": "rgInternal",
"person_uuid": None,
"vperson_filter_pre__0": ["false"],
"vpersonquery_person_filter_fin__0": ["false"],
},
True,
False,
],
[
"test_poe_being_unavailable_we_fall_back_to_person_subquery",
False,
False,
False,
PersonsOnEventsMode.DISABLED,
{
"kperson_filter_pre__0": "rgInternal",
"kpersonquery_person_filter_fin__0": "rgInternal",
"person_uuid": None,
"vperson_filter_pre__0": ["false"],
"vpersonquery_person_filter_fin__0": ["false"],
},
True,
False,
],
[
"test_poe_being_unavailable_we_fall_back_to_person_subquery_but_still_use_mat_props",
False,
False,
False,
PersonsOnEventsMode.DISABLED,
{
"kperson_filter_pre__0": "rgInternal",
"kpersonquery_person_filter_fin__0": "rgInternal",
"person_uuid": None,
"vperson_filter_pre__0": ["false"],
"vpersonquery_person_filter_fin__0": ["false"],
},
False,
False,
],
[
Expand All @@ -124,31 +99,15 @@ def create_event(
True,
False,
PersonsOnEventsMode.PERSON_ID_OVERRIDE_PROPERTIES_ON_EVENTS,
{
"event_names": [],
"event_start_time": mock.ANY,
"event_end_time": mock.ANY,
"kglobal_0": "rgInternal",
"vglobal_0": ["false"],
},
False,
True,
],
[
"test_poe_v2_available_person_properties_are_used_in_replay_listing",
False,
True,
True,
PersonsOnEventsMode.PERSON_ID_OVERRIDE_PROPERTIES_ON_EVENTS,
{
"event_end_time": mock.ANY,
"event_names": [],
"event_start_time": mock.ANY,
"kglobal_0": "rgInternal",
"vglobal_0": ["false"],
},
False,
True,
],
]
)
Expand All @@ -159,9 +118,7 @@ def test_effect_of_poe_settings_on_query_generated(
poe_v2: bool,
allow_denormalized_props: bool,
expected_poe_mode: PersonsOnEventsMode,
expected_query_params: dict,
unmaterialized_person_column_used: bool,
materialized_event_column_used: bool,
) -> None:
with self.settings(
PERSON_ON_EVENTS_OVERRIDE=poe_v1,
Expand Down Expand Up @@ -343,14 +300,14 @@ def test_event_filter_with_person_properties_materialized(
assert len(session_recordings) == 1
assert session_recordings[0]["session_id"] == session_id_one

def _add_replay_with_pageview(self, session_id: str, user_one):
def _add_replay_with_pageview(self, session_id: str, user: str) -> None:
self.create_event(
user_one,
user,
self.base_time,
properties={"$session_id": session_id, "$window_id": str(uuid4())},
)
produce_replay_summary(
distinct_id=user_one,
distinct_id=user,
session_id=session_id,
first_timestamp=self.base_time,
team_id=self.team.id,
Expand Down
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__/lemon-ui-lemon-radio--default--dark.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__/lemon-ui-lemon-radio--default--light.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.
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.
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.
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.
1 change: 1 addition & 0 deletions frontend/src/exporter/Exporter.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ FunnelTopToBottomBreakdownInsight.args = {
}

export const FunnelHistoricalTrendsInsight: Story = Template.bind({})
FunnelHistoricalTrendsInsight.tags = ['autodocs', 'test-skip']
FunnelHistoricalTrendsInsight.args = {
insight: require('../mocks/fixtures/api/projects/team_id/insights/funnelHistoricalTrends.json'),
}
Expand Down
16 changes: 7 additions & 9 deletions frontend/src/layout/navigation-3000/navigationLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -436,15 +436,13 @@ export const navigation3000Logic = kea<navigation3000LogicType>([
identifier: Scene.Insight,
},
},
featureFlags[FEATURE_FLAGS.WEB_ANALYTICS]
? {
identifier: Scene.WebAnalytics,
label: 'Web analytics',
icon: <IconPieChart />,
to: isUsingSidebar ? undefined : urls.webAnalytics(),
tag: 'beta' as const,
}
: null,
{
identifier: Scene.WebAnalytics,
label: 'Web analytics',
icon: <IconPieChart />,
to: isUsingSidebar ? undefined : urls.webAnalytics(),
tag: 'beta' as const,
},
{
identifier: Scene.Replay,
label: 'Session replay',
Expand Down
13 changes: 12 additions & 1 deletion frontend/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { ActivityLogItem } from 'lib/components/ActivityLog/humanizeActivity'
import { apiStatusLogic } from 'lib/logic/apiStatusLogic'
import { objectClean, toParams } from 'lib/utils'
import posthog from 'posthog-js'
import { LogEntry } from 'scenes/pipeline/pipelineNodeLogsLogic'
import { SavedSessionRecordingPlaylistsResult } from 'scenes/session-recordings/saved-playlists/savedSessionRecordingPlaylistsLogic'

import { getCurrentExporterData } from '~/exporter/exporterViewLogic'
Expand Down Expand Up @@ -50,6 +49,7 @@ import {
InsightModel,
IntegrationType,
ListOrganizationMembersParams,
LogEntry,
MediaUploadResponse,
NewEarlyAccessFeatureType,
NotebookListItemType,
Expand Down Expand Up @@ -1685,6 +1685,17 @@ const api = {
async listIcons(params: { query?: string } = {}): Promise<HogFunctionIconResponse[]> {
return await new ApiRequest().hogFunctions().withAction('icons').withQueryString(params).get()
},

async createTestInvocation(
id: HogFunctionType['id'],
data: {
configuration: Partial<HogFunctionType>
mock_async_functions: boolean
event: any
}
): Promise<any> {
return await new ApiRequest().hogFunction(id).withAction('invocations').create({ data })
},
},

annotations: {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/lib/components/CodeEditors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function CodeEditor({ options, onMount, ...editorProps }: CodeEditorProps
}

export function CodeEditorResizeable({
height: defaultHeight = 200,
height: defaultHeight,
minHeight = '5rem',
maxHeight = '90vh',
...props
Expand All @@ -84,7 +84,7 @@ export function CodeEditorResizeable({
maxHeight?: string | number
}): JSX.Element {
const [height, setHeight] = useState(defaultHeight)
const [manualHeight, setManualHeight] = useState<number>()
const [manualHeight, setManualHeight] = useState<number | undefined>(defaultHeight)

const ref = useRef<HTMLDivElement | null>(null)

Expand Down
18 changes: 7 additions & 11 deletions frontend/src/lib/components/CommandPalette/commandPaletteLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -560,17 +560,13 @@ export const commandPaletteLogic = kea<commandPaletteLogicType>([
push(urls.cohorts())
},
},
...(values.featureFlags[FEATURE_FLAGS.WEB_ANALYTICS]
? [
{
icon: IconPieChart,
display: 'Go to Web analytics',
executor: () => {
push(urls.webAnalytics())
},
},
]
: []),
{
icon: IconPieChart,
display: 'Go to Web analytics',
executor: () => {
push(urls.webAnalytics())
},
},
...(values.featureFlags[FEATURE_FLAGS.DATA_WAREHOUSE]
? [
{
Expand Down
10 changes: 6 additions & 4 deletions frontend/src/lib/components/EmptyMessage/EmptyMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { LemonButton } from 'lib/lemon-ui/LemonButton'
export interface EmptyMessageProps {
title: string
description: string
buttonText: string
buttonText?: string
buttonTo?: string
}

Expand All @@ -16,9 +16,11 @@ export function EmptyMessage({ title, description, buttonText, buttonTo }: Empty
<h3 className="title">{title}</h3>

<p className="text-muted description">{description}</p>
<LemonButton type="secondary" to={buttonTo}>
{buttonText}
</LemonButton>
{buttonText && (
<LemonButton type="secondary" to={buttonTo}>
{buttonText}
</LemonButton>
)}
</div>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import '../../../styles/mixins';
@import '../../../styles/vars';

.SessionRecordingsPlaylist {
.Playlist {
display: flex;
flex-direction: row;
align-items: flex-start;
Expand All @@ -11,15 +11,15 @@
border: 1px solid var(--border);
border-radius: var(--radius);

.SessionRecordingsPlaylist__list {
.Playlist__list {
position: relative;
display: flex;
flex-direction: column;
flex-shrink: 0;
height: 100%;
overflow: hidden;

&:not(.SessionRecordingsPlaylist__list--collapsed) {
&:not(.Playlist__list--collapsed) {
width: 25%;
min-width: 305px;
max-width: 350px;
Expand All @@ -30,26 +30,19 @@
}
}

.SessionRecordingsPlaylist__player {
.Playlist__main {
flex: 1;
width: 100%;
height: 100%;
overflow: hidden;

.SessionRecordingsPlaylist__loading {
display: flex;
align-items: center;
justify-content: center;
margin-top: 10rem;
}
}

&--embedded {
border: none;
}

&--wide {
.SessionRecordingsPlaylist__player {
.Playlist__main {
flex: 1;
height: 100%;
}
Expand Down
Loading

0 comments on commit 23a20ba

Please sign in to comment.