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

Labels not applied to Cloud Run services - difficult to monitor costs

Open Desno365 opened this issue 1 year ago • 0 comments

[REQUIRED] Environment info

firebase-tools: 13.22.1

Platform: macOS

[REQUIRED] Test case

If you deploy a V2 function with custom labels, labels are not applied to the Cloud Run service, making it difficult to monitor the costs associated with the service.

A simple test case is the following:

const { onRequest } = require("firebase-functions/v2/https");

exports.hello = onRequest(
  { labels: { "cost_center": "sales" } },
  (req, res) => {
    res.status(200).send("Hello world!");
  }
);

[REQUIRED] Steps to reproduce

  1. Deploy any V2 function with custom labels
  2. Check on https://console.cloud.google.com/run the labels associated with the service
  3. Custom labels are not applied to the service

[REQUIRED] Expected behavior

Labels should be applied to the Cloud Run service so that costs associated with the service can be monitored.

[REQUIRED] Actual behavior

No labels are applied to the Cloud Run service. Screenshot 2024-10-19 at 11 01 55

Desno365 avatar Oct 19 '24 09:10 Desno365