Fix JSON results streaming without readlines#742
Conversation
|
Hi, this is obviously vibe-coded, so what's the motivation behind this? Have you considered what impact this would have on existing SDK users? Additionally - what value do you see in this unit test? |
|
Fair feedback. After looking at this again, I should clarify the motivation better. The original trigger was noticing a performance difference between That said, the motivation is not just raw performance. The current The intended behavior change is to preserve the same parsed output while consuming the buffered stream line by line. For SDK users, the intent is to keep result ordering, messages, preview state, and parsing behavior the same, while avoiding a full I agree that the current unit test is not strong enough. It verifies the basic parsed output, but it mostly proves that the implementation avoids I can revise the PR description and test around that. If you feel this change is not worth taking, I’m also fine with closing it. |
Summary
readlines()JSONResultsReaderdoes not requirereadlines()Testing
uv --no-config run python -m pytest --no-header --ff -ra -vv ./tests/unit/test_results.pyuv --no-config run basedpyright tests/unit/test_results.py splunklib/results.py