I'm trying to use Functions Framework to build my function using pack.
$ls -lah .
total 40
drwxr-xr-x 9 viroos staff 288B Oct 18 02:54 .
drwxr-xr-x 9 viroos staff 288B Oct 11 03:20 ..
-rw-r--r-- 1 viroos staff 44B Oct 17 19:37 .gitignore
-rw-r--r-- 1 viroos staff 6B Oct 18 02:24 .python-version
drwxr-xr-x 3 viroos staff 96B Oct 17 22:44 __pycache__
-rw-r--r-- 1 viroos staff 32B Oct 18 02:54 main.py
-rw-r--r-- 1 viroos staff 259B Oct 18 02:54 project.toml
-rw-r--r-- 1 viroos staff 75B Oct 18 02:20 requirements.txt
drwxr-xr-x 6 viroos staff 192B Oct 17 19:35 venv
$ cat project.toml
[[build.env]]
name = "GOOGLE_RUNTIME_VERSION"
value = "python38"
[[build.env]]
name = "GOOGLE_FUNCTION_TARGET"
value = "foo"
[[build.env]]
name = "GOOGLE_FUNCTION_SIGNATURE_TYPE"
value = "event"
[[build.env]]
name = "GOOGLE_FUNCTION_SOURCE"
$ cat .python-version
3.8.6
I get following error when I try to build the function:
$ pack build foo --builder gcr.io/buildpacks/builder:v1v1: Pulling from buildpacks/builder
Digest: sha256:75f77739e5f8b6e06ff24ca56382de6ef44fce4d5def89dbde04fff5f8c95567
Status: Image is up to date for gcr.io/buildpacks/builder:v1
v1: Pulling from buildpacks/gcp/run
Digest: sha256:5c9214c1500035542b066d9fe8e4b5643c9b52388f52f543e91f55b8ebb27bc9
Status: Image is up to date for gcr.io/buildpacks/gcp/run:v1
===> DETECTING
4 of 5 buildpacks participating
google.python.runtime 0.9.1
google.python.functions-framework 0.9.1
google.python.pip 0.9.1
google.utils.label 0.0.1
===> ANALYZING
Previous image with name "foo" not found
===> RESTORING
===> BUILDING
=== Python - Runtime (google.python.runtime@0.9.1) ===
Using runtime version from GOOGLE_RUNTIME_VERSION: python38
Failure: (ID: d1f5dcf5) Runtime version python38 does not exist at https://storage.googleapis.com/gcp-buildpacks/python/python-python38.tar.gz (status 403). You can specify the version with GOOGLE_RUNTIME_VERSION.
--------------------------------------------------------------------------------
Sorry your project couldn't be built.
Our documentation explains ways to configure Buildpacks to better recognise your project:
-> https://github.com/GoogleCloudPlatform/buildpacks/blob/main/README.md
If you think you've found an issue, please report it:
-> https://github.com/GoogleCloudPlatform/buildpacks/issues/new
--------------------------------------------------------------------------------
ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 145
When I delete
[[build.env]]
name = "GOOGLE_RUNTIME_VERSION"
value = "python38"
from project.toml I get following error:
$ pack build foo --builder gcr.io/buildpacks/builder:v1
v1: Pulling from buildpacks/builder
Digest: sha256:75f77739e5f8b6e06ff24ca56382de6ef44fce4d5def89dbde04fff5f8c95567
Status: Image is up to date for gcr.io/buildpacks/builder:v1
v1: Pulling from buildpacks/gcp/run
Digest: sha256:5c9214c1500035542b066d9fe8e4b5643c9b52388f52f543e91f55b8ebb27bc9
Status: Image is up to date for gcr.io/buildpacks/gcp/run:v1
===> DETECTING
4 of 5 buildpacks participating
google.python.runtime 0.9.1
google.python.functions-framework 0.9.1
google.python.pip 0.9.1
google.utils.label 0.0.1
===> ANALYZING
Previous image with name "foo" not found
===> RESTORING
===> BUILDING
=== Python - Runtime (google.python.runtime@0.9.1) ===
Using runtime version from .python-version: 3.8.6
Failure: (ID: 8d3064d0) Runtime version 3.8.6 does not exist at https://storage.googleapis.com/gcp-buildpacks/python/python-3.8.6.tar.gz (status 403). You can specify the version with GOOGLE_RUNTIME_VERSION.
--------------------------------------------------------------------------------
Sorry your project couldn't be built.
Our documentation explains ways to configure Buildpacks to better recognise your project:
-> https://github.com/GoogleCloudPlatform/buildpacks/blob/main/README.md
If you think you've found an issue, please report it:
-> https://github.com/GoogleCloudPlatform/buildpacks/issues/new
--------------------------------------------------------------------------------
ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 145
Questions:
- What is the correct/easiest/recommended way for managing python runtime version in this scenario?
- What is the correct value for
GOOGLE_RUNTIME_VERSION? - Is there any place where I can find list of all runtime versions?