Repository navigation
fix(delete-user-data): match the extension's cpu, concurrency and ingress - #3276
Merged
Merged
Conversation
…ress The kit's functions took the 2nd gen defaults (concurrency 80, 1 vCPU, ALLOW_ALL). With auto-discovery on, one 256MiB handleSearch instance took many searches at once, ran out of memory and dropped them, so user data was left undeleted. Pin concurrency 1, cpu gcf_gen1 and internal-only ingress on clearData, handleSearch and handleDeletion. Fixes #3250
Contributor
There was a problem hiding this comment.
Code Review
This pull request configures the clearData, handleSearch, and handleDeletion functions in the delete-user-data kit to run with specific runtime settings (concurrency: 1, cpu: "gcf_gen1", and ingressSettings: "ALLOW_INTERNAL_ONLY"). This aligns their behavior with the 1st generation extension settings and prevents out-of-memory errors caused by the 2nd generation defaults (such as concurrency of 80). The changes also include updates to the documentation, changelog, and unit tests to verify these configurations. There are no review comments, so I have no feedback to provide.
CorieW
commented
Oct 27, 2026
…obal options still apply
CorieW
marked this pull request as ready for review
October 27, 2026 11:41
IzaakGough
reviewed
Oct 27, 2026
IzaakGough
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pins the extension's
concurrency: 1,cpu: "gcf_gen1"andingressSettings: "ALLOW_INTERNAL_ONLY"on all three kit functions, so auto-discovery no longer runshandleSearchout of memory and silently skips deletions. Fixes #3250.Follows #3209 (
firestore-bigquery-export) and #3233 (firestore-send-email). #3206 sets concurrency and ingress for this kit but notcpu, and is open with conflicts, so this lands thedelete-user-datapart on its own; #3206 can drop this kit.Changes
clearData,handleSearchandhandleDeletiondeclareconcurrency: 1,cpu: "gcf_gen1"andingressSettings: "ALLOW_INTERNAL_ONLY".setGlobalOptions({ maxInstances })before loading the kit).__endpointhas the three options.Testing
Deployed side by side on a test project, each with its own Firestore database: extension
firebase/delete-user-data@0.1.30, the kit fromkits@ fcdd555, and the kit from this branch. Same config for all: auto-discovery on, depth 1, default search fields, shallow mode, no paths. Each database has 20 root collections × 2,500 docs (~2 KB each) plus one doc per collection owned by the test user. I then created and deleted the user and counted the user's docs about 3 minutes later. Two runs:ALLOW_INTERNAL_ONLYALLOW_ALLALLOW_INTERNAL_ONLYhandleSearchfailuresMemory limit of 256 MiB exceeded, 18–19 × "The request failed because ... connection to the instance had an error" per runclearData) and both Pub/Sub topics (20handleSearchand 20handleDeletionrequests per run).vitest run: 122 tests pass. Prettier passes on the changed files.tscpasses once@types/nodeis available; the kit's tsconfig lists it, but it isn't installed onkits, sopnpm buildfails there with or without this change.