firebase-tools
firebase-tools copied to clipboard
firebase deploy default artifact registry
I have an org policy to set everything in Canada only, managed to deploy my firebase function in the target location but it seems that clean up of the container is pointing to a default registry in us.gcr.io? It's kinda annoying, do we have any options like in gcloud function deploy --docker-repository=?
firebase deploy --only functions --debug only
[2024-02-08T20:59:16.146Z] <<< [apiv2][status] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/staging/locations/northamerica-northeast1/repositories/gcf-artifacts/packages/before_signed_in 404
[2024-02-08T20:59:16.146Z] <<< [apiv2][body] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/staging/locations/northamerica-northeast1/repositories/gcf-artifacts/packages/before_signed_in {"error":{"code":404,"message":"Package \"projects/staging/locations/northamerica-northeast1/repositories/gcf-artifacts/packages/before_signed_in\" was not found.","status":"NOT_FOUND"}}
[2024-02-08T20:59:16.147Z] <<< [apiv2][status] GET https://us.gcr.io/v2/staging/gcf/northamerica-northeast1/tags/list 404
[2024-02-08T20:59:16.147Z] <<< [apiv2][body] GET https://us.gcr.io/v2/staging/gcf/northamerica-northeast1/tags/list {"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"us.gcr.io\" not found"}]}
[2024-02-08T20:59:16.147Z] Failed docker command with error HTTP Error: 404, Not Found {"name":"FirebaseError","children":[],"context":{"body":{"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"us.gcr.io\" not found"}],"error":{"message":"Not Found"}},"response":{"statusCode":404}},"exit":1,"message":"HTTP Error: 404, Not Found","status":404}
[2024-02-08T20:59:16.248Z] >>> [apiv2][query] GET https://us.gcr.io/v2/staging/gcf/northamerica-northeast1/tags/list [none]
[2024-02-08T20:59:16.370Z] <<< [apiv2][status] GET https://us.gcr.io/v2/staging/gcf/northamerica-northeast1/tags/list 404
[2024-02-08T20:59:16.370Z] <<< [apiv2][body] GET https://us.gcr.io/v2/staging/gcf/northamerica-northeast1/tags/list {"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"us.gcr.io\" not found"}]}
[2024-02-08T20:59:16.370Z] Failed docker command with error HTTP Error: 404, Not Found {"name":"FirebaseError","children":[],"context":{"body":{"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"us.gcr.io\" not found"}],"error":{"message":"Not Found"}},"response":{"statusCode":404}},"exit":1,"message":"HTTP Error: 404, Not Found","status":404}
Thanks for reporting this. I think we should be able to either expose an environment variable to set this location or automatically use the region of your functions. Assigning to @blidd-google to dig into it further.
Hi, I'm facing this same issue but I have not done some kind of customization. It is a simple default setup but the deletion is failing.
I just created an empty repository called us.gcr.io in the artifact registry. no idea if there are other considerations but it silences the issue