googlearchive / cloud-functions-go

Unofficial Native Go Runtime for Google Cloud Functions
Apache License 2.0
423 stars 44 forks source link

Deployment failure: Operation interrupted. #30

Closed przmv closed 6 years ago

przmv commented 6 years ago

When I tried to deploy function.zip I got the following error message on Google Cloud Functions:

Deployment failure: Operation interrupted.

This is what I did:

At first, clone and build:

$ git clone https://github.com/GoogleCloudPlatform/cloud-functions-go.git && cd cloud-functions-go
$ make

Then uploaded to Google Cloud Functions using the GCP web UI.

The following error entry is in the logs:

{
 insertId:  "-uie6zkd1h36"  
 logName:  "projects/my-project-id/logs/cloudaudit.googleapis.com%2Factivity"  
 operation: {
  id:  "operations/aXBpbmZvLTE4MTYyMC91cy1jZW50cmFsMS9mdW5jdGlvbi0xL1YyWERCd1Z4ZGdr"   
  last:  true   
  producer:  "cloudfunctions.googleapis.com"   
 }
 protoPayload: {
  @type:  "type.googleapis.com/google.cloud.audit.AuditLog"   
  methodName:  "google.cloud.functions.v1.CloudFunctionsService.CreateFunction"   
  resourceName:  "projects/my-project-id/locations/us-central1/functions/function-1"   
  serviceName:  "cloudfunctions.googleapis.com"   
  status: {
   code:  10    
   message:  "Operation interrupted."    
  }
 }
 receiveTimestamp:  "2018-02-19T12:27:44.296923939Z"  
 resource: {
  labels: {
   function_name:  "function-1"    
   project_id:  "my-project-id"    
   region:  "us-central1"    
  }
  type:  "cloud_function"   
 }
 severity:  "ERROR"  
 timestamp:  "2018-02-19T12:27:43.703Z"  
}
iangudger commented 6 years ago

Maybe try again? I just tested the steps you listed and it worked for me. It might be a transient deployment error unrelated to the function being uploaded.

przmv commented 6 years ago

Yes, indeed, it worked. Probably it was some temporary GCP issue…

otto-md commented 6 years ago

I've run into the same problem. It spins for 5+minutes and then I get the same error. Ive tried three times, always the same problem.

I use go1.10.1 darwin/amd64 and when I created the function in the console I picked execute as the function to execute. I guess that is the default from main.go in this repo?

otto-md commented 6 years ago

And now it worked. Fourth time...

iangudger commented 6 years ago

Do you have the most recent version? We did fix a flakiness issue. Post here if you experience it again.

otto-md commented 6 years ago

yes, i pulled the repo just minutes before i tried.

iangudger commented 6 years ago

I looked into it and I think that there is a reasonably high probability that it was a GCF issue. When the code in this project doesn't work correctly, typically deployment fails with an error about your function failing the heath check. I believe that the error described in this issue is a GCF internal error.

Next time this happens, try deploying a hello world JS function over the Go one and see if that works. If it works, try deploying the Go one again.

otto-md commented 6 years ago

For the last couple of days this is happening consistently again. Ive tried the following:

  1. using gcloud command with gs:// source url. Didn't work.
  2. web console with zip upload. Didn't work.
  3. web console with inline js (always works), then replace with my function.zip. Didn't work.

Always with the ERROR: (gcloud.beta.functions.deploy) OperationError: code=10, message=Operation interrupted. error.

Any ideas?

MrBhatt commented 6 years ago

facing same error using node.js. Even with the sample google (default) functions, throwing same error since a few hours now.

kz commented 6 years ago

I'm currently facing the same issue with a slightly different environment.

I get this error after creating a Firebase project, going to the Google Cloud Platform console and uploading a function generated using cloud-functions-go. I also attempted to deploy a Firebase function via the GCP console by creating a Firebase Cloud Function using firebase init and copying over files from cloud-functions-go. Attempts to (re-)deploy either functions fail.

@iangudger Given how @MrBhatt has coincidentally experienced this an hour ago, perhaps there may have been a backend configuration change leading to this?

kz commented 6 years ago

Perhaps there may have been an outage; I just reattempted a deploy and both functions worked! It's good to see that Firebase functions also work.

iangudger commented 6 years ago

If it happens with pure JavaScript functions as well, it seems most likely that it is a problem with GCF.

vcGF commented 5 years ago

Today I am trying this and experiencing this issue as well.

I tried many times, over 10 times, and the link here https://status.firebase.google.com/ shows all services running properly

kz commented 5 years ago

I suggest to those wishing to use Cloud Functions with Go to join the Google Cloud Platform Slack channel and express your interest in Cloud Functions for Go and search for details about its product roadmap. You might be pleasantly surprised!

vcGF commented 5 years ago

Are you implying they made changes that are causing those endless "Operation interrupted" errors when trying to import a zip package ?

vcGF commented 5 years ago

I tried to give a look in the #go and the #functions channels there, didn't see anything exciting, but I don't have access to the full history (yet).

@kz Care to tell a bit more what you've read there ? :)

gksoriginals commented 5 years ago

Hey I am still having the problem. Any solution ?

jonasdebeukelaer commented 5 years ago

@GopikrishnanSasikumar looks like there the same issues have cropped up with GCF, as I've just started being unable to deploy some functions for the operation interrupted reason too

fedosev commented 5 years ago

Same problem

iangudger commented 5 years ago

Please try again now.

jonasdebeukelaer commented 5 years ago

yup better now, thanks 👍

fedosev commented 5 years ago

Works now, thanks

waheedbrown commented 4 years ago

FYI, you have to have a Google Cloud Storage (GCS) bucket created. Cloud Functions require a GCS bucket for staging. Without at least one available bucket, you will get that "unknown" error message

SergeyRudakov commented 4 years ago

Same Problem in one of the GCP projects (have 2 projects, deployment works on one proj and fails on any CF deployment on another): Function's deployment in GCP console stops after 5 minutes with

Deployment failure:
Operation interrupted.

error message. Stackdriver log says "ABORTED".