From 406bbe02b572a7fc95eddedb6ccc1464b5ee8de4 Mon Sep 17 00:00:00 2001 From: Guido Iaquinti Date: Thu, 8 Sep 2022 11:43:39 +0200 Subject: [PATCH 1/3] chore(python): update Python to version 3.8.14 --- .github/workflows/benchmark.yml | 2 +- .../ci-backend-update-test-timing.yml | 2 +- .github/workflows/ci-backend.yml | 20 +++++------ .github/workflows/ci-plugin-server.yml | 2 +- production.Dockerfile | 33 +++++++++---------- runtime.txt | 2 +- 6 files changed, 30 insertions(+), 31 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 8814b8a0d400b..82d8454b39a45 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -54,7 +54,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.8.12 + python-version: 3.8.14 - uses: syphar/restore-virtualenv@v1.2 id: cache-benchmark-tests diff --git a/.github/workflows/ci-backend-update-test-timing.yml b/.github/workflows/ci-backend-update-test-timing.yml index 70b77c68d8632..8e2da6fd6f152 100644 --- a/.github/workflows/ci-backend-update-test-timing.yml +++ b/.github/workflows/ci-backend-update-test-timing.yml @@ -21,7 +21,7 @@ jobs: - uses: ./.github/actions/run-backend-tests with: - python-version: 3.8.12 + python-version: 3.8.14 ee: true foss: false concurrency: 1 diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml index ae820c5e180be..4b0f202322d5a 100644 --- a/.github/workflows/ci-backend.yml +++ b/.github/workflows/ci-backend.yml @@ -94,7 +94,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.8.12 + python-version: 3.8.14 - uses: syphar/restore-virtualenv@v1.2 id: cache-backend-tests @@ -148,7 +148,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.8.12 + python-version: 3.8.14 - uses: syphar/restore-virtualenv@v1.2 id: cache-backend-tests @@ -189,7 +189,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.8.12'] + python-version: ['3.8.14'] clickhouse-server-image: ['clickhouse/clickhouse-server:22.3'] ee: [true] foss: [false] @@ -200,7 +200,7 @@ jobs: group: [1, 2, 3, 4, 5] include: # :TRICKY: Run FOSS tests in a separate container - - python-version: '3.8.12' + - python-version: '3.8.14' ee: false foss: true name: 'FOSS' @@ -209,7 +209,7 @@ jobs: group: 1 # :TRICKY: Run person-on-events tests only for one CH instance # But still run in parallel - - python-version: '3.8.12' + - python-version: '3.8.14' ee: true foss: false person-on-events: true @@ -217,7 +217,7 @@ jobs: clickhouse-server-image: 'clickhouse/clickhouse-server:22.3' concurrency: 5 group: 1 - - python-version: '3.8.12' + - python-version: '3.8.14' ee: true foss: false person-on-events: true @@ -225,7 +225,7 @@ jobs: clickhouse-server-image: 'clickhouse/clickhouse-server:22.3' concurrency: 5 group: 2 - - python-version: '3.8.12' + - python-version: '3.8.14' ee: true foss: false person-on-events: true @@ -233,7 +233,7 @@ jobs: clickhouse-server-image: 'clickhouse/clickhouse-server:22.3' concurrency: 5 group: 3 - - python-version: '3.8.12' + - python-version: '3.8.14' ee: true foss: false person-on-events: true @@ -241,7 +241,7 @@ jobs: clickhouse-server-image: 'clickhouse/clickhouse-server:22.3' concurrency: 5 group: 4 - - python-version: '3.8.12' + - python-version: '3.8.14' ee: true foss: false person-on-events: true @@ -336,7 +336,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.8.12 + python-version: 3.8.14 - uses: syphar/restore-virtualenv@v1.2 id: cache-backend-tests diff --git a/.github/workflows/ci-plugin-server.yml b/.github/workflows/ci-plugin-server.yml index 0b9572566b7c7..5525379476f58 100644 --- a/.github/workflows/ci-plugin-server.yml +++ b/.github/workflows/ci-plugin-server.yml @@ -80,7 +80,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.8.12 + python-version: 3.8.14 - uses: syphar/restore-virtualenv@v1.2 id: cache-backend-tests diff --git a/production.Dockerfile b/production.Dockerfile index e760a775b9c58..3449513beb82f 100644 --- a/production.Dockerfile +++ b/production.Dockerfile @@ -7,7 +7,7 @@ # # Build the frontend artifacts # -FROM node:16.15-alpine3.14 AS frontend +FROM node:16.15-alpine3.16 AS frontend WORKDIR /code @@ -24,16 +24,16 @@ RUN yarn build # Build the plugin-server artifacts. Note that we still need to install the # runtime deps in the main image # -FROM node:16.15-alpine3.14 AS plugin-server +FROM node:16.15-alpine3.16 AS plugin-server WORKDIR /code/plugin-server # Install python, make and gcc as they are needed for the yarn install RUN apk --update --no-cache add \ "make~=4.3" \ - "g++~=10.3" \ - "gcc~=10.3" \ - "python3~=3.9" + "g++~=11.2" \ + "gcc~=11.2" \ + "python3~=3.10" # Compile and install Yarn dependencies. # @@ -54,7 +54,7 @@ RUN yarn build # Build the posthog image, incorporating the Django app along with the frontend, # as well as the plugin-server -FROM python:3.8.12-alpine3.14 +FROM python:3.8.14-alpine3.16 ENV PYTHONUNBUFFERED 1 @@ -66,14 +66,14 @@ WORKDIR /code # If you temporary need a package to build a Python or npm # dependency take a look at the sections below. RUN apk --update --no-cache add \ - "libpq~=13" \ + "libpq~=14" \ "libxslt~=1.1" \ - "nodejs-current~=16" \ - "chromium~=93" \ - "chromium-chromedriver~=93" \ + "nodejs-current~=18" \ + "chromium~=102" \ + "chromium-chromedriver~=102" \ "xmlsec~=1.2" -# Curl the GeoLite2-City database that will be used for IP geolocation within Django +# Curl the GeoLite2-City database that will be used for IP geolocation within Django # # Notes: # @@ -106,16 +106,15 @@ RUN apk --update --no-cache --virtual .geolite-deps add \ COPY requirements.txt ./ RUN apk --update --no-cache --virtual .build-deps add \ "bash~=5.1" \ - "g++~=10.3" \ - "gcc~=10.3" \ - "cargo~=1.52" \ + "g++~=11.2" \ + "gcc~=11.2" \ + "cargo~=1.60" \ "git~=2" \ "make~=4.3" \ - "libffi-dev~=3.3" \ + "libffi-dev~=3.4" \ "libxml2-dev~=2.9" \ "libxslt-dev~=1.1" \ "xmlsec-dev~=1.2" \ - "postgresql-dev~=13" \ "libmaxminddb~=1.5" \ && \ pip install -r requirements.txt --compile --no-cache-dir \ @@ -148,7 +147,7 @@ RUN apk --update --no-cache add "yarn~=1" # NOTE: we need make and g++ for node-gyp # NOTE: npm is required for re2 -RUN apk --update --no-cache add "make~=4.3" "g++~=10.3" "npm~=7" --virtual .build-deps \ +RUN apk --update --no-cache add "make~=4.3" "g++~=11.2" "npm~=8" --virtual .build-deps \ && yarn install --frozen-lockfile --production=true \ && yarn cache clean \ && apk del .build-deps diff --git a/runtime.txt b/runtime.txt index d9a16ae1e1d50..c2fd302483f80 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.8.12 +python-3.8.14 From 7a93e15a5a620364821ed889ee8b560a693396cf Mon Sep 17 00:00:00 2001 From: Guido Iaquinti Date: Thu, 8 Sep 2022 11:59:02 +0200 Subject: [PATCH 2/3] Use postgresql13-dev --- production.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/production.Dockerfile b/production.Dockerfile index 3449513beb82f..5f7136ebf6747 100644 --- a/production.Dockerfile +++ b/production.Dockerfile @@ -115,6 +115,7 @@ RUN apk --update --no-cache --virtual .build-deps add \ "libxml2-dev~=2.9" \ "libxslt-dev~=1.1" \ "xmlsec-dev~=1.2" \ + "postgresql13-dev~=13" \ "libmaxminddb~=1.5" \ && \ pip install -r requirements.txt --compile --no-cache-dir \ From 8c910c364ecf7cb9d75fbba565312bdf38b03e98 Mon Sep 17 00:00:00 2001 From: Guido Iaquinti Date: Thu, 8 Sep 2022 12:14:06 +0200 Subject: [PATCH 3/3] Update libmaxminddb --- production.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production.Dockerfile b/production.Dockerfile index 5f7136ebf6747..9a2fa91a590eb 100644 --- a/production.Dockerfile +++ b/production.Dockerfile @@ -116,7 +116,7 @@ RUN apk --update --no-cache --virtual .build-deps add \ "libxslt-dev~=1.1" \ "xmlsec-dev~=1.2" \ "postgresql13-dev~=13" \ - "libmaxminddb~=1.5" \ + "libmaxminddb~=1.6" \ && \ pip install -r requirements.txt --compile --no-cache-dir \ && \