Skip to content

Fix parsing of bookmark objects #364

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ndhansen
Copy link

@ndhansen ndhansen commented Jun 18, 2025

What is this MR?

This MR fixes the bug described in #363, and includes a test to show it's working. It's arguably a breaking change, because bookmark objects will no longer contain a parsed object fields, but I would argue that this is fine because the parsing didn't work anyway, so it's unlikely anyone was relying on this.

There are other ways of fixing this, such as handling bookmarks early and short-circuiting, but I decided to go for more minimal changes to the unmarshal logic.

How is this tested?

I added a test which includes a real payload from a bookmark event obtained when watching a kubernetes namespace, which previously would cause the client to crash.

I tested this manually by running the bookmark_bug.py script described in the issue, and got the expected output:

$ python streaming_test.py
ADDED
BOOKMARK
BOOKMARK
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant