Skip to content

chore(firestore-bigquery-change-tracker): release 2.1.1, accept firebase-admin 14 - #3133

Merged
cabljac merged 2 commits into
nextfrom
chore/tracker-admin-14-release
Sep 7, 2026
Merged

chore(firestore-bigquery-change-tracker): release 2.1.1, accept firebase-admin 14#3133
cabljac merged 2 commits into
nextfrom
chore/tracker-admin-14-release

Conversation

@cabljac

@cabljac cabljac commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

The change tracker pins firebase-admin to ^13.2.0. A consumer on firebase-admin 14 therefore installs a second copy of the SDK nested under the tracker, and that copy has its own app registry: the consumer's initializeApp() never reaches it. Every call the tracker makes through its own copy, which today is the backup write in handleFailedTransactions, fails with "The default Firebase app does not exist", the failure is logged as failedBackupWrite, and the rows meant for backupTableId are lost. Verified by loading both copies in one process against the published 2.1.0.

The range was already widened to ^13.2.0 || ^14.0.0 on the kits branch (cc86630) but that landed at 2.0.4 and was never published; 2.1.0 was cut from next without it. This cherry-picks that commit onto next and releases it as 2.1.1 with a changelog entry. No source changes: the tracker only uses getFirestore, firebase-admin/app and Timestamp, all unchanged between 13 and 14, and the firebase-functions 6 it depends on already accepts admin 14.

npm ci and npm run build pass. The jest suite needs live BigQuery and was not run.

Unblocks the kit bump in #3127.

@cabljac
cabljac requested a review from a team as a code owner September 7, 2026 14:30

@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 @firebaseextensions/firestore-bigquery-change-tracker to version 2.1.1, expanding the firebase-admin dependency range to support both version 13 and 14 (^13.2.0 || ^14.0.0). The review feedback points out that the package-lock.json file is out of sync with package.json because the updated dependency range is not reflected in the lockfile, and recommends running npm install to regenerate it.

@cabljac
cabljac force-pushed the chore/tracker-admin-14-release branch from 033272d to a8f962b Compare September 7, 2026 14:40
@cabljac
cabljac merged commit c3522bf into next Sep 7, 2026
18 checks passed
@cabljac
cabljac deleted the chore/tracker-admin-14-release branch September 7, 2026 14:50
cabljac added a commit that referenced this pull request Sep 7, 2026
…ase-admin 14 (#3134)

Follow-up to #3133. 2.1.1 widened the firebase-admin range to `^13.2.0
|| ^14.0.0` but two things stopped it working on 14.

First, firebase-admin 14 removes the namespaced API. The package still
read `admin.apps` at import in `handleFailedTransactions` and
`admin.firestore.Timestamp` in the partition converter, so wherever it
resolved against admin 14 it threw `Cannot read properties of undefined
(reading 'length')` at import. Every namespaced use, in shipped code,
the test fixture and the tests, is now the modular API from
`firebase-admin/app` and `firebase-admin/firestore`, which is identical
on 13 and 14.

Second, the package depends on firebase-functions `^6.3.2`, whose peer
range for firebase-admin stops at `^13.0.0`. On a consumer running admin
14 npm therefore kept a nested admin 13 under the tracker regardless of
the tracker's own range, and that nested copy has no default app. Under
npm that nesting is also why 2.1.1 did not crash: `admin.apps` resolved
on the nested 13. The range now accepts firebase-functions 7 as well;
the package only uses its `logger`.

Verified: build and the test tsconfig compile against admin 14.3.0 and
functions 7.3.2; `converter.test.ts` passes (48) on that tree; the
packed tarball installed into the firestore-bigquery-export kit on admin
14, followed by `npm dedupe`, collapses to a single admin copy, the
tracker resolves the kit's app, and all 62 kit tests pass. An existing
consumer shrinkwrap does not dedupe on its own, since the nested 13
still satisfies the new ranges, so the kit bump must dedupe explicitly.
The kit pins firebase-functions `^7.3.3-rc.0`, which no stable range
matches, so a nested firebase-functions 7.3.2 remains under the tracker
until the kit moves to a stable 7.x; that only affects trace correlation
on tracker log lines, not the admin app.

The lockfile stays on admin 13 and functions 6 because under admin 14
the jest config cannot load the ESM-only `jose` that firebase-functions
v2 pulls in via admin auth; that is a jest `transformIgnorePatterns` gap
for a separate change. The live BigQuery suites were not run.

Unblocks the kit bump in #3127.
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.

2 participants