Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msgpack filtering and display broken #1034

Closed
skarrok opened this issue Jan 25, 2024 · 2 comments · Fixed by #1037
Closed

msgpack filtering and display broken #1034

skarrok opened this issue Jan 25, 2024 · 2 comments · Fixed by #1037
Labels
backend bug Something isn't working

Comments

@skarrok
Copy link
Contributor

skarrok commented Jan 25, 2024

After updating to version v2.4.0 / 2024-01-23 I noticed that display and filtering of msgpack encoded messages and headers is broken.

Using git bisect I found commit 89f4152 that introduced this issue.

What it looked like before commit 89f4152:

Value:
image
Headers:
image

And before I could use filter like headers["X-Correlation-ID"] == "771b4325b16b4128b6cdba71ed590c13" and it worked.

How it looks now:

Value:
image
Headers:
image

And filtering by header values doesn't work.

Relevant section of config file

kafka:
  brokers: ["localhost:9092"]
  messagePack:
    enabled: true
@weeco
Copy link
Contributor

weeco commented Jan 25, 2024

Thanks for the report @skarrok , could you provide some messagepack examples with the expected JSON equivalent that we can use in our unit tests that decode the binary payload to JSON?

@weeco weeco added bug Something isn't working backend labels Jan 25, 2024
@skarrok
Copy link
Contributor Author

skarrok commented Jan 25, 2024

Sure. I can use https://github.com/ludocode/msgpack-tools to convert json <-> msgpack.

For example:

$ echo '{"binary": "base64:AAAAAAo=", "num": -2.4, "negative": false, "positive": true, "array": [3, 2, "1", 0]}' \
  | json2msgpack -b > example.msgpack

$ msgpack2json -bp < example.msgpack
{
    "binary": "base64:AAAAAAo=",
    "num": -2.4,
    "negative": false,
    "positive": true,
    "array": [
        3,
        2,
        "1",
        0
    ]
}

example.json.txt
example.msgpack.txt

Please note I don't really know possible edge cases but msgpack have some differences with json where strict conversion is impossible.
Also I am not sure if base64: (for binary data) prefix needed for Go msgpack library.

redpanda-console version back from December had no problem displaying binary data as (I assume) base64 string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants