From c8775f3c155deeccfecec4a053cfede5bb6b2ead Mon Sep 17 00:00:00 2001 From: Kraiem Taha Yassine Date: Thu, 9 Jan 2025 19:30:01 +0100 Subject: [PATCH] Patch api v1 21 0 (#2932) * fix(chalice): fixes for SSO * fix(chalice): changed base image * fix(chalice): changed requirements --- ee/api/Dockerfile | 10 ++++------ ee/api/Dockerfile_alerts | 2 +- ee/api/Dockerfile_crons | 2 +- ee/api/Pipfile | 1 + ee/api/requirements.txt | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ee/api/Dockerfile b/ee/api/Dockerfile index 86071c52f..f15d68569 100644 --- a/ee/api/Dockerfile +++ b/ee/api/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-alpine +FROM python:3.12-alpine LABEL Maintainer="KRAIEM Taha Yassine" RUN apk add --no-cache build-base libressl libffi-dev libressl-dev libxslt-dev libxml2-dev xmlsec-dev xmlsec tini @@ -12,11 +12,9 @@ ENV SOURCE_MAP_VERSION=0.7.4 \ WORKDIR /work COPY requirements.txt ./requirements.txt -# Caching the source build -RUN pip install --no-cache-dir --upgrade uv -RUN uv pip install --no-cache-dir --upgrade pip setuptools wheel --system -RUN uv pip install --no-cache-dir --upgrade python3-saml==1.16.0 --no-binary=lxml --system -RUN uv pip install --no-cache-dir --upgrade -r requirements.txt --system +RUN pip install --no-cache-dir --upgrade -r requirements.txt +# This code is used to solve 'lxml & xmlsec libxml2 library version mismatch' error +RUN pip uninstall -y lxml && pip install lxml COPY . . RUN mv env.default .env diff --git a/ee/api/Dockerfile_alerts b/ee/api/Dockerfile_alerts index 49f89c6ff..6ae93f936 100644 --- a/ee/api/Dockerfile_alerts +++ b/ee/api/Dockerfile_alerts @@ -1,4 +1,4 @@ -FROM python:3.11-alpine +FROM python:3.12-alpine LABEL Maintainer="Rajesh Rajendran" LABEL Maintainer="KRAIEM Taha Yassine" RUN apk add --no-cache build-base tini diff --git a/ee/api/Dockerfile_crons b/ee/api/Dockerfile_crons index a4d76751e..fc8f11515 100644 --- a/ee/api/Dockerfile_crons +++ b/ee/api/Dockerfile_crons @@ -1,4 +1,4 @@ -FROM python:3.11-alpine +FROM python:3.12-alpine LABEL Maintainer="Rajesh Rajendran" LABEL Maintainer="KRAIEM Taha Yassine" RUN apk add --no-cache build-base tini diff --git a/ee/api/Pipfile b/ee/api/Pipfile index a3a45e591..df07b14ca 100644 --- a/ee/api/Pipfile +++ b/ee/api/Pipfile @@ -20,6 +20,7 @@ python-decouple = "==3.8" pydantic = {extras = ["email"], version = "==2.9.2"} apscheduler = "==3.10.4" clickhouse-driver = {extras = ["lz4"], version = "==0.2.9"} +lxml = "!=4.7.0,<=5.2.1,>=4.6.5" python3-saml = "==1.16.0" python-multipart = "==0.0.17" redis = "==5.2.0" diff --git a/ee/api/requirements.txt b/ee/api/requirements.txt index 0ab8a96b4..7b849d9fe 100644 --- a/ee/api/requirements.txt +++ b/ee/api/requirements.txt @@ -21,8 +21,8 @@ apscheduler==3.10.4 clickhouse-driver[lz4]==0.2.9 # TODO: enable after xmlsec fix https://github.com/xmlsec/python-xmlsec/issues/252 #--no-binary is used to avoid libxml2 library version incompatibilities between xmlsec and lxml -python3-saml==1.16.0 ---no-binary=lxml +lxml >= 4.6.5, !=4.7.0, <=5.2.1 +python3-saml==1.16.0 --no-binary=lxml python-multipart==0.0.17 redis==5.2.0