From 0091670583a0ac11cd9f83df9c840b7a04a8a924 Mon Sep 17 00:00:00 2001 From: Ahmad Mahmoudi Date: Wed, 22 Apr 2020 16:50:37 +0000 Subject: [PATCH] (fix) Updated WTForms and cleaned psycopg2 1. Locked the WTForms to 2.2.1 to address the import issue with wtforms.widgets.HTMLString. WTForms 2.3.0 was released on April 21/2020. This release causes shipyard gate fail with import error for wtforms.widgets.HTMLString. 2. Deleted psycopg2==2.7.7, which is installed as a dependency of apache-airflow extra package postgres, and resoted the newer release psycopg2-binary==2.8.4, to be used instead. Change-Id: I303a2c94ec409e97af1192ae892b8148fcdbb8d5 --- images/airflow/Dockerfile.opensuse_15 | 4 +++- images/airflow/Dockerfile.ubuntu_bionic | 4 +++- images/airflow/Dockerfile.ubuntu_xenial | 4 +++- images/airflow/requirements.txt | 1 + src/bin/shipyard_airflow/requirements.txt | 1 + 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/images/airflow/Dockerfile.opensuse_15 b/images/airflow/Dockerfile.opensuse_15 index 74db4b11..e87b67d1 100644 --- a/images/airflow/Dockerfile.opensuse_15 +++ b/images/airflow/Dockerfile.opensuse_15 @@ -93,7 +93,9 @@ RUN curl -L -o /usr/local/bin/kubectl \ # https://github.com/puckel/docker-airflow/issues/77 COPY images/airflow/requirements.txt /tmp/ RUN pip3 install -r /tmp/requirements.txt --no-cache-dir \ - && pip3 uninstall -y snakebite || true + && pip3 uninstall -y snakebite || true \ + && pip3 uninstall -y psycopg2 || true \ + && pip3 install --no-cache-dir --force-reinstall $(pip freeze | grep psycopg2-binary) || true # Copy scripts used in the container: COPY images/airflow/script/*.sh ${AIRFLOW_HOME}/ diff --git a/images/airflow/Dockerfile.ubuntu_bionic b/images/airflow/Dockerfile.ubuntu_bionic index 2801987a..530c1e13 100644 --- a/images/airflow/Dockerfile.ubuntu_bionic +++ b/images/airflow/Dockerfile.ubuntu_bionic @@ -93,7 +93,9 @@ RUN useradd -ms /bin/bash -d ${AIRFLOW_HOME} airflow \ COPY images/airflow/requirements.txt /tmp/ RUN pip3 install -r /tmp/requirements.txt --no-cache-dir \ && pip3 install $AIRFLOW_SRC --no-cache-dir \ - && pip3 uninstall -y snakebite || true + && pip3 uninstall -y snakebite || true \ + && pip3 uninstall -y psycopg2 || true \ + && pip3 install --no-cache-dir --force-reinstall $(pip freeze | grep psycopg2-binary) || true # Copy scripts used in the container: COPY images/airflow/script/*.sh ${AIRFLOW_HOME}/ diff --git a/images/airflow/Dockerfile.ubuntu_xenial b/images/airflow/Dockerfile.ubuntu_xenial index 8fd88398..65fe9b68 100644 --- a/images/airflow/Dockerfile.ubuntu_xenial +++ b/images/airflow/Dockerfile.ubuntu_xenial @@ -93,7 +93,9 @@ RUN useradd -ms /bin/bash -d ${AIRFLOW_HOME} airflow \ COPY images/airflow/requirements.txt /tmp/ RUN pip3 install -r /tmp/requirements.txt --no-cache-dir \ && pip3 install $AIRFLOW_SRC --no-cache-dir \ - && pip3 uninstall -y snakebite || true + && pip3 uninstall -y snakebite || true \ + && pip3 uninstall -y psycopg2 || true \ + && pip3 install --no-cache-dir --force-reinstall $(pip freeze | grep psycopg2-binary) || true # Copy scripts used in the container: COPY images/airflow/script/*.sh ${AIRFLOW_HOME}/ diff --git a/images/airflow/requirements.txt b/images/airflow/requirements.txt index 3516aa82..d0cf1449 100644 --- a/images/airflow/requirements.txt +++ b/images/airflow/requirements.txt @@ -24,6 +24,7 @@ python-openstackclient==3.16.1 kubernetes>=6.0.0 # Need to lock marshmellow-sqlalchemy and tabulate for compatibility issues marshmallow-sqlalchemy==0.18.0 +WTForms~=2.2.1 tabulate==0.8.03 # Dependencies for other UCP components diff --git a/src/bin/shipyard_airflow/requirements.txt b/src/bin/shipyard_airflow/requirements.txt index f0f54714..7a3ae8d6 100644 --- a/src/bin/shipyard_airflow/requirements.txt +++ b/src/bin/shipyard_airflow/requirements.txt @@ -37,6 +37,7 @@ uwsgi==2.0.17 # To support profiling in non-prod Werkzeug==0.16.1 +WTForms~=2.2.1 # Need to lock marshmellow-sqlalchemy and tabulate for compatibility issues marshmallow-sqlalchemy==0.18.0 tabulate==0.8.03