Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Function deployment failure

I am new to Google Cloud Platform, and I am trying Google Cloud Functions but it is showing really strange behavior. I'm trying to run the following code:

exports.helloPubSub = (event, context) => {
 const pubsubMessage = event.data;  
 console.log(event.data.attributes);
 console.log(Buffer.from(pubsubMessage, 'base64').toString());
};

But when I click to create a function, the deployment fails and hardly after trying 8-9 times it gets deployed. The error which it throws is

Deployment failure:
Build failed: {"cacheStats": [{"status": "MISS", "hash": "0bb4aa23414dd82b8643cb2c86b5a55af031b22701fbe364a88ea6e61ad481a4", "type": "docker_layer_cache", "level": "global"}, {"status": "HIT", "hash": "0bb4aa23414dd82b8643cb2c86b5a55af031b22701fbe364a88ea6e61ad481a4", "type": "docker_layer_cache", "level": "project"}]}

Is it a bug in Google Cloud Platform or am I doing something wrong? If I am doing something wrong, then I shouldn't be able to deploy it even once.

Any help would really be appreciated. Thanks a lot!

like image 231
Hsn Avatar asked Jan 07 '20 15:01

Hsn


People also ask

How long can a cloud function run by default before timing out?

By default, a function times out after one minute (60 seconds), but you can extend this period: In Cloud Functions (1st gen), the maximum timeout duration is nine minutes (540 seconds).

What is the URL to be used for deploy to Docker cloud function?

Enable it by visiting https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com/overview?project=<project-number> then retry.


1 Answers

If we look at the Google Cloud Status, we find that there is an outage with Cloud Function deployment at this time (the time of your post). I can't seem anything wrong with what you have coded and strongly believe that you are being impacted by the outage.

References

  • Google Cloud Status Dashboard
  • Cloud Function outage
like image 199
Kolban Avatar answered Oct 23 '22 15:10

Kolban