Skip to content
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

webframeworks deploy fails (404) by attempting delete of artifact #8164

Closed
fivecar opened this issue Feb 4, 2025 · 1 comment · Fixed by #8318 · May be fixed by #8324
Closed

webframeworks deploy fails (404) by attempting delete of artifact #8164

fivecar opened this issue Feb 4, 2025 · 1 comment · Fixed by #8318 · May be fixed by #8324

Comments

@fivecar
Copy link
Contributor

fivecar commented Feb 4, 2025

Environment info

firebase-tools:
[email protected]

Platform:
Ubuntu (GitHub Action)

Test case

Using an Astro project with webframeworks deployment, a GitHub Action Yaml like this causes failure:

      - name: Deploy site to Firebase Hosting
        uses: FirebaseExtended/action-hosting-deploy@v0
        with:
          repoToken: ${{ secrets.GITHUB_TOKEN }}
          firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_WAVEZ_PROD }}
          channelId: live
          projectId: wavez-prod
          target: site
        env:
          FIREBASE_CLI_EXPERIMENTS: webframeworks

Steps to reproduce

Run the GitHub Action

Expected behavior

Successful deploy with no errors

Actual behavior

The actual SSR function is deployed successfully (i.e. runs just fine), but the deployment script follows up with a "failure" during cleanup:

[2025-02-04T06:55:15.275Z] >>> [apiv2][query] GET https://cloudfunctions.googleapis.com/v2/projects/wavez-prod/locations/us-central1/operations/operation-1738651964031-62d4b74b441a5-8f575101-8491b3b2 [none]
  [2025-02-04T06:55:15.627Z] <<< [apiv2][status] GET https://cloudfunctions.googleapis.com/v2/projects/wavez-prod/locations/us-central1/operations/operation-1738651964031-62d4b74b441a5-8f575101-8491b3b2 200
  [2025-02-04T06:55:15.627Z] <<< [apiv2][body] GET https://cloudfunctions.googleapis.com/v2/projects/wavez-prod/locations/us-central1/operations/operation-1738651964031-62d4b74b441a5-8f575101-8491b3b2 ***"name":"projects/wavez-prod/locations/us-central1/operations/operation-1738651964031-62d4b74b441a5-8f575101-8491b3b2","metadata":***"@type":"type.googleapis.com/google.cloud.functions.v2.OperationMetadata","createTime":"2025-02-04T06:52:45.136667331Z","endTime":"2025-02-04T06:55:10.421862771Z","target":"projects/wavez-prod/locations/us-central1/functions/ssrwavezprod","verb":"update","cancelRequested":false,"apiVersion":"v2","requestResource":***"@type":"type.googleapis.com/google.cloud.functions.v2.Function","name":"projects/wavez-prod/locations/us-central1/functions/ssrwavezprod","buildConfig":***"runtime":"nodejs20","entryPoint":"ssrwavezprod","source":***"storageSource":***"bucket":"gcf-v2-sources-27727870047-us-central1","object":"ssrwavezprod/function-source.zip","generation":"1738651965037012"***,"enviro
  [2025-02-04T06:55:15.627Z] Got source token [elided by me] for region us-central1
  ✔  functions[firebase-frameworks-wavez-prod:ssrwavezprod(us-central1)] Successful update operation. 
  [2025-02-04T06:55:15.628Z] Total Function Deployment time: 151873
  [2025-02-04T06:55:15.630Z] 1 Functions Deployed
  [2025-02-04T06:55:15.630Z] 0 Functions Errored
  [2025-02-04T06:55:15.630Z] 0 Function Deployments Aborted
  [2025-02-04T06:55:15.630Z] Average Function Deployment time: 151872
  Function URL (firebase-frameworks-wavez-prod:ssrwavezprod(us-central1)): https://ssrwavezprod-fakkcqhmla-uc.a.run.app/
  i  functions: cleaning up build files... 
  [2025-02-04T06:55:15.631Z] No OAuth tokens found
  [2025-02-04T06:55:15.634Z] No OAuth tokens found
  [2025-02-04T06:55:15.634Z] >>> [apiv2][query] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/wavez-prod/locations/us-central1/repositories/gcf-artifacts/packages/ssrwavezprod [none]
  [2025-02-04T06:55:15.636Z] >>> [apiv2][query] GET https://us.gcr.io/v2/wavez-prod/gcf/us-central1/tags/list [none]
  [2025-02-04T06:55:15.936Z] <<< [apiv2][status] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/wavez-prod/locations/us-central1/repositories/gcf-artifacts/packages/ssrwavezprod 404
  [2025-02-04T06:55:15.936Z] <<< [apiv2][body] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/wavez-prod/locations/us-central1/repositories/gcf-artifacts/packages/ssrwavezprod ***"error":***"code":404,"message":"Package \"projects/wavez-prod/locations/us-central1/repositories/gcf-artifacts/packages/ssrwavezprod\" was not found.","status":"NOT_FOUND"***
  [2025-02-04T06:55:15.961Z] <<< [apiv2][status] GET https://us.gcr.io/v2/wavez-prod/gcf/us-central1/tags/list 200
  [2025-02-04T06:55:15.962Z] <<< [apiv2][body] GET https://us.gcr.io/v2/wavez-prod/gcf/us-central1/tags/list ***"child":[],"manifest":***,"name":"wavez-prod/gcf/us-central1","tags":[]***
  [2025-02-04T06:55:15.962Z] Could not find image for function projects/wavez-prod/locations/us-central1/functions/ssrwavezprod

The artifacts I do see via Google Console are these:

Image
@Ferchu425
Copy link

Hello, I was about to place a new issue but I believe this is heavily related to what Im seeing while doing "firebase deploy" to functions v2

[debug] [2025-02-20T19:16:54.999Z] >>> [apiv2][query] GET https://us.gcr.io/v2/test-prj/gcf/us-central1/tags/list [none]
[debug] [2025-02-20T19:16:55.015Z] <<< [apiv2][status] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/test-prj/locations/us-central1/repositories/gcf-artifacts/packages/demo_webhook 404
[debug] [2025-02-20T19:16:55.016Z] <<< [apiv2][body] DELETE https://artifactregistry.googleapis.com/v1beta2/projects/test-prj/locations/us-central1/repositories/gcf-artifacts/packages/demo_webhook {"error":{"code":404,"message":"Package \"projects/test-prj/locations/us-central1/repositories/gcf-artifacts/packages/demo_webhook\" was not found.","status":"NOT_FOUND"}}
[debug] [2025-02-20T19:16:55.275Z] <<< [apiv2][status] GET https://us.gcr.io/v2/test-prj/gcf/us-central1/tags/list 404
[debug] [2025-02-20T19:16:55.275Z] <<< [apiv2][body] GET https://us.gcr.io/v2/test-prj/gcf/us-central1/tags/list {"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"us.gcr.io\" not found"}]}
[debug] [2025-02-20T19:16:55.275Z] Failed docker command with error  Request to https://us.gcr.io/v2/test-prj/gcf/us-central1/tags/list had 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":"Request to https://us.gcr.io/v2/test-prj/gcf/us-central1/tags/list had HTTP Error: 404, Not Found","status":404}
[debug] [2025-02-20T19:16:55.386Z] Checked if tokens are valid: true, expires at: 1740080944796
[debug] [2025-02-20T19:16:55.387Z] Checked if tokens are valid: true, expires at: 1740080944796
[debug] [2025-02-20T19:16:55.389Z] >>> [apiv2][query] GET https://us.gcr.io/v2/test-prj/gcf/us-central1/tags/list [none]
[debug] [2025-02-20T19:16:55.972Z] <<< [apiv2][status] GET https://us.gcr.io/v2/test-prj/gcf/us-central1/tags/list 404
[debug] [2025-02-20T19:16:55.972Z] <<< [apiv2][body] GET https://us.gcr.io/v2/test-prj/gcf/us-central1/tags/list {"errors":[{"code":"NAME_UNKNOWN","message":"Repository \"us.gcr.io\" not found"}]}
[debug] [2025-02-20T19:16:55.973Z] Failed docker command with error  Request to https://us.gcr.io/v2/test-prj/gcf/us-central1/tags/list had 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":"Request to https://us.gcr.io/v2/test-prj/gcf/us-central1/tags/list had HTTP Error: 404, Not Found","status":404}
[warn] !  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/test-prj/us/gcf 

Hope it helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants