Repository navigation
fix(delete-user-data): recommend .env.<projectId> and document kit uninstall - #3284
Conversation
…tall functions:kits:uninstall only deletes deployed resources for a project with a .env.<projectId> file, so with a plain .env the kit kept running after uninstall. Recommend .env.<projectId> and add an Uninstall section covering the topics and IAM bindings it leaves behind.
There was a problem hiding this comment.
Code Review
This pull request updates the documentation for the delete-user-data kit, recommending the use of .env.<projectId> instead of a plain .env file to ensure that the firebase functions:kits:uninstall command can properly identify and delete deployed resources. It also adds a detailed 'Uninstall' section to the README explaining the uninstallation process and manual cleanup steps. The review feedback suggests shortening the changelog entry for readability, clarifying the explanation of how the uninstall command interacts with plain .env files, and maintaining consistent present tense throughout the new documentation.
|
For the "Still to fix in firebase-tools", test using latest |
| @@ -1,3 +1,5 @@ | |||
| - fix: the README now recommends `.env.<projectId>` for instance config and has an Uninstall section. `firebase functions:kits:uninstall` only deletes deployed resources for a project with a `.env.<projectId>` file, so with the plain `.env` the README suggested before, it removed the instance from `firebase.json` and exited without an error but left the functions running and deleting user data. The new section also covers the Pub/Sub topics and IAM role bindings that uninstall leaves behind. | |||
…data-uninstall-docs
…data-uninstall-docs
…r the kit's only instance
…data-uninstall-docs # Conflicts: # kits/delete-user-data/CHANGELOG.md
Recommends
.env.<projectId>for kit config and adds an Uninstall section to the README.firebase functions:kits:uninstallonly deletes resources when the instance has a.env.<projectId>file. With the plain.envthe README suggested, uninstall exits 0, but the functions keep running and keep deleting user data. Fixes #3262. Part of #3249.Changes
.env→.env.<projectId>, noting that a plain.envdeploys the same way but uninstall ignores it..env, and what's left behind compared with the extension (two Pub/Sub topics, and the deleted service account's IAM bindings).Testing
On
corie-testingwith firebase-tools 15.31.0, I installedfirebase/delete-user-data@0.1.30and three kit instances fromorigin/kits, then uninstalled each:r3262-ext: extension, withfirebase ext:uninstall --immediate.r3262-kit: kit with a plain.env(old README).r3262-fix: kit set up as the new README says.r3262-rec: kit with a plain.env, uninstalled, then recovered as the new README says..env).env.<projectId>, and after recovery)firebase.jsonfirebase.jsondeleted:serviceAccount:bindings left.env.corie-testingloads the same values as.env; the deployed env vars matched apart from the instance id.npx vitest runpasses (119 tests). Prettier passes on my edits (the README tables already failed before).tsc -bpasses with@types/nodetemporarily installed; without itpnpm buildfails, which this change doesn't cause.gcloud projects remove-iam-policy-bindingcommand here.