grafana-toolbox / grafana-wtf

Grep through all Grafana entities in the spirit of git-wtf.
GNU Affero General Public License v3.0
138 stars 12 forks source link

Docker build fails: Downloading cryptography-42.0.5.tar.gz #127

Closed amotl closed 3 months ago

amotl commented 3 months ago

Problem

It looks like cryptography suddenly wants to build.

Downloading cryptography-42.0.5.tar.gz (671 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 671.0/671.0 kB 13.8 MB/s eta 0:00:00
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
error: subprocess-exited-with-error
[...]
error: command 'gcc' failed: No such file or directory

-- https://github.com/panodata/grafana-wtf/actions/runs/8482596249/job/23242113705?pr=125#step:10:755

Evaluation

cryptography stopped publishing binary wheel packages for Python 3.11? Why?

-- https://pypi.org/project/cryptography/#files

/cc @Ousret

amotl commented 3 months ago

Reproduction

$ docker run --rm -it --platform=linux/aarch64 python:3.11-slim-bullseye bash
root@1f6b6dc07a2e:/# pip install cryptography
Collecting cryptography
  Obtaining dependency information for cryptography from https://files.pythonhosted.org/packages/0e/1d/62a2324882c0db89f64358dadfb95cae024ee3ba9fde3d5fd4d2f58af9f5/cryptography-42.0.5-cp39-abi3-manylinux_2_28_aarch64.whl.metadata
  Downloading cryptography-42.0.5-cp39-abi3-manylinux_2_28_aarch64.whl.metadata (5.3 kB)
Collecting cffi>=1.12 (from cryptography)
  Obtaining dependency information for cffi>=1.12 from https://files.pythonhosted.org/packages/b5/23/ea84dd4985649fcc179ba3a6c9390412e924d20b0244dc71a6545788f5a2/cffi-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata
  Downloading cffi-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.metadata (1.5 kB)
Collecting pycparser (from cffi>=1.12->cryptography)
  Obtaining dependency information for pycparser from https://files.pythonhosted.org/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl.metadata
  Downloading pycparser-2.21-py2.py3-none-any.whl.metadata (1.1 kB)
Downloading cryptography-42.0.5-cp39-abi3-manylinux_2_28_aarch64.whl (4.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 6.5 MB/s eta 0:00:00
Downloading cffi-1.16.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (466 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 466.6/466.6 kB 6.2 MB/s eta 0:00:00
Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 6.8 MB/s eta 0:00:00
Installing collected packages: pycparser, cffi, cryptography
Successfully installed cffi-1.16.0 cryptography-42.0.5 pycparser-2.21

It works!

Ousret commented 3 months ago

It's seems to be about the "armv7l" architecture. cryptography do indeed publish abi3 wheels, so Python 3.7+ should be covered. the only thing is about the armv7l arch. I don't think they published anything for it.

amotl commented 3 months ago

Sorry, the last post was a mistake, using a wrong docker command on my workstation.

$ docker run --rm -it --platform=linux/amd64 python:3.11-slim-bullseye bash
Unable to find image 'python:3.11-slim-bullseye' locally
3.11-slim-bullseye: Pulling from library/python
c0edef2937fa: Pull complete
29ff364e54a5: Pull complete
03e12c98a3b5: Pull complete
2b25a21d3bcd: Pull complete
bef1234992ae: Pull complete
Digest: sha256:6988e45203d296f2bc89f171995487f388fc18f1cb23110c6521eb3dcca369a9
Status: Downloaded newer image for python:3.11-slim-bullseye
root@f7009e92da8a:/# pip install cryptography
Collecting cryptography
  Downloading cryptography-42.0.5-cp39-abi3-manylinux_2_28_x86_64.whl.metadata (5.3 kB)
Collecting cffi>=1.12 (from cryptography)
  Downloading cffi-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.5 kB)
Collecting pycparser (from cffi>=1.12->cryptography)
  Downloading pycparser-2.21-py2.py3-none-any.whl.metadata (1.1 kB)
Downloading cryptography-42.0.5-cp39-abi3-manylinux_2_28_x86_64.whl (4.6 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.6/4.6 MB 6.6 MB/s eta 0:00:00
Downloading cffi-1.16.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (464 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 464.8/464.8 kB 6.9 MB/s eta 0:00:00
Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 6.6 MB/s eta 0:00:00
Installing collected packages: pycparser, cffi, cryptography
Successfully installed cffi-1.16.0 cryptography-42.0.5 pycparser-2.21

Also successful, only on CI it fails?

amotl commented 3 months ago

It's seems to be about the "armv7l" architecture.

Ah, right!

#26 [linux/arm/v7 6/6] RUN pip install --prefer-binary .

-- https://github.com/panodata/grafana-wtf/actions/runs/8482596249/job/23242113705?pr=125#step:10:744

Maybe c23084e3ebb2 helps.

amotl commented 3 months ago

The build succeeded now, by removing the slot for linux/arm/v7. Thanks for your support again!