Segment Reverse ETL Delivery Failure Gate
Trigger a Segment Reverse ETL sync, classify it OK, PARTIAL_FAILURE, or FAILED by status and delivery count, alert Slack, and log a governance audit trail.
Snapshot Firestore collections to Git nightly with Kestra. Each document change becomes a one-line diff, and it runs on the free Firebase plan.
Small, hand-edited Firestore collections such as settings, feature flags or price lists have no history: once someone changes a value in the console, the old one is gone. This flow commits those collections to a Git repository every night, one JSON line per document, so each change shows up as a diff.
Schedule trigger starts the flow every night at 02:00.Loop runs once per collection in the collections input.{"id": ..., "data": ...} with sorted keys, so an unchanged collection gives an identical file.UploadFiles stages each file as a namespace file, and PushNamespaceFiles commits them to firestore/firestore-snapshots/ in the repository. No commit is made when nothing changed.errors branch posts the execution ID to Slack.roles/datastore.viewer and a JSON key.python:3.12-slim image.GCP_SERVICE_ACCOUNT: service account JSON key used to read Firestore.GITHUB_USERNAME: Git username that owns the token.GITHUB_TOKEN: token used to push commits, for example a GitHub fine-grained token with Contents: Read and write on the snapshot repository.SLACK_WEBHOOK: Slack incoming webhook URL for failure alerts.project_id, repo_url and collections, then check firestore/firestore-snapshots/ in the repository.project_id and repo_url in the trigger inputs to run it nightly.