firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

firebase deploy default artifact registry

Open ntang86 opened this issue 1 year ago • 3 comments

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}

ntang86 avatar Feb 08 '24 21:02 ntang86

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.

joehan avatar Feb 27 '24 18:02 joehan

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.

waqadArshad avatar May 13 '24 20:05 waqadArshad

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

ssadel avatar May 13 '24 20:05 ssadel