Repository navigation
Pending breaking changes #323
Description
These changes would alter behaviour or public types for existing code, so it would help to ship them together with a clear release note.
-
set_global_options()defaultscputo"gcf_gen1". Per-function options and Node'ssetGlobalOptionsleave it unset. Setting only a region is enough to change every function:@https_fn.on_request() def a(req): ... # a.__firebase_endpoint__.cpu == None options.set_global_options(region="europe-west1") @https_fn.on_request() def b(req): ... # b.__firebase_endpoint__.cpu == "gcf_gen1"
From reading firebase-tools, a 256MB function then gets less than one CPU and a concurrency of 1 instead of 80.
-
The minimum Python version is 3.10, which Cloud Functions deprecated on 2026-10-04 and will decommission on 2027-04-04. Raising the minimum to 3.11 is a breaking change. Separately, 3.14 is missing from the classifiers and CI, although the tests pass on it.
-
The auth blocking event times (
AuthBlockingEvent.timestampand the user metadata times) have no timezone, while other events' times include one. They are built withdatetime.utcfromtimestamp, which Python 3.14 warns will be removed. Making them timezone-aware breaks comparisons with datetimes that have no timezone. -
The Pub/Sub
Messagetypes don't match the values passed to the handler.publish_timearrives as adatetime,ordering_keycan beNone, and a message withoutdataraises aTypeErrorbefore the handler runs. fix(pubsub): accept messages without data #322 fixes all three. -
Adding
before_email_sentandbefore_sms_sentwill requireAuthBlockingEvent.datato become optional, as it is in the Node SDK. That will break type-checked code that readsevent.data.uid. -
VPC, schedule and task options are not reset when
preserve_external_changesis false. Node emitsvpc: null,timeZone: nullandretryConfig/rateLimitsfields asnull, and firebase-tools only clears a value when it seesnull. Python omits the keys, so a VPC connector, schedule timezone or task rate limit set in the console survives a deploy today. Matching Node would remove those on the next deploy. -
on_task_dispatchednever checks the request's auth. Node rejects dispatches without a Bearer token outside the emulator and fillsrequest.authfrom the OIDC token. Matching Node means callers that work today start getting 401. -
StorageObjectData.size,generationandmetagenerationare annotatedintbut arrive asstr, because proto3 JSON encodes int64 as a string.remote_config_fn.ConfigUpdateData.version_numberandrollback_sourcehave the same problem. Confirmed withgoogle.events.cloud.storage.StorageObjectData.to_json()and the Node SDK's own fixture, not with a live event. Either fix breaks someone: converting tointbreaks code doing string operations, and changing the annotation tostrbreaks type checks for code that trustedint.
Activity