diff --git a/.github/actions/run-backend-tests/action.yml b/.github/actions/run-backend-tests/action.yml index e3b94a4bb13..3a26a765bc2 100644 --- a/.github/actions/run-backend-tests/action.yml +++ b/.github/actions/run-backend-tests/action.yml @@ -208,7 +208,7 @@ runs: - name: Upload updated timing data as artifacts uses: actions/upload-artifact@v4 - if: ${{ inputs.person-on-events != 'true' && inputs.clickhouse-server-image == 'altinity/clickhouse-server:24.3.5.47.altinitystable' }} + if: ${{ inputs.person-on-events != 'true' && inputs.clickhouse-server-image == 'clickhouse/clickhouse-server:24.4.4.113-alpine' }} with: name: timing_data-${{ inputs.segment }}-${{ inputs.group }} path: .test_durations diff --git a/.github/workflows/ci-backend-update-test-timing.yml b/.github/workflows/ci-backend-update-test-timing.yml index 1ac109ba2de..f87b11c8f91 100644 --- a/.github/workflows/ci-backend-update-test-timing.yml +++ b/.github/workflows/ci-backend-update-test-timing.yml @@ -29,13 +29,13 @@ jobs: group: 1 token: ${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }} python-version: '3.11.9' - clickhouse-server-image: 'altinity/clickhouse-server:24.3.5.47.altinitystable' + clickhouse-server-image: 'clickhouse/clickhouse-server:24.4.4.113-alpine' segment: 'FOSS' person-on-events: false - name: Upload updated timing data as artifacts uses: actions/upload-artifact@v4 - if: ${{ inputs.person-on-events != 'true' && inputs.clickhouse-server-image == 'altinity/clickhouse-server:24.3.5.47.altinitystable' }} + if: ${{ inputs.person-on-events != 'true' && inputs.clickhouse-server-image == 'clickhouse/clickhouse-server:24.4.4.113-alpine' }} with: name: timing_data-${{ inputs.segment }}-${{ inputs.group }} path: .test_durations diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml index e4e89d38077..1a7b790066c 100644 --- a/.github/workflows/ci-backend.yml +++ b/.github/workflows/ci-backend.yml @@ -235,10 +235,7 @@ jobs: matrix: python-version: ['3.11.9'] clickhouse-server-image: - [ - 'clickhouse/clickhouse-server:23.12.6.19-alpine', - 'altinity/clickhouse-server:24.3.5.47.altinitystable', - ] + ['clickhouse/clickhouse-server:23.12.6.19-alpine', 'clickhouse/clickhouse-server:24.4.4.113-alpine'] segment: ['Core'] person-on-events: [false, true] # :NOTE: Keep concurrency and groups in sync @@ -247,7 +244,7 @@ jobs: include: - segment: 'Temporal' person-on-events: false - clickhouse-server-image: 'altinity/clickhouse-server:24.3.5.47.altinitystable' + clickhouse-server-image: 'clickhouse/clickhouse-server:24.4.4.113-alpine' python-version: '3.11.9' concurrency: 1 group: 1 @@ -319,10 +316,7 @@ jobs: fail-fast: false matrix: clickhouse-server-image: - [ - 'clickhouse/clickhouse-server:23.12.6.19-alpine', - 'altinity/clickhouse-server:24.3.5.47.altinitystable', - ] + ['clickhouse/clickhouse-server:23.12.6.19-alpine', 'clickhouse/clickhouse-server:24.4.4.113-alpine'] if: needs.changes.outputs.backend == 'true' runs-on: ubuntu-latest steps: diff --git a/docker-compose.base.yml b/docker-compose.base.yml index 4a105bfd3a2..b66de1478d6 100644 --- a/docker-compose.base.yml +++ b/docker-compose.base.yml @@ -79,7 +79,7 @@ services: # Note: please keep the default version in sync across # `posthog` and the `charts-clickhouse` repos # - image: ${CLICKHOUSE_SERVER_IMAGE:-altinity/clickhouse-server:24.3.5.47.altinitystable} + image: ${CLICKHOUSE_SERVER_IMAGE:-clickhouse/clickhouse-server:24.4.4.113-alpine} restart: on-failure zookeeper: diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 6eaa159d3ff..35b8a5591c8 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -57,6 +57,7 @@ services: service: clickhouse ports: - '8123:8123' + - '8443:8443' - '9000:9000' - '9440:9440' - '9009:9009' diff --git a/posthog/models/raw_sessions/sql.py b/posthog/models/raw_sessions/sql.py index 4c060513dc7..a50d8227f82 100644 --- a/posthog/models/raw_sessions/sql.py +++ b/posthog/models/raw_sessions/sql.py @@ -89,17 +89,17 @@ CREATE TABLE IF NOT EXISTS {table_name} ON CLUSTER '{cluster}' -- verify correctness and as a backup. Ideally we will be able to delete the uniq columns in the future when we're -- satisfied that counts are accurate. pageview_count SimpleAggregateFunction(sum, Int64), - pageview_uniq AggregateFunction(uniq, Nullable(UUID)), + pageview_uniq AggregateFunction(uniq, UUID), autocapture_count SimpleAggregateFunction(sum, Int64), - autocapture_uniq AggregateFunction(uniq, Nullable(UUID)), + autocapture_uniq AggregateFunction(uniq, UUID), screen_count SimpleAggregateFunction(sum, Int64), - screen_uniq AggregateFunction(uniq, Nullable(UUID)), + screen_uniq AggregateFunction(uniq, UUID), -- replay maybe_has_session_replay SimpleAggregateFunction(max, Bool), -- will be written False to by the events table mv and True to by the replay table mv -- as a performance optimisation, also keep track of the uniq events for all of these combined, a bounce is a session with <2 of these - page_screen_autocapture_uniq_up_to AggregateFunction(uniqUpTo(1), Nullable(UUID)), + page_screen_autocapture_uniq_up_to AggregateFunction(uniqUpTo(1), UUID), -- web vitals vitals_lcp AggregateFunction(argMin, Nullable(Float64), DateTime64(6, 'UTC'))