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

Function deploy fails to delete scheduled function without Cloud Scheduler job

Open taeold opened this issue 2 years ago • 8 comments

[REQUIRED] Environment info

firebase-tools: 11.4.0

Platform: macOS

[REQUIRED] Test case

import * as functions from "firebase-functions";

export const v1scheduled = functions.pubsub.schedule("every 30 minutes").onRun(() => {});

[REQUIRED] Steps to reproduce

  1. Deploy a scheduled function
  2. Delete the Cloud Scheduler job associated w/ the scheduled function
  3. Try deleting the function via firebase functions:delete <fn>

[REQUIRED] Expected behavior

Delete the pubsub topic and the function

[REQUIRED] Actual behavior

Command fails:

HTTP 404: Job not found

You have to go manually delete the function in Cloud console. This is annoying, especially if you are running something like firebase deploy --force to clean up old functions as it marks the entire deployment as failed.

taeold avatar Jul 28 '22 18:07 taeold