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

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

问题描述

当我尝试部署Cloud Function时,我看到此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的存储工件很大,并且还在不断增加.遵守此规则很重要,因为我不想为不必要的存储空间付费,但是看来这可能是我们此处问题的根源.来自Google的人可以调查此事吗?

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.

一种解决方法是删除容器注册表中失败的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天全站免登陆