Skip to content

Deployed NextJS backend service name is too long #6137

@xSAVIKx

Description

@xSAVIKx

[REQUIRED] Environment info

firebase-tools: 12.4.4

Platform: Windows and Ubuntu

[REQUIRED] Test case

N/A. Just a test NextJS project with a pretty long GCP project ID

[REQUIRED] Steps to reproduce

  • Create a GCP project with a pretty long GCP project ID.
  • Create example Firebase + NextJS project.
  • Run firebase deploy.

[REQUIRED] Expected behavior

Deployment is successful.

[REQUIRED] Actual behavior

Deployment failed with the following error:

  [2023-07-16T20:09:13.743Z] <<< [apiv2][body] PUT https://run.googleapis.com/v1/projects/<PROJECT_NUMBER>/locations/europe-west1/services/ssr<PROJECT_ID>***"error":***"code":400,"message":"spec.traffic.tag: traffic tag 'fh-1d316462d434c000' and service name 'ssr<PROJECT_ID>' together are too long. Combined traffic tag and service name cannot exceed 46 characters.","status":"INVALID_ARGUMENT","details":[***"@type":"type.googleapis.com/google.rpc.BadRequest","fieldViolations":[***"field":"spec.traffic.tag","description":"traffic tag 'fh-1d316462d434c000' and service name 'ssr<PROJECT_ID>' together are too long. Combined traffic tag and service name cannot exceed 46 characters."***]***]***
  [2023-07-16T20:09:13.744Z] FirebaseError: HTTP Error: 400, spec.traffic.tag: traffic tag 'fh-1d316462d434c000' and service name 'ssr<PROJECT_ID>' together are too long. Combined traffic tag and service name cannot exceed 46 characters.
      at responseToError (/home/runner/work/delivo-business-portal-frontend/delivo-business-portal-frontend/node_modules/firebase-tools/lib/responseToError.js:49:12)
      at RetryOperation._fn (/home/runner/work/delivo-business-portal-frontend/delivo-business-portal-frontend/node_modules/firebase-tools/lib/apiv2.js:289:77)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  
  Error: Failed to replace Run service projects/<PROJECT_NUMBER>/locations/europe-west1/services/ssr<PROJECT_ID>

Most probably, the tooling used to generate the new traffic tag should ensure that the tag + service name is within the limits. Also, it'd be great if one can specify the SSR service name somewhere in the config and not rely on the project ID for the naming.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions