Page MenuHomePhabricator

[Chronik] Fix WebSocket emitting Error messages
ClosedPublic

Authored by tobias_ruck on Feb 17 2024, 00:50.

Details

Reviewers
Fabien
bytesofman
Group Reviewers
Restricted Project
Commits
rABCd0e9dcb548cb: [Chronik] Fix WebSocket emitting Error messages
Summary

When a subscription is invalid, Chronik responds with the error in a separate message.

However, errors are currently encoded incorrectly (in a Error msg directly instead of wrapping it in a WsMsg as promised).

This fixes the encoding and also fixes a small bug in client.py where messages that fail to parse would simply be dropped; now their unparsed bytes are returned to tests have a more appropriate failure mode than simply timing out.

Test Plan

./test/functional/test_runner.py chronik_ws_script.py

Event Timeline

The build failed due to an unexpected infrastructure outage. The administrators have been notified to investigate. Sorry for the inconvenience.
bytesofman added a subscriber: bytesofman.

diff looks good, not sure on CI failure

This revision now requires changes to proceed.Feb 17 2024, 01:17
This revision is now accepted and ready to land.Feb 17 2024, 13:18