kubernetes-sigs / apisnoop

⭕️Snooping on the Kubernetes OpenAPI communications
https://apisnoop.cncf.io
Apache License 2.0
87 stars 42 forks source link

Upgrading snoopdb from debian bullseye to bookworm fails #835

Open heyste opened 8 months ago

heyste commented 8 months ago

When trying to update snoopdb to the latest realease of debian the current build process fails. The build is using python 3.11 which now follows (PEP 668) enhancement proposal.

$ git diff
diff --git a/apps/snoopdb/postgres/Dockerfile b/apps/snoopdb/postgres/Dockerfile
index 941ecb6..c8aa88e 100644
--- a/apps/snoopdb/postgres/Dockerfile
+++ b/apps/snoopdb/postgres/Dockerfile
@@ -1,4 +1,4 @@
-FROM postgres:15-bullseye
+FROM postgres:15-bookworm
 LABEL MAINTAINER="Zach Mandeville <zz@ii.coop>"
 RUN apt-get update \
   && apt-get install -y --no-install-recommends \

Error when trying to build snoopdb

 => ERROR [ 4/11] RUN pip3 install --upgrade pip                                                                                                                         0.9s 
------                                                                                                                                                                        
 > [ 4/11] RUN pip3 install --upgrade pip:
0.754 error: externally-managed-environment
0.754 
0.754 × This environment is externally managed
0.754 ╰─> To install Python packages system-wide, try apt install
0.754     python3-xyz, where xyz is the package you are trying to
0.754     install.
0.754     
0.754     If you wish to install a non-Debian-packaged Python package,
0.754     create a virtual environment using python3 -m venv path/to/venv.
0.754     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
0.754     sure you have python3-full installed.
0.754     
0.754     If you wish to install a non-Debian packaged Python application,
0.754     it may be easiest to use pipx install xyz, which will manage a
0.754     virtual environment for you. Make sure you have pipx installed.
0.754     
0.754     See /usr/share/doc/python3.11/README.venv for more information.
0.754 
0.754 note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
0.754 hint: See PEP 668 for the detailed specification.
------
Dockerfile:29
--------------------
  27 |     
  28 |     RUN python3 --version
  29 | >>> RUN pip3 install --upgrade pip
  30 |     RUN pip3 install --upgrade requests
  31 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c pip3 install --upgrade pip" did not complete successfully: exit code: 1
heyste commented 8 months ago

There is a postgres container 16-bullseye that let's anyone use the latest release of postgres without needing to fix the above issue for now.

k8s-triage-robot commented 5 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

heyste commented 5 months ago

/remove-lifecycle stale

k8s-triage-robot commented 2 months ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

heyste commented 2 months ago

/remove-lifecycle stale