-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ALREADY_EXISTS error while trying to update function with dash instead of underscore in name #447
Comments
Does a Cloud Run service with that name already exist? You can check in the Google Cloud Console. |
It does but it is the same service, it's a cloud function gen 2. In the clound functions console it's named as foo_bar (underscore) and in the cloud run console it's named as foo-bar (dash) |
Does this happen every time? Or did you rename the function and then it started happening? |
I've only started using github actions for it today, before that I would zip and redeploy via console. I do remember fiddling around with that function, back when I was moving it from GEN 1 to GEN 2. I may have changed it's name back then but I'm not sure if it was my doing or google's, since the function still displays with an underscore in the cloud functions console. It's also a pretty set-and-done function so it hasnt seen any new deployments for several months. I don't have other examples of this in our repo but that happens every time for this function. I was thinking this could be a problem related to the underlying tool instead of the action but the error I get is different when I use gcloud with the same arugments. cloud run name: foo-bar gcloud functions deploy --entry-point ... --gen2 --region us-east1 --source ... --runtime nodejs20 foo-bar
ERROR: (gcloud.functions.deploy) One of arguments [--trigger-topic, --trigger-bucket, --trigger-http, --trigger-event, --trigger-event-filters] is required: You must specify a trigger when deploying a new function.
gcloud functions deploy --entry-point ... --gen2 --region us-east1 --source ... --runtime nodejs20 foo_bar
Preparing function...done.
X Updating function (may take a while)...
<more stuff> |
Are you able to put together a reproduction case from scratch? I'm having trouble reproducing this, so I must be missing a step. |
I'll see if I can reproduce it over the weekend |
It's been a while and I was never able to reproduce it. Insted, I was able to deploy it using this action but then a completely different error happened when the cloud scheduler tried to execute it:
I believe there were edge cases that were hard to treat/predict and irrelevant if the user can just make a new cloud function that won't have the same legacy history of being a cloud function v1, then a v2, then a cloud run function and having name changes that include dashes and underscores... Feel free to close this issue, as it seems only I have gone through it and it might not even be a real issue anymore. |
TL;DR
The error seems to be realated to how gcp treats function names. The correct function name was foo_bar but in the name field for the action, I had written foo-bar instead.
Expected behavior
An error message saying 'Failed to update' or a successful update.
Observed behavior
Error showing an attempt to create a cloud function with the "same name".
Action YAML
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: