Skip to content

Commit

Permalink
merge master in
Browse files Browse the repository at this point in the history
  • Loading branch information
zlwaterfield committed Mar 25, 2024
2 parents 7ed76e0 + d66eaa1 commit a81b39c
Show file tree
Hide file tree
Showing 335 changed files with 6,942 additions and 2,721 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/ci-backend-depot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@
name: Backend CI (depot)

on:
push:
branches:
- master
pull_request:
workflow_dispatch:
inputs:
clickhouseServerVersion:
description: ClickHouse server version. Leave blank for default
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -39,7 +31,7 @@ jobs:
# Job to decide if we should run backend ci
# See https://github.com/dorny/paths-filter#conditional-execution for more details
changes:
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4
timeout-minutes: 5
if: github.repository == 'PostHog/posthog'
name: Determine need to run backend checks
Expand Down Expand Up @@ -90,7 +82,7 @@ jobs:
timeout-minutes: 30

name: Python code quality checks
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4

steps:
# If this run wasn't initiated by the bot (meaning: snapshot update) and we've determined
Expand Down Expand Up @@ -174,7 +166,7 @@ jobs:
timeout-minutes: 10

name: Validate Django migrations
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -237,7 +229,7 @@ jobs:
timeout-minutes: 30

name: Django tests – ${{ matrix.segment }} (persons-on-events ${{ matrix.person-on-events && 'on' || 'off' }}), Py ${{ matrix.python-version }}, ${{ matrix.clickhouse-server-image }} (${{matrix.group}}/${{ matrix.concurrency }}) (depot)
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4

strategy:
fail-fast: false
Expand Down Expand Up @@ -318,7 +310,7 @@ jobs:
matrix:
clickhouse-server-image: ['clickhouse/clickhouse-server:23.11.2.11-alpine']
if: needs.changes.outputs.backend == 'true'
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4
steps:
- name: 'Checkout repo'
uses: actions/checkout@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci-e2e-depot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
changes:
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4
timeout-minutes: 5
if: github.repository == 'PostHog/posthog'
name: Determine need to run E2E checks
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
chunks:
needs: changes
name: Cypress preparation
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4
timeout-minutes: 5
outputs:
chunks: ${{ steps.chunk.outputs.chunks }}
Expand All @@ -70,7 +70,7 @@ jobs:

container:
name: Build and cache container image
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4
timeout-minutes: 60
needs: [changes]
permissions:
Expand All @@ -94,7 +94,7 @@ jobs:

cypress:
name: Cypress E2E tests (${{ strategy.job-index }}) (depot)
runs-on: depot-ubuntu-latest
runs-on: depot-ubuntu-latest-4
timeout-minutes: 60
needs: [chunks, changes, container]
permissions:
Expand Down
10 changes: 2 additions & 8 deletions cypress/e2e/featureFlags.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ describe('Feature Flags', () => {
let name

beforeEach(() => {
cy.intercept('**/decide/*', (req) =>
req.reply(
decideResponse({
'new-feature-flag-operators': true,
})
)
)
cy.intercept('**/decide/*', (req) => req.reply(decideResponse({})))

cy.intercept('/api/projects/*/property_definitions?type=person*', {
fixture: 'api/feature-flags/property_definition',
Expand Down Expand Up @@ -116,7 +110,7 @@ describe('Feature Flags', () => {
cy.get('.Toastify').contains('Undo').should('be.visible')
})

it.only('Move between property types smoothly, and support relative dates', () => {
it('Move between property types smoothly, and support relative dates', () => {
// ensure unique names to avoid clashes
cy.get('[data-attr=top-bar-name]').should('contain', 'Feature flags')
cy.get('[data-attr=new-feature-flag]').click()
Expand Down
1 change: 0 additions & 1 deletion cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ beforeEach(() => {
// set feature flags here e.g.
// 'toolbar-launch-side-action': true,
'surveys-new-creation-flow': true,
'surveys-results-visualizations': true,
'auto-redirect': true,
hogql: true,
'data-exploration-insights': true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,13 @@
"x": 66,
"y": 556
}
},
{
"parentId": 209272202,
"wireframe": {
"id": 52129787123,
"type": "text"
}
}
],
"removes": [
Expand Down
162 changes: 162 additions & 0 deletions ee/frontend/mobile-replay/__snapshots__/transform.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,147 @@ exports[`replay/transform transform can convert images 1`] = `
]
`;

exports[`replay/transform transform can convert invalid text wireframe 1`] = `
[
{
"data": {
"height": 600,
"href": "",
"width": 300,
},
"timestamp": 1,
"type": 4,
},
{
"data": {
"initialOffset": {
"left": 0,
"top": 0,
},
"node": {
"childNodes": [
{
"id": 2,
"name": "html",
"publicId": "",
"systemId": "",
"type": 1,
},
{
"attributes": {
"data-rrweb-id": 3,
"style": "height: 100vh; width: 100vw;",
},
"childNodes": [
{
"attributes": {
"data-rrweb-id": 4,
},
"childNodes": [
{
"attributes": {
"type": "text/css",
},
"childNodes": [
{
"id": 102,
"textContent": "
body {
margin: unset;
}
input, button, select, textarea {
font: inherit;
margin: 0;
padding: 0;
border: 0;
outline: 0;
background: transparent;
padding-block: 0 !important;
}
.input:focus {
outline: none;
}
img {
border-style: none;
}
",
"type": 3,
},
],
"id": 101,
"tagName": "style",
"type": 2,
},
],
"id": 4,
"tagName": "head",
"type": 2,
},
{
"attributes": {
"data-rrweb-id": 5,
"style": "height: 100vh; width: 100vw;",
},
"childNodes": [
{
"attributes": {
"data-rrweb-id": 12345,
"style": "border-width: 4px;border-radius: 10px;border-color: #ee3ee4;border-style: solid;color: #ee3ee4;width: 100px;height: 30px;position: fixed;left: 11px;top: 12px;overflow:hidden;white-space:normal;",
},
"childNodes": [],
"id": 12345,
"tagName": "div",
"type": 2,
},
{
"attributes": {
"data-render-reason": "a fixed placeholder to contain the keyboard in the correct stacking position",
"data-rrweb-id": 9,
},
"childNodes": [],
"id": 9,
"tagName": "div",
"type": 2,
},
{
"attributes": {
"data-rrweb-id": 7,
},
"childNodes": [],
"id": 7,
"tagName": "div",
"type": 2,
},
{
"attributes": {
"data-rrweb-id": 11,
},
"childNodes": [],
"id": 11,
"tagName": "div",
"type": 2,
},
],
"id": 5,
"tagName": "body",
"type": 2,
},
],
"id": 3,
"tagName": "html",
"type": 2,
},
],
"id": 1,
"type": 0,
},
},
"timestamp": 1,
"type": 2,
},
]
`;

exports[`replay/transform transform can convert navigation bar 1`] = `
[
{
Expand Down Expand Up @@ -1453,6 +1594,20 @@ exports[`replay/transform transform incremental mutations de-duplicate the tree
},
"parentId": 52129787,
},
{
"nextId": null,
"node": {
"attributes": {
"data-rrweb-id": 52129787123,
"style": "position: fixed;left: 0px;top: 0px;overflow:hidden;white-space:normal;",
},
"childNodes": [],
"id": 52129787123,
"tagName": "div",
"type": 2,
},
"parentId": 209272202,
},
],
"attributes": [],
"removes": [
Expand Down Expand Up @@ -1689,6 +1844,13 @@ AAAAAAAAAAAAAAAAAAAAAAAAgCN/AW0xMqHnNQceAAAAAElFTkSuQmCC
"y": 556,
},
},
{
"parentId": 209272202,
"wireframe": {
"id": 52129787123,
"type": "text",
},
},
],
"removes": [
{
Expand Down
37 changes: 37 additions & 0 deletions ee/frontend/mobile-replay/transform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,43 @@ describe('replay/transform', () => {
expect(converted).toMatchSnapshot()
})

test('can convert invalid text wireframe', () => {
const converted = posthogEEModule.mobileReplay?.transformToWeb([
{
data: {
width: 300,
height: 600,
},
timestamp: 1,
type: 4,
},
{
type: 2,
data: {
wireframes: [
{
id: 12345,
type: 'text',
x: 11,
y: 12,
width: 100,
height: 30,
style: {
color: '#ee3ee4',
borderColor: '#ee3ee4',
borderWidth: '4',
borderRadius: '10px',
},
// text property is missing
},
],
},
timestamp: 1,
},
])
expect(converted).toMatchSnapshot()
})

test('can set background image to base64 png', () => {
const converted = posthogEEModule.mobileReplay?.transformToWeb([
{
Expand Down
Loading

0 comments on commit a81b39c

Please sign in to comment.