Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix raw events with empty params #460

Merged
merged 2 commits into from
Mar 4, 2025
Merged

Conversation

DZakh
Copy link
Member

@DZakh DZakh commented Feb 28, 2025

No description provided.

@DZakh DZakh force-pushed the dz/fix-raw-events-wth-empty-param branch from f8195cd to 1c43813 Compare February 28, 2025 13:37
Comment on lines +286 to +291
let params = if params === %raw(`null`) {
// Should probably make the params field nullable
// But this is currently needed to make events
// with empty params work
%raw(`"null"`)
} else {
Copy link
Member Author

Choose a reason for hiding this comment

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

I know it's dirty, but this is what we did for fuel. Actually, with the change I moved some code from coerceToJsonPgType which made things a little bit simpler.
Ideally, all the raw_events table schema should be configured in a config and managed automatically by our db framework (which we discussed with Jono but haven't implemented)

Copy link
Contributor

@DenhamPreen DenhamPreen left a comment

Choose a reason for hiding this comment

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

Logically reading the code makes sense and I can't think of how this would break things but I'm not that familiar with the in's and outs of this :)

@DZakh DZakh enabled auto-merge (squash) March 4, 2025 08:18
@DZakh DZakh merged commit 8271735 into main Mar 4, 2025
1 check passed
@DZakh DZakh deleted the dz/fix-raw-events-wth-empty-param branch March 4, 2025 08:27
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.

2 participants