FundingCircle / jackdaw

A Clojure library for the Apache Kafka distributed streaming platform.
https://fundingcircle.github.io/jackdaw/
BSD 3-Clause "New" or "Revised" License
369 stars 80 forks source link

New EDN Serde Without the Newline #190

Closed creese closed 4 years ago

creese commented 5 years ago

This PR adds a new EDN Serde to a separate location (jackdaw.serdes). In the future, we may want to require all serdes from there.

This serde fixes a longstanding bug in the EDN serde. It does not print a newline. This is important when writing keys since the newline can cause the record to hash to a different partition.

This PR also changes the generated class jackdaw.serdes.EdnSerde which now points to the new serde. For applications that define EDN as the default serde for keys, this is a BREAKING CHANGE.

codecov[bot] commented 4 years ago

Codecov Report

Merging #190 into master will decrease coverage by 0.19%. The diff coverage is 45.83%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #190     +/-   ##
=========================================
- Coverage   81.62%   81.43%   -0.2%     
=========================================
  Files          39       40      +1     
  Lines        2373     2391     +18     
  Branches      149      149             
=========================================
+ Hits         1937     1947     +10     
- Misses        287      295      +8     
  Partials      149      149
Impacted Files Coverage Δ
src/jackdaw/serdes/edn.clj 100% <ø> (+19.23%) :arrow_up:
src/jackdaw/serdes/edn2.clj 45.45% <45.45%> (ø)
src/jackdaw/serdes.clj 80% <50%> (-20%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a0c4cb9...f55a60f. Read the comment docs.