Skip to content

Warning "Unhandled error cleaning up build images" #6882

@BenJackGill

Description

@BenJackGill

[REQUIRED] Environment info

firebase-functions: 4.8.0
firebase-tools: 13.5.1
Ubuntu: Latest

[REQUIRED] Test case

Unable to provide minimal example since this is happening in Github Actions CICD.

But Firebase Functions deploy always has this warning:

functions: Unhandled error cleaning up build images. This could result in a small monthly bill if not corrected. You can attempt to delete these images by redeploying or you can delete them manually at https://console.cloud.google.com/gcr/images/development-c46c5/us/gcf

[REQUIRED] Steps to reproduce

  1. Create and deploy a Gen 2 Firebase Function in Github Actions CICD pipeline using ubuntu-latest.
  2. See that some build images are not cleaned up.

Note: only some function images are there. I cannot figure out a rhyme or reason to which ones it will be. But there is always some that are not cleaned up.

The debug logs show that it is trying to cleanup us.gcr.io but it is not found. In artifact registry it shows gcf-artifacts so maybe it's trying to clean up the wrong thing?

Screenshot 2024-03-15 at 4 41 37 pm

Someone else also posted this very similar issue here on Stackoverflow.

[REQUIRED] Expected behavior

It should clean up the gcf-artifacts artifact images.

[REQUIRED] Actual behavior

It always has some images that are not cleaned up.

Related Logs:

[2024-03-15T08:52:54.398Z] <<< [apiv2][status] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/development-c46c5/locations/us-central1/repositories/gcf-artifacts/packages/firestoreserpgridondocumentcreated 404
[2024-03-15T08:52:54.398Z] <<< [apiv2][body] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/development-c46c5/locations/us-central1/repositories/gcf-artifacts/packages/firestoreserpgridondocumentcreated {"error":{"code":404,"message":"Package \"projects/development-c46c5/locations/us-central1/repositories/gcf-artifacts/packages/firestoreserpgridondocumentcreated\" was not found.","status":"NOT_FOUND"}}
[2024-03-15T08:52:54.462Z] <<< [apiv2][status] GET https://us.gcr.io/v2/development-c46c5/gcf/us-central1/tags/list 404
[2024-03-15T08:52:54.462Z] <<< [apiv2][body] GET https://us.gcr.io/v2/development-c46c5/gcf/us-central1/tags/list {"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"us.gcr.io\" not found"}]}
[2024-03-15T08:52:54.463Z] 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-03-15T08:52:54.563Z] >>> [apiv2][query] GET https://us.gcr.io/v2/development-c46c5/gcf/us-central1/tags/list [none]
[2024-03-15T08:52:54.678Z] <<< [apiv2][status] GET https://us.gcr.io/v2/development-c46c5/gcf/us-central1/tags/list 404
[2024-03-15T08:52:54.678Z] <<< [apiv2][body] GET https://us.gcr.io/v2/development-c46c5/gcf/us-central1/tags/list {"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"us.gcr.io\" not found"}]}
[2024-03-15T08:52:54.678Z] 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}
⚠  functions: Unhandled error cleaning up build images. This could result in a small monthly bill if not corrected. You can attempt to delete these images by redeploying or you can delete them manually at https://console.cloud.google.com/gcr/images/development-c46c5/us/gcf 

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions