Python 中的 GCF 功能测试:无法获取构建器映像

问题描述 投票:0回答:1

我经常使用 Google Cloud Run 使用 Python 编写函数。测试时,我通常可以单击页面顶部的“测试函数”,这会在屏幕底部打开一个控制台窗口以运行该函数(此功能仅适用于 Python 和 Node.JS)。我上次使用此功能是在本周早些时候,没有出现任何问题。我的项目没有更改任何权限。

现在,当我尝试运行“测试功能”时,出现以下错误:

[5:37:05 PM] - Error: Command failed: cd /gcf-working-dir/function-sources && pack build gcf-ui-function --builder gcr.io/gae-runtimes/buildpacks/google-gae-22/python/builder --pull-policy if-not-present --env GOOGLE_FUNCTION_TARGET=hello_http --env GOOGLE_FUNCTION_SIGNATURE_TYPE=cloudevent --env GOOGLE_DEVMODE=1 --env GOOGLE_RUNTIME_VERSION=3.12
ERROR: failed to build: failed to fetch builder image 'gcr.io/gae-runtimes/buildpacks/google-gae-22/python/builder:latest': image 'gcr.io/gae-runtimes/buildpacks/google-gae-22/python/builder:latest' does not exist on the daemon: not found

    at checkExecSyncError (node:child_process:826:11)
    at execSync (node:child_process:900:15)
    at buildFunction (/app/app.runfiles/google3/cloud/console/web/functions/external/testing_server/workers/build_function_worker.js:17:38)
    at Object.<anonymous> (/app/app.runfiles/google3/cloud/console/web/functions/external/testing_server/workers/build_function_worker.js:35:131)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at MessagePort.<anonymous> (node:internal/main/worker_thread:183:24)
ERROR: failed to build: failed to fetch builder image 'gcr.io/gae-runtimes/buildpacks/google-gae-22/python/builder:latest': image 'gcr.io/gae-runtimes/buildpacks/google-gae-22/python/builder:latest' does not exist on the daemon: not found

任何可用的 Python 版本都会出现此错误,但如果您选择 Node.JS,则测试功能可以正常工作。此测试中不涉及手动配置的 Docker 容器,因为它是 Cloud Run 的本机功能。我已经做了一些修复,但我对 GCP 还很陌生,可能会遗漏一些东西。 我的直觉是 Google 以某种方式弄乱了 Python 构建映像(因为 1.8 上周已被废除)

*编辑:该功能可以毫无错误地部署,只是使用了有问题的测试功能功能。

python google-cloud-platform google-cloud-functions google-cloud-run
1个回答
0
投票

我现在遇到同样的错误;我认为这可能是 GCP 问题。

© www.soinside.com 2019 - 2024. All rights reserved.