云函数构建错误 - 无法从映像的配置文件获取操作系统 [英] Cloud Function build error - failed to get OS from config file for image

查看:19
本文介绍了云函数构建错误 - 无法从映像的配置文件获取操作系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试部署 Cloud Functions 时看到此 Cloud Build 错误:

I'm seeing this Cloud Build error when I try to deploy a Cloud Function:

第 2 步 -分析器":[31;1mERROR:[0m 初始化缓存失败:无法创建图像缓存:访问缓存图像us.gcr.io/MY_PROJECT/gcf/us-central1/SOME_KEY/cache:latest":无法从映像us.gcr.io/MY_PROJECT/gcf/us-central1/SOME_KEY/cache:latest"的配置文件中获取操作系统"

"Step #2 - "analyzer": [31;1mERROR: [0mfailed to initialize cache: failed to create image cache: accessing cache image "us.gcr.io/MY_PROJECT/gcf/us-central1/SOME_KEY/cache:latest": failed to get OS from config file for image 'us.gcr.io/MY_PROJECT/gcf/us-central1/SOME_KEY/cache:latest'"

我能够在本地构建和模拟云功能,但由于此错误而无法部署它.到目前为止,我能够很好地部署.我到处找,我找不到任何关于这个的讨论.有人知道这里发生了什么吗?

I'm able to build and emulate the cloud function locally, but I can't deploy it due to this error. I was able to deploy just fine until now. I've looked everywhere and I can't find any discussion about this. Anyone know what's going on here?

更新:我 3 天前部署了一个新功能,现在我似乎无法为其部署更新.我犯了同样的错误.我相当确定这是由于我设置的生命周期规则来确保我不会继续存储函数的图像:Firebase 存储工件非常庞大,而且还在不断增加.这个规则很重要,因为我不想为不必要的存储付费,但它似乎可能是我们问题的根源.谷歌的人可以调查一下吗?

UPDATE: I deployed a new function 3 days ago and now I can't seem to deploy an update to it. I get the same error. I'm fairly sure this is happening due to the lifecycle rule I set up to ensure I don't keep storing images of functions: Firebase storage artifacts is huge and keeps increasing. This rule is important to keep around because I don't want to pay for unnecessary storage, but it seems like it might be the source of our problem here. Can someone from Google look into this?

推荐答案

我遇到了同样的错误,即使对于之前成功部署的代码也是如此.

I got the same error, even for code that deployed successfully before.

解决方法是删除 Container Registry 中失败的 Firebase 功能的 Docker 映像,然后重新- 部署功能.(部署时将重新创建映像.)

A workaround is to delete the Docker images for the failing Firebase functions inside Container Registry and re-deploying the functions. (The images will be re-created upon deploying.)

该错误仍然偶尔出现,所以我怀疑这可能是 Firebase 部署过程中引入的错误.值得庆幸的是,每次出现错误时,上述解决方法都能解决问题.

The error still occurs sporadically, so I suspect this may be a bug introduced in Firebase's deployment process. Thankfully for now, the workaround above resolves the issue every time the error comes up.

这篇关于云函数构建错误 - 无法从映像的配置文件获取操作系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆