fix(firestore-send-email): kit/extension parity – kit uninstall leaves the function running or its secrets behind

Aperta
#3,297 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 7 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
51/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
firebase, typescript
Ambito
cli, devtools

Direzione di ricerca

Start with the kit README at kits/firestore-send-email/README.md#L49 and #L85-L90, then inspect firebase-tools' commands/functions-kits-uninstall.js, which the issue identifies as the source of the behavior. Compare uninstall handling for plain .env and .env.<project> files and check how kit secrets and IAM bindings are cleaned up. Done means the README’s documented uninstall layout no longer leaves the function or secrets behind, or clearly explains the required cleanup.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

kits parity type: bug

firestore-send-email kit/extension parity. Priority: medium. Uninstalling a kit set up the way the README describes leaves the function running and still sending mail. A successful uninstall also leaves the instance's secrets behind.

Difference
  • Extension: deleting the instance removes the function, the service account, its IAM bindings and its managed secrets.
  • Kit (firebase functions:kits:uninstall --instance <id>, firebase-tools 15.31.0):
    • Plain .env (the README's Usage layout): the command exits 0 and removes the instance from firebase.json, but deletes nothing. It warns only that the config folder "still contains files (.env)". The function stays deployed and keeps processing the mail collection.
    • Any other .env.<x> file in the folder (for example .env.bak): the command fails with Instance at … contains no .env file for current project.
    • With .env.<projectId>: the function and service account are deleted, but the four kit-<id>-* secrets stay in Secret Manager (one holds the SMTP password), along with four deleted:serviceAccount:… IAM bindings.
Reproduced
  • Plain .env: uninstall exited 0, the instance left firebase.json, and kit-sepeu-processQueue stayed ACTIVE.
  • With .env.corie-testing: the function and service account were deleted. kit-sepmig2-{SMTP_PASSWORD,CLIENT_ID,CLIENT_SECRET,REFRESH_TOKEN} and four dangling project IAM bindings remained.
  • Extension: deleting the instance left no function, service account or IAM binding.
Code
  • Kit README tells users to configure with .env: README.md#L49, #L85-L90
  • The behaviour itself is in firebase-tools commands/functions-kits-uninstall.js (only .env.<project> files are acted on; secrets are not deleted).
Resolution

Same as #3262 for delete-user-data:

  • the CLI should also act on a plain .env, or refuse with a clear error;
  • it should offer to delete the kit-<id>-* secrets.

Until then, the README should say to use .env.<projectId> and to delete the secrets by hand.

Lingua principale
TypeScript
Stelle
979
Fork
436
Merge medio
4g 12h
PR unite (30g)
13

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di firebase/extensions

Tutte le issue di firebase/extensions

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.