Skip to content

fix: tolerate 404 when deleting scheduled function's schedule - #10884

Open
IzaakGough wants to merge 4 commits into
mainfrom
@invertase/fix-issue-4795
Open

fix: tolerate 404 when deleting scheduled function's schedule#10884
IzaakGough wants to merge 4 commits into
mainfrom
@invertase/fix-issue-4795

Conversation

@IzaakGough

@IzaakGough IzaakGough commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #4795

When deleting a scheduled function, firebase deploy failed the whole deployment if the Cloud Scheduler job or its Pub/Sub topic was already gone (404). Deleting a resource that doesn't exist is the desired end state, so these deletes now tolerate a 404 and continue; non-404 errors still fail as before.

This unblocks users who hit a partially-deleted schedule and could not deploy again without manual cleanup.

Testing

  • Manually checked that fix works on real deploy
  • Automated tests pass

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Fabricator to ignore 404 errors when deleting Cloud Scheduler jobs or Pub/Sub topics, ensuring that already-deleted resources do not cause deployment failures. The feedback suggests using the existing parseErrorCode utility from ./executor instead of getErrStatus to more robustly detect 404 status codes from raw GCP API errors, and removing the unused import.

Comment thread src/deploy/functions/release/fabricator.ts Outdated
Comment thread src/deploy/functions/release/fabricator.ts Outdated
@IzaakGough
IzaakGough marked this pull request as ready for review August 6, 2026 10:36

@cabljac cabljac left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@wandamora wandamora left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for google review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Function deploy fails to delete scheduled function without Cloud Scheduler job

3 participants