• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mostafa / xk6-kafka / 23087537966
71%

Build:
DEFAULT BRANCH: main
Ran 14 Mar 2026 12:05PM UTC
Jobs 1
Files 16
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Mar 2026 12:01PM UTC coverage: 70.923% (-1.1%) from 72.036%
23087537966

push

github

web-flow
Fix: Support wrapped primitive types in Avro union fields (#379)

* Fix: Support wrapped primitive types in Avro union fields

Fixes #376

The convertUnionField function was unable to handle wrapped primitive
types in union fields (e.g., {"int": 20474} or {"int.date": 20474}).
This caused serialization errors when users attempted to send data
in this format for union types containing primitives with logical types.

Changes:
- Add getPrimitiveTypeName helper to map Avro schema types to primitive names
- Update convertUnionField to recognize and unwrap wrapped primitive types
- Handle logical type suffixes (e.g., "int.date" -> "int") by stripping suffix
- Return unwrapped primitive values directly (hamba/avro expects unwrapped primitives)

The fix ensures that both wrapped formats work:
- {"int": 20474} -> unwraps to int32(20474)
- {"int.date": 20474} -> strips suffix and unwraps to int32(20474)

Added comprehensive tests to verify the fix works for various primitive types
and union combinations.

* Add test script

* Fix linter issues

* Fix Avro logical union date handling for issue #376

Normalize logical primitive union values to the discriminator format expected by hamba/avro, preventing float64/unknown union errors in nested schemas. Document supported input shapes for logical union fields and add regression coverage for serialize and conversion paths.

* Refine logical union roundtrip regression test

Replace the skipped logical union test with a focused roundtrip assertion that validates deserialize output type/value for date unions, avoiding overlap with serialize-path coverage.

* Address golangci-lint findings in Avro conversion paths

Fix unsafe byte narrowing in bytes conversion with explicit range checks and reduce duplicated logical date schema literals in tests by reusing a shared constant.

* Update CI Go patch version for xk6 build compatibility

Pin GitHub Actions setup-go to 1.25.8 and enable check-latest so go install xk6@latest mee... (continued)

86 of 162 new or added lines in 1 file covered. (53.09%)

2 existing lines in 1 file now uncovered.

2005 of 2827 relevant lines covered (70.92%)

14.52 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
76
67.54
-7.94% avro.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
67.54
-7.94% avro.go
Jobs
ID Job ID Ran Files Coverage
1 23087537966.1 14 Mar 2026 12:05PM UTC 16
70.92
GitHub Action Run
Source Files on build 23087537966
  • Tree
  • List 16
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • cbc1aa74 on github
  • Prev Build on main (#21405858077)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc