Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

fix(ui): Fix previewing tombstone records #156

Merged
merged 1 commit into from Feb 10, 2023

Conversation

flippingbits
Copy link

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

Fix the previewing of tombstone records, i.e., records whose value is
`null`, by rendering all fields as `null` in the grid.
@flippingbits flippingbits added bug Something isn't working ui User facing changes, bugs or enhancements labels Feb 9, 2023
@sonarcloud
Copy link

sonarcloud bot commented Feb 9, 2023

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
Copy link
Contributor

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
Copy link
Author

flippingbits commented Feb 9, 2023

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!

Copy link
Contributor

@ChrisRousey ChrisRousey left a comment

Choose a reason for hiding this comment

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

Looks good. The error i had came from the python serializer i was using. It converted null into a null String, which couldnt be interperted as a json

@flippingbits
Copy link
Author

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

@flippingbits flippingbits merged commit a8c44ec into main Feb 10, 2023
@flippingbits flippingbits deleted the feature/fix-ui-tombstone-records branch February 10, 2023 12:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working ui User facing changes, bugs or enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants