-
Notifications
You must be signed in to change notification settings - Fork 177
Description
Problem
When creating a python function with a required python version other/higher than 3.9 and building it with the s2i builder and choosing a minimal builder image instead of the default one, the build process terminates immediately.
Using the full-size builder images seems to work fine, but produces unnecessary large images.
Why is this an issue?
I need to build functions on an M4 Mac (mac/arm64) to run on Linux (linux/amd64). The only Knative builder that supports this, as far as I understood it, currently is s2i.
While I could try to restrict myself to Python 3.9, that version is really quite old and reached EOL at the end of 2025. For functions that are potentially exposed to the internet, that is not safe.
What causes the problem?
While I am not 100% sure, the most likely culprit seems to be a hardcoded python3.9 function call in the python assembler script.
While the default s2i builder images by redhat seem to contain not only the python version mentioned in the image name, but also a number of older ones for backwards compatibilities, the minimal images do not.
Proposed solution
Using python instead of python3.9 should work correctly in every correctly setup build environment and run the preferred python version.
That should be a quick change that would not involve the introduction of any new cli flags/options and leave the version selection to the builder image environment.
Thank you for your work on this and hope it can be fixed soon.