DataCater / datacater

The developer-friendly ETL platform for transforming data in real-time. Based on Apache Kafka® and Kubernetes®.
https://datacater.io
Other
82 stars 4 forks source link

fix(ui): Fix previewing tombstone records #156

Closed flippingbits closed 1 year ago

flippingbits commented 1 year ago

Fix the previewing of tombstone records, i.e., records whose value is null, by rendering all fields as null in the grid.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

ChrisRousey commented 1 year ago

Bildschirmfoto 2023-02-09 um 19 48 54

Doesn't seem to be fixed. Sample dataset i used is shown like this with rpk:

{
  "topic": "test-partitions",
  "key": "{\"record_key\": 9999}",
  "value": "null",
  "timestamp": 1675968141752,
  "partition": 4,
  "offset": 11927
}

The following sample doesn't produce an error, but it isn't null, it's empty:

{
  "topic": "test-partitions",
  "key": "{\"record_key\": 9994}",
  "value": "{}",
  "timestamp": 1675968686280,
  "partition": 2,
  "offset": 9872
}
flippingbits commented 1 year ago

This looks more like an error that is being thrown by the deserializer. It looks like you are trying to interpret the string(!) "null" as JSON?

I was trying to fix a UI bug that occurred with tombstone records, e.g.:

{
  "topic": "test-partitions",
  "key": "{\"record_key\": 9994}",
  "value": null,
  "timestamp": 1675968686280,
  "partition": 2,
  "offset": 9872
}

I will provide a test case next time - My apologies!

flippingbits commented 1 year ago

Thanks for investigating and clarifying the issue and of course for the review! :)