Open baumstern opened 1 year ago
Do you happen to have any more information on why the deployment failed? BTW, yes it would be great to be able to have a sanity check on the deployment.
Do you happen to have any more information on why the deployment failed? BTW, yes it would be great to be able to have a sanity check on the deployment.
GCP API rate-limit would be possible cause. They recommend to group functions 10 or fewer:
When deploying large numbers of functions, you may exceed the standard quota and receive HTTP 429 or 500 error messages. To solve this, deploy functions in groups of 10 or fewer.
I investigated further and it turns out the deployment had been failed due to GCP side bug. A required permission to deploy Cloud Functions had not provisioned in-time(too late):
"Unable to retrieve the repository metadata for projects/redacted/locations/us-central1/repositories/gcf-artifacts. Ensure that the Cloud Functions service account has 'artifactregistry.repositories.list' and 'artifactregistry.repositories.get' permissions. You can add the permissions by granting the role 'roles/artifactregistry.reader'."
Retried to execute firebase deploy --only functions
passed those permission check and deployment had succeed. Filed an issue addressing this problem to related Firebase repo: https://github.com/firebase/firebase-tools/issues/5244
GCP API rate-limit would be possible cause. They recommend to group functions 10 or fewer:
I really like this one. Actually, we are "grouping" related functions in the same file, but I wasn't aware about this issue and this grouping feature.
I investigated further and it turns out the deployment had been failed due to GCP side bug. A required permission to deploy Cloud Functions had not provisioned in-time(too late):
Okay, I got it. This is evident from the initial deployment log, it activates the services but does not do in time. Thank you for opening an issue on that. I'll keep an eye on it :)
Did we manage to resolve the issue? @gurrpi I noticed that they closed the issue that you had opened from the Firebase team.
Did we manage to resolve the issue? @gurrpi I noticed that they closed the issue that you had opened from the Firebase team.
I think it is possible that it could still happen. What do you think would be the best way to resolve this issue?
Did we manage to resolve the issue? @gurrpi I noticed that they closed the issue that you had opened from the Firebase team. firebase/firebase-tools#5244
I think it is possible that it could still happen. What do you think would be the best way to resolve this issue?
From what the Firebase team says the main problem would seem to be that "it takes time for GCP IAM permissions grants to propagate." I was thinking that in that case, there would be no game changer solution other than to specify in the Coordinator Guide this limitation and ask, in case it occurs, to try again.
An alternative would be to investigate whether or not it is possible to enable these services before deployment so that they are already propagated when we run it. It turns out to be a minor problem right now, but let's leave these issue open and iterate on it later.
@gurrpi Any further thoughts on this?
It is possible to deploy only 1 of total 27 functions. Functions deployment verification would be useful when such a case happened.
Reproduce