From 1e4d4eca928f7741ceec2d0a873f0b956a543a2c Mon Sep 17 00:00:00 2001 From: James Greenhill Date: Mon, 25 Nov 2024 19:09:49 -0800 Subject: [PATCH] feat: start of clickhouse server version bump to 24.8 (#25189) Co-authored-by: Robbie Coomber Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Alexander Spicer Co-authored-by: Daniel Escribano --- .github/actions/run-backend-tests/action.yml | 2 +- .../ci-backend-update-test-timing.yml | 4 +- .github/workflows/ci-backend.yml | 10 +- docker-compose.base.yml | 2 +- docker-compose.dev.yml | 1 + docker/clickhouse/config.xml | 899 +-------- docker/clickhouse/users.xml | 3 + .../__snapshots__/test_instance_settings.ambr | 6 - .../test_organization_resource_access.ambr | 14 - .../queries/funnels/funnel_correlation.py | 2 +- .../test/__snapshots__/test_funnel.ambr | 42 +- .../test_funnel_correlation.ambr | 124 +- .../test_funnel_correlations_persons.ambr | 10 +- .../test/__snapshots__/test_paths.ambr | 40 +- .../test/__snapshots__/test_person_query.ambr | 42 +- .../test/__snapshots__/test_retention.ambr | 246 --- ...ickhouse_experiment_secondary_results.ambr | 2 +- .../test_clickhouse_experiments.ambr | 8 +- .../__snapshots__/test_clickhouse_funnel.ambr | 16 +- .../test_clickhouse_funnel_person.ambr | 2 +- .../test_clickhouse_funnel_unordered.ambr | 4 +- ...clickhouse_experiment_secondary_results.py | 62 +- ...t_session_recording_list_from_filters.ambr | 108 +- ...on_recording_list_from_session_replay.ambr | 1699 ----------------- .../api/test/__snapshots__/test_element.ambr | 22 - .../api/test/__snapshots__/test_insight.ambr | 24 +- .../__snapshots__/test_insight_funnels.ambr | 6 +- .../api/test/__snapshots__/test_person.ambr | 16 +- .../test/__snapshots__/test_preflight.ambr | 62 - .../__snapshots__/test_notebook.ambr | 65 - posthog/api/test/test_query.py | 23 +- .../test_0004_replicated_schema.ambr | 228 --- ...test_0005_person_collapsed_by_version.ambr | 80 - ...test_0005_person_replacing_by_version.ambr | 80 - .../test_session_replay_events.ambr | 18 - .../hogql/test/__snapshots__/test_query.ambr | 24 +- posthog/hogql/test/test_query.py | 4 +- .../funnel_correlation_query_runner.py | 2 +- .../test_funnel_correlation.ambr | 6 +- .../test_funnel_correlation_udf.ambr | 6 +- .../__snapshots__/test_funnel_strict.ambr | 678 ++++--- .../__snapshots__/test_funnel_strict_udf.ambr | 528 ++--- .../__snapshots__/test_funnel_unordered.ambr | 1332 ++++++++++--- .../funnels/test/test_funnel_strict.py | 10 +- .../funnels/test/test_funnel_unordered.py | 12 +- .../trends/test/test_trends_persons.py | 3 +- posthog/queries/actor_base_query.py | 1 + posthog/queries/funnels/base.py | 5 +- posthog/queries/funnels/funnel.py | 3 +- posthog/queries/funnels/funnel_strict.py | 2 +- posthog/queries/funnels/funnel_unordered.py | 2 +- .../test_breakdowns_by_current_url.ambr | 4 +- .../test/__snapshots__/test_funnel.ambr | 32 +- .../__snapshots__/test_funnel_persons.ambr | 6 +- .../__snapshots__/test_funnel_strict.ambr | 10 +- .../test_funnel_strict_persons.ambr | 6 +- .../test_funnel_time_to_convert.ambr | 6 +- .../__snapshots__/test_funnel_unordered.ambr | 14 +- .../test_funnel_unordered_persons.ambr | 2 +- .../test/test_breakdowns_by_current_url.py | 1 - posthog/queries/person_query.py | 3 +- .../session_recording_list_from_filters.py | 2 + ...t_session_recording_list_from_filters.ambr | 399 ++-- posthog/test/test_journeys.py | 4 +- 64 files changed, 2466 insertions(+), 4613 deletions(-) delete mode 100644 ee/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_session_replay.ambr delete mode 100644 posthog/async_migrations/test/__snapshots__/test_0004_replicated_schema.ambr delete mode 100644 posthog/async_migrations/test/__snapshots__/test_0005_person_collapsed_by_version.ambr delete mode 100644 posthog/async_migrations/test/__snapshots__/test_0005_person_replacing_by_version.ambr diff --git a/.github/actions/run-backend-tests/action.yml b/.github/actions/run-backend-tests/action.yml index bde3554bb4e20..7cfa27aacccf8 100644 --- a/.github/actions/run-backend-tests/action.yml +++ b/.github/actions/run-backend-tests/action.yml @@ -210,7 +210,7 @@ runs: - name: Upload updated timing data as artifacts uses: actions/upload-artifact@v4 - if: ${{ inputs.person-on-events != 'true' && inputs.clickhouse-server-image == 'clickhouse/clickhouse-server:23.12.6.19' }} + if: ${{ inputs.person-on-events != 'true' && inputs.clickhouse-server-image == 'clickhouse/clickhouse-server:24.8.7.41' }} 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 e37df8defe9cb..39a1993119701 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: 'clickhouse/clickhouse-server:23.12.6.19' + clickhouse-server-image: 'clickhouse/clickhouse-server:24.8.7.41' 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 == 'clickhouse/clickhouse-server:23.12.6.19' }} + if: ${{ inputs.person-on-events != 'true' && inputs.clickhouse-server-image == 'clickhouse/clickhouse-server:24.8.7.41' }} 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 3a882b030012f..943b6611006d7 100644 --- a/.github/workflows/ci-backend.yml +++ b/.github/workflows/ci-backend.yml @@ -234,7 +234,7 @@ jobs: fail-fast: false matrix: python-version: ['3.11.9'] - clickhouse-server-image: ['clickhouse/clickhouse-server:23.12.6.19'] + clickhouse-server-image: ['clickhouse/clickhouse-server:24.8.7.41'] segment: ['Core'] person-on-events: [false, true] # :NOTE: Keep concurrency and groups in sync @@ -243,19 +243,19 @@ jobs: include: - segment: 'Temporal' person-on-events: false - clickhouse-server-image: 'clickhouse/clickhouse-server:23.12.6.19' + clickhouse-server-image: 'clickhouse/clickhouse-server:24.8.7.41' python-version: '3.11.9' concurrency: 3 group: 1 - segment: 'Temporal' person-on-events: false - clickhouse-server-image: 'clickhouse/clickhouse-server:23.12.6.19' + clickhouse-server-image: 'clickhouse/clickhouse-server:24.8.7.41' python-version: '3.11.9' concurrency: 3 group: 2 - segment: 'Temporal' person-on-events: false - clickhouse-server-image: 'clickhouse/clickhouse-server:23.12.6.19' + clickhouse-server-image: 'clickhouse/clickhouse-server:24.8.7.41' python-version: '3.11.9' concurrency: 3 group: 3 @@ -326,7 +326,7 @@ jobs: strategy: fail-fast: false matrix: - clickhouse-server-image: ['clickhouse/clickhouse-server:23.12.6.19'] + clickhouse-server-image: ['clickhouse/clickhouse-server:24.8.7.41'] if: needs.changes.outputs.backend == 'true' runs-on: ubuntu-latest steps: diff --git a/docker-compose.base.yml b/docker-compose.base.yml index f582d84197a9a..7e22d9bf3d953 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:-clickhouse/clickhouse-server:23.12.6.19} + image: ${CLICKHOUSE_SERVER_IMAGE:-clickhouse/clickhouse-server:24.8.7.41} restart: on-failure zookeeper: diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 6eaa159d3ff01..35b8a5591c876 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/docker/clickhouse/config.xml b/docker/clickhouse/config.xml index 1eca858c32d1d..7126270681eac 100644 --- a/docker/clickhouse/config.xml +++ b/docker/clickhouse/config.xml @@ -5,255 +5,29 @@ You can either move the settings to the right place inside "users.xml" file or add 1 here. --> - + - - error + trace /var/log/clickhouse-server/clickhouse-server.log /var/log/clickhouse-server/clickhouse-server.err.log - 1000M 10 - - - - - - - - - - - - - - - 8123 - - 9000 - - 9004 - - 9005 - - 8443 - - 9440 - - - - - 9009 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 4096 - - 3 - - - - false - - - /path/to/ssl_cert_file - /path/to/ssl_key_file - - - false - - - /path/to/ssl_ca_cert_file - - - none - - - 0 - - - -1 - -1 - - - false - - - - - + /etc/clickhouse-server/server.crt /etc/clickhouse-server/server.key - /etc/clickhouse-server/dhparam.pem none true @@ -262,28 +36,17 @@ true - + true true sslv2,sslv3 true - - RejectCertificateHandler - - - 200 @@ -359,27 +122,6 @@ --> 5368709120 - - 1000 @@ -394,124 +136,9 @@ /var/lib/clickhouse/tmp/ - - - /var/lib/clickhouse/user_files/ - - - - - - - - @@ -522,193 +149,25 @@ /var/lib/clickhouse/access/ - - default - - - - - - - - default - - - - - - - true false - ' | sed -e 's|.*>\(.*\)<.*|\1|') - wget https://github.com/ClickHouse/clickhouse-jdbc-bridge/releases/download/v$PKG_VER/clickhouse-jdbc-bridge_$PKG_VER-1_all.deb - apt install --no-install-recommends -f ./clickhouse-jdbc-bridge_$PKG_VER-1_all.deb - clickhouse-jdbc-bridge & - - * [CentOS/RHEL] - export MVN_URL=https://repo1.maven.org/maven2/ru/yandex/clickhouse/clickhouse-jdbc-bridge - export PKG_VER=$(curl -sL $MVN_URL/maven-metadata.xml | grep '' | sed -e 's|.*>\(.*\)<.*|\1|') - wget https://github.com/ClickHouse/clickhouse-jdbc-bridge/releases/download/v$PKG_VER/clickhouse-jdbc-bridge-$PKG_VER-1.noarch.rpm - yum localinstall -y clickhouse-jdbc-bridge-$PKG_VER-1.noarch.rpm - clickhouse-jdbc-bridge & - - Please refer to https://github.com/ClickHouse/clickhouse-jdbc-bridge#usage for more information. - ]]> - - - - - - - - - - - - localhost 9000 - - @@ -722,45 +181,10 @@ - - - - .* - - - - zookeeper @@ -768,13 +192,6 @@ - - 01 ch1 @@ -784,71 +201,12 @@ 3600 - 3600 60 - - - - - - - - system query_log
- toYYYYMM(event_date) - - - 7500 @@ -893,23 +226,12 @@ 524288 - false + true
- - @@ -932,29 +254,13 @@ 7500 - - @@ -1027,19 +333,6 @@ 7500 - - - - - - - - - - *_function.xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - /clickhouse/task_queue/ddl - - - - - - - - - - - - - - - - - - - - - - - - @@ -1209,91 +411,4 @@ \1(???) - - - - - - - - false - - false - - - https://6f33034cfe684dd7a3ab9875e57b1c8d@o388870.ingest.sentry.io/5226277 - - - - - - - -
+ diff --git a/docker/clickhouse/users.xml b/docker/clickhouse/users.xml index ece3df0f09fbe..2538f69c746af 100644 --- a/docker/clickhouse/users.xml +++ b/docker/clickhouse/users.xml @@ -9,6 +9,9 @@ 10000000000 + + +