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

`firebase deploy` fails to delete task function with an underscore in its name

Open jangop opened this issue 8 months ago • 3 comments

[REQUIRED] Environment info

firebase-tools: 13.11.4

Platform: Ubuntu 23.10 / fish

[REQUIRED] Test case

from firebase_functions import tasks_fn

@tasks_fn.on_task_dispatched()
def dummy_function(request: tasks_fn.CallableRequest) -> str:
    return "Hello World"

[REQUIRED] Steps to reproduce

  1. Initialize functions.
  2. Save the above function in functions/main.py (the default).
  3. Execute firebase deploy --only functions. dummy_function will be deployed. (cf. https://github.com/firebase/firebase-tools/issues/6324)
  4. Rename dummy_function to dummy in functions/main.py.
  5. Execute firebase deploy --only functions. When queried for deletion of dummy_function, answer y (yes).

[REQUIRED] Expected behavior

The old function should be deleted.

[REQUIRED] Actual behavior

The old function is not deleted. Instead, an error is shown.

✔  functions: functions folder uploaded successfully

The following functions are found in your project but do not exist in your local source code:
	dummy_function(us-central1)

If you are renaming a function or changing its region, it is recommended that you create the new function first before deleting the old one to prevent event loss. For more info, visit https://firebase.google.com/docs/functions/manage-functions#modify

? Would you like to proceed with deletion? Selecting no will continue the rest of the deployments. (y/N) 
i  functions: deleting Python 3.12 (2nd Gen) function dummy_function(us-central1)...
HTTP Error: 400, Queue ID "dummy_function" can contain only letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). Queue ID must be between 1 and 100 characters.

jangop avatar Jun 23 '24 13:06 jangop