Skip to content

fix(logs): update apache-avro crate to fix serialization issue#42369

Merged
frankh merged 5 commits intomasterfrom
frank/logs-update-avro-crate
Dec 1, 2025
Merged

fix(logs): update apache-avro crate to fix serialization issue#42369
frankh merged 5 commits intomasterfrom
frank/logs-update-avro-crate

Conversation

@frankh
Copy link
Copy Markdown
Contributor

@frankh frankh commented Dec 1, 2025

Problem

there's a bug in the "bigdecimal" crate which somehow breaks certain json serializations of floating point values in maps - this was causing issues with the nodejs library

the apache-avro crate requires bigdecimal. Luckily, they fixed this transitive dependency issue in apache/avro-rs#219 so updating this crate solves the problem

BUT updating the apache-avro crate causes serde to be updated, which breaks the compilation of cymbal due to transitive dependencies on SWC

This needs to be fixed in js-sources-scopes (fix is here getsentry/js-source-scopes#30) and then this fix needs to be brought into getsentry/symbolic (I made a PR here getsentry/symbolic#945)

without this fix i added a patch to include the dependency fixes in js-sources-scopes

Changes

update the crate, fix the bug, patch js-sources-scopes

How did you test this code?

ran locally, confirmed before/after updating fixed the issue

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Changelog: (features only) Is this feature complete?

@frankh frankh requested review from Copilot and jonmcwest December 1, 2025 11:14
@wiz-7ad640923b
Copy link
Copy Markdown

wiz-7ad640923b Bot commented Dec 1, 2025

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities 3 High 10 Medium 1 Low
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Total 3 High 10 Medium 1 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Copy link
Copy Markdown
Contributor

@jonmcwest jonmcwest left a comment

Choose a reason for hiding this comment

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

good spot

Comment thread rust/Cargo.lock
dependencies = [
"autocfg",
"libm",
"num-bigint",
"num-integer",
"num-traits",
"serde",
"serde_json",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this is the root cause

@frankh frankh enabled auto-merge (squash) December 1, 2025 11:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a serialization bug affecting floating point values in maps by updating the apache-avro crate from 0.18.0 to 0.21.0. The root cause was a transitive dependency issue in the bigdecimal crate, which has been resolved in the newer version by removing its dependency on serde_json.

  • Updated apache-avro from 0.18.0 to 0.21.0 to bring in the fixed bigdecimal dependency
  • The bigdecimal crate (transitive dependency) updated from 0.4.8 to 0.4.9, removing the problematic serde_json dependency
  • Various transitive dependencies updated as part of the apache-avro upgrade

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
rust/capture-logs/Cargo.toml Updated apache-avro version specification from 0.18.0 to 0.21.0
rust/Cargo.lock Lock file updates reflecting apache-avro upgrade and all transitive dependency changes, including the critical bigdecimal fix that removes serde_json dependency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

update apache-avro to 0.21.0 -> this fixes a strange serde deserialization error:
apache/avro-rs#219

this updates the serde lib which causes swc_common to break

swc_common is required by js-source-scopes which is required by symbolic

update symbolic to latest version, but that only requires js-source-scopes 0.6.0 where we need 0.7.0

so patch the js-source-scopes to include the swc depedency fixes
@frankh frankh force-pushed the frank/logs-update-avro-crate branch from 109395d to 6e72290 Compare December 1, 2025 12:08
@frankh frankh merged commit 0b048a7 into master Dec 1, 2025
116 of 146 checks passed
@frankh frankh deleted the frank/logs-update-avro-crate branch December 1, 2025 13:47
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.

3 participants