Gustavo
Gustavo

Reputation: 914

Google functions code deploy not reflecting on server

What am I missing here?

I have a function on the cloud but I can't update it, once I run the deploy function, the results are successful but I can't see the updated code

functions deploy audioToText --trigger-http

command result

After the deploy is done: After the deploy is done

Am I missing some step? What should I do after the code is deployed so I can test it?

Upvotes: 1

Views: 85

Answers (1)

DazWilkin
DazWilkin

Reputation: 40061

It's unclear from your question to which project you're deploying the function.

gcloud (somewhat confusingly) can use implicit configuration including the project and this can (!) catch people unaware.

What happens if you're explicit about the project you wish to use when you deploy?

gcloud functions deploy ... --project=${PROJECT}

And|or what happens if you enumerate functions with|without the --project flag?

gcloud functions list
gcloud functions list --project=${PROJECT}

Do the results differ?

You may check your current configuration using:

gcloud config list

I recommend that you unset the default project and always explicity reference it

gcloud config unset project
gcloud config get-value project
(unset)

gcloud $CMD --project=${PROJECT}

Upvotes: 2

Related Questions