decision(firestore-send-email): kit/extension parity – event source is per function, not per instance

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

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
firebase, typescript
Ambito
backend, cloud

Direzione di ricerca

Read kits/firestore-send-email/src/events.ts around lines 23–30 and compare its channel setup with the extension behavior described in the issue. The source is set by firebase-tools in deploy/functions/prepare.js, so check how EVENTARC_CLOUD_EVENT_SOURCE is assigned and review the related discussions in #3255, #3272, and #3290. Done means either events use a stable instance based source or the difference is accepted in #3290 and documented in the README Events section.

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

Descrizione

decision kits parity

firestore-send-email kit/extension parity. Priority: medium. Event consumers that filter on source stop receiving the kit's events.

Difference
  • Extension: source is the instance, //firebaseextensions.googleapis.com/extensions/projects/<project>/instances/<instance>.
  • Kit: the CLI sets source to the function's Cloud Run service, projects/<project>/locations/<region>/services/kit-<instance>-processQueue. That uses the camelCase function id, which doesn't match the real lowercase service name. .env can't override it, because EVENTARC_CLOUD_EVENT_SOURCE is a reserved key. Event types, subject and data are otherwise the same.
Reproduced

Both instances published to the same channel and a recorder captured the events:

  • Extension: //firebaseextensions.googleapis.com/extensions/projects/corie-testing/instances/sepext
  • Kit: projects/corie-testing/locations/us-central1/services/kit-sepkit-processQueue
Code
  • Kit: channel setup events.ts#L23-L30. The source comes from firebase-tools (deploy/functions/prepare.js, EVENTARC_CLOUD_EVENT_SOURCE).
Resolution

Same call as #3255 and #3272:

  • either set a stable, instance-based source on published events;
  • or record this as an accepted difference under "Decisions" in #3290 and document it in the README's Events section.
Lingua principale
TypeScript
Stelle
979
Fork
436
Merge medio
2g 13h
PR unite (30g)
18

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.