Page MenuHomePhabricator

[tbs.buildpacks] The uwsgi buildpack is failing to run due to missing Python.h library
Closed, ResolvedPublic

Description

When running the buildpacks (gerrit.wikimedia.org/cloud/toolforge/buildpacks) we are getting the error:

[builder] ---> uwsgi Buildpack
[builder] Collecting uwsgi
[builder]   Downloading uwsgi-2.0.20.tar.gz (804 kB)
[builder]      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 804.9/804.9 kB 4.6 MB/s eta 0:00:00
[builder]   Preparing metadata (setup.py): started
[builder]   Preparing metadata (setup.py): finished with status 'done'
[builder] Building wheels for collected packages: uwsgi
[builder]   Building wheel for uwsgi (setup.py): started
[builder]   Building wheel for uwsgi (setup.py): finished with status 'error'
[builder]   error: subprocess-exited-with-error
...
[builder]       plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: No such file or directory
[builder]        #include <Python.h>
[builder]                 ^~~~~~~~~~
[builder]       compilation terminated.

That prevents building any image with them that uses uwsgi.

This seems related to uwsgi needed to compile to be installed (not distributing binaries anymore) and the python3-dev
package not being where it expects it to be.

Event Timeline

dcaro triaged this task as High priority.Sep 1 2022, 7:35 AM
dcaro created this task.
dcaro added a project: Toolforge Build Service.
dcaro changed the task status from Open to In Progress.Sep 1 2022, 7:36 AM
dcaro moved this task from To refine to Doing on the User-dcaro board.

Interesting one, because I created a build on my own local installation last week friday (approx. 6 days ago) and from all indications the build was successful. @dcaro what machine are you one? I currently run ubuntu 20.04 on vmware installation on a windows machine. Ideally the machine shouldn't matter but 🤷‍♂️

It is also 100% possible that I am doing something wrong and not following the right instructions

Update: I just back stepped to go through the buildpack-admission-controller step that I skipped initially, tried creating a new build and now
I can see the Python.h error. something @fnegri suggested was the possibility of a particular package update somewhere in-between the time I created a successful build last week and today that the build is failing (after going through the admission-controller setup this morning).

Update: mine started failing this morning with the same Python.h error after I deleted the minikube cluster and tried recreating the dev environment

attached below is the log of the previous successful build:

Change 829031 had a related patch set uploaded (by David Caro; author: David Caro):

[operations/docker-images/toollabs-images@master] bullseye0: Add bullseye buildpack build/run images

https://gerrit.wikimedia.org/r/829031

Change 829032 had a related patch set uploaded (by David Caro; author: David Caro):

[cloud/toolforge/buildpacks@master] Move to bullseye + python3 for base buildpacks

https://gerrit.wikimedia.org/r/829032

Change 829218 had a related patch set uploaded (by David Caro; author: David Caro):

[operations/docker-images/toollabs-images@master] bullseye0: Improve the install-packages script

https://gerrit.wikimedia.org/r/829218

Change 829031 merged by jenkins-bot:

[operations/docker-images/toollabs-images@master] bullseye0: Add bullseye buildpack build/run images

https://gerrit.wikimedia.org/r/829031

Change 829218 merged by jenkins-bot:

[operations/docker-images/toollabs-images@master] bullseye0: Improve the install-packages script

https://gerrit.wikimedia.org/r/829218

Mentioned in SAL (#wikimedia-cloud) [2022-09-06T08:06:40Z] <dcaro_away> Published new toolforge-bullseye0-run and toolforge-bullseye0-build images for the toolforge buildpack builder (T316854)

Mentioned in SAL (#wikimedia-cloud) [2022-09-07T10:22:27Z] <dcaro> Pushing the new toolforge builder image based on the new 0.8 buildpacks (T316854)

Change 830581 had a related patch set uploaded (by David Caro; author: David Caro):

[cloud/toolforge/toolforge-cli@main] Use the bullseye bulider image

https://gerrit.wikimedia.org/r/830581

dcaro changed the task status from In Progress to Stalled.Sep 9 2022, 1:30 PM
dcaro moved this task from Doing to Blocked on the User-dcaro board.

Change 830581 merged by jenkins-bot:

[cloud/toolforge/toolforge-cli@main] Use the bullseye bulider image

https://gerrit.wikimedia.org/r/830581

dcaro changed the task status from Stalled to In Progress.Oct 4 2022, 9:18 AM
dcaro moved this task from Blocked to Doing on the User-dcaro board.

Change 829032 merged by jenkins-bot:

[cloud/toolforge/buildpacks@master] Move to bullseye + python3 for base buildpacks

https://gerrit.wikimedia.org/r/829032

dcaro moved this task from Doing to Done on the User-dcaro board.