Firebase · sdk · fg-0631

Python Cloud Functions suddenly run with 80 concurrent requests per instance after upgrading firebase-functions to 0.7.0

If you see Race conditions or shared-state bugs in Python functions after upgrade, the cause and the fix for Firebase are below, last verified 2026-12-04.

Verified Dec 2026trust 50/100
Symptom
Race conditions or shared-state bugs in Python functions after upgradeChanged cost and instance count with no code changeTypeError comparing AuthBlockingEvent.timestamp with a naive datetimeHandler tests fail constructing AuthBlockingEvent without auth_type and resource
Cause
In firebase-functions 0.7.0, set_global_options() no longer sets cpu to gcf_gen1 by default, so functions get the 2nd gen default of 1 vCPU and up to 80 concurrent requests per instance. Auth blocking timestamps are now timezone-aware UTC datetimes, creation_time can be None, AuthBlockingEvent requires auth_type and resource, and pubsub Message.data can be None.
Fix
Make code safe for concurrency or restore the old behavior with cpu gcf_gen1. Compare timestamps with timezone-aware datetimes, add None checks, and pass the new required fields in tests.
Apply
from firebase_functions import options options.set_global_options(cpu="gcf_gen1")
Affected
firebase-functions Python SDK 0.7.0 and later, released 2026-12-03
Sources

Last verified 2026-12-04 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun