Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(python): update Python to version 3.8.14 #11713

Merged
merged 3 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-backend-update-test-timing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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'
Expand All @@ -209,39 +209,39 @@ 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
name: 'Person on Events'
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
name: 'Person on Events'
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
name: 'Person on Events'
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
name: 'Person on Events'
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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-plugin-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 16 additions & 17 deletions production.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
# Build the frontend artifacts
#
FROM node:16.15-alpine3.14 AS frontend
FROM node:16.15-alpine3.16 AS frontend
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also update to 18 here? and for plugin-server?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I just wanted to have a 👍 from the ingestion team before doing so.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. To be clear we'll be running plugin-server on node 18 now afaict just not the build. That's probably the right way around as should be backwards compat. 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. I'll make a PR


WORKDIR /code

Expand All @@ -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.
#
Expand All @@ -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

Expand All @@ -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" \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't a nodejs v16 package available so I had to bump it to 18

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @yakkomajuri @tiina303 and @macobo for visibility

"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:
#
Expand Down Expand Up @@ -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" \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package doesn't exist in Alpine 3.15 and 3.16. I'll get the error at build and see which other package we could use

Copy link
Contributor Author

@guidoiaquinti guidoiaquinti Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package has been renamed to postgresql13-dev

"libmaxminddb~=1.5" \
&& \
pip install -r requirements.txt --compile --no-cache-dir \
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.8.12
python-3.8.14