Skip to content

fix: build firestore resource path from event fields instead of event…#1935

Closed
IzaakGough wants to merge 1 commit into
masterfrom
@invertase/fix-trigger-breaking-with-trailing-space-docid
Closed

fix: build firestore resource path from event fields instead of event…#1935
IzaakGough wants to merge 1 commit into
masterfrom
@invertase/fix-trigger-breaking-with-trailing-space-docid

Conversation

@IzaakGough

@IzaakGough IzaakGough commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Fixes #1922

relnote: none

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request resolves an issue where a malformed event.source attribute in CloudEvents causes errors when creating Firestore snapshots. It updates createSnapshot and createBeforeSnapshot to use getPath(event) instead of event.source for JSON-encoded events. Additionally, regression tests have been added to verify this behavior, including cases with malformed sources and document IDs containing trailing spaces. I have no feedback to provide.

@IzaakGough

Copy link
Copy Markdown
Contributor Author

Closing as wrong direction for fix. This needs to be fixed upstream

@IzaakGough IzaakGough closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Firestore Functions Triggers Breaks

2 participants