Skip to content

fix: serialize nested map values during ingestion - #190

Open
agocharbhatia wants to merge 1 commit into
tinybirdco:mainfrom
agocharbhatia:serialize-ingest-map-values
Open

agocharbhatia wants to merge 1 commit into
tinybirdco:mainfrom
agocharbhatia:serialize-ingest-map-values

Conversation

@agocharbhatia

Copy link
Copy Markdown

Summary

Ingest now applies the existing value serializer to Map entries. An event containing a Map<string, bigint> previously threw before the SDK could call the Events API, and a nested Map could arrive as an empty object.

Map entry value → existing ingest serializer → JSON request

Evidence

  • Before the fix, three request-level regressions failed. A large integer threw, a nested map lost its entries, and a Date bypassed the existing validation.
  • After the fix, all three pass. The tests check the request body for exact integer strings and nested entries, and verify that a Date is rejected before a request is made.
  • The local build, typecheck, and all 1,068 tests passed with Node 22.

Merge Danger

Door Two-way. Blast radius Ingest payloads containing maps. Existing key coercion and the value rules used elsewhere in ingest are preserved.

This branch has not been deployed

No deployments
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.

1 participant