我经常使用 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,测试功能将正常运行。由于它是 Cloud Run 的原生功能,因此此测试不涉及手动配置的 Docker 容器。我已经搜索了一些解决方案,但我对 GCP 还不太熟悉,可能会遗漏一些东西。我的直觉是 Google 以某种方式搞砸了 Python 构建映像(因为 1.8 上周已退役)

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

1

  • 2
    几分钟前出现了同样的错误。我同意,这看起来像是 Google 的问题。


    – 

$(function() {
$(“.js-gps-inline-related-questions .spacer”).on(“click”, function () {
fireRelatedEvent($(this).index() + 1, $(this).data(‘question-id’));
});

function fireRelatedEvent(position, questionId) {
StackExchange.using(“gps”, function() {
StackExchange.gps.track(‘related_questions.click’,
{
position: position,
originQuestionId: 79124574,
relatedQuestionId: +questionId,
location: ‘inline’,
source: ‘Baseline_Fallback’
});
});
}
});

function toggleInlineRelated(showMore) {
var inlineRelatedLess = document.getElementById(“inline_related_var_a_less”);
var inlineRelatedMore = document.getElementById(“inline_related_var_a_more”);

var inlineRelatedSeeMore = document.getElementById(“inline_related_see_more”);
var inlineRelatedSeeLess = document.getElementById(“inline_related_see_less”);

if (showMore) {
inlineRelatedLess.classList.add(“d-none”);
inlineRelatedSeeMore.classList.add(“d-none”);

inlineRelatedMore.classList.remove(“d-none”);
inlineRelatedSeeLess.classList.remove(“d-none”);
}
else {
inlineRelatedMore.classList.add(“d-none”);
inlineRelatedSeeLess.classList.add(“d-none”);

inlineRelatedLess.classList.remove(“d-none”);
inlineRelatedSeeMore.classList.remove(“d-none”);
}
}

0