From 84b7ec2870f70e44f4d11d5e7fcb44bdc56aedbf Mon Sep 17 00:00:00 2001 From: vpachchi Date: Fri, 13 Jun 2025 08:46:33 -0400 Subject: [PATCH] Fix import issues with o2app MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - Fix FromAsCasing Warning making Keywords to capital case - Update setuptools to 78.1.1 for CVE-2025-47273 - Added PYTHONPATH environment variable for better importing TestPlan: PASS : Build the container image PASS : Run a container from the image PASS : Start pubsub with python PASS : python /src/o2app/entrypoints/redis_eventconsumer.py PASS : Confirm log ModuleNotFoundError: No module named 'o2app' is not present Change-Id: I3bea247f2f1f139b7f79a1891fed277dfe05aef4 Signed-off-by: vpachchi --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8701183..4770839 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nexus3.onap.org:10001/onap/integration-python:12.0.0 as build +FROM nexus3.onap.org:10001/onap/integration-python:12.0.0 AS build # https://nexus3.onap.org/#browse/search=keyword%3Dintegration-python:d406d405e4cfbf1186265b01088caf9a # https://git.onap.org/integration/docker/onap-python/tree/Dockerfile @@ -40,7 +40,7 @@ ENV PATH="/.venv/bin:${PATH}" RUN mkdir -p /.venv && \ python -m venv /.venv \ - && pip install --no-cache-dir --upgrade pip setuptools==70.0 \ + && pip install --no-cache-dir --upgrade pip setuptools==78.1.1 \ && pip install --no-cache-dir -r /tmp/requirements.txt -r /tmp/requirements-stx.txt -c /tmp/constraints.txt \ && pip install --no-cache-dir -e /src @@ -92,3 +92,4 @@ WORKDIR /src # USER $user ENV PYTHONHASHSEED=0 ENV PATH="/.venv/bin:${PATH}" +ENV PYTHONPATH="/src" -- 2.16.6