mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Merge remote-tracking branch 'origin/topic/bbannier/issue-4594'
* origin/topic/bbannier/issue-4594:
Align WebSocket error in cluster with one in Broker
(cherry picked from commit b1157e4e03
)
This commit is contained in:
parent
7cdbbec44c
commit
886fdd7c3a
6 changed files with 25 additions and 10 deletions
15
CHANGES
15
CHANGES
|
@ -1,3 +1,18 @@
|
||||||
|
7.2.1-7 | 2025-07-14 14:32:04 -0700
|
||||||
|
|
||||||
|
* GH-4594: Align WebSocket error in cluster with one in Broker (Benjamin Bannier, Corelight)
|
||||||
|
|
||||||
|
The schema of cluster WebSocket error messages deviated from the
|
||||||
|
existing one in Broker which breaks seamless migration from the Broker
|
||||||
|
WebSocket bindings.
|
||||||
|
|
||||||
|
This patch aligns the serialization in cluster with the one in Broker.
|
||||||
|
This is technically a breaking change of the cluster schema, but since
|
||||||
|
it never worked like documented and is still experimental this is
|
||||||
|
probably fine.
|
||||||
|
|
||||||
|
(cherry picked from commit b1157e4e03b38560ddbb5df3e4760ca24b0319b4)
|
||||||
|
|
||||||
7.2.1-6 | 2025-07-14 14:30:44 -0700
|
7.2.1-6 | 2025-07-14 14:30:44 -0700
|
||||||
|
|
||||||
* cluster/zeromq: Short-circuit DoPublishLogWrite() when not initialized (Arne Welzel, Corelight)
|
* cluster/zeromq: Short-circuit DoPublishLogWrite() when not initialized (Arne Welzel, Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
7.2.1-6
|
7.2.1-7
|
||||||
|
|
|
@ -145,7 +145,7 @@ WebSocketClient::SendInfo WebSocketClient::SendError(std::string_view tag, std::
|
||||||
*out++ = ',';
|
*out++ = ',';
|
||||||
broker::format::json::v1::append_field("code", tag, out);
|
broker::format::json::v1::append_field("code", tag, out);
|
||||||
*out++ = ',';
|
*out++ = ',';
|
||||||
broker::format::json::v1::append_field("message", message, out);
|
broker::format::json::v1::append_field("context", message, out);
|
||||||
*out++ = '}';
|
*out++ = '}';
|
||||||
return SendText(buf);
|
return SendText(buf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
Connected!
|
Connected!
|
||||||
err1 {'type': 'error', 'code': 'deserialization_failed', 'message': 'failed to decode JSON object'}
|
err1 {'type': 'error', 'code': 'deserialization_failed', 'context': 'failed to decode JSON object'}
|
||||||
err2 {'type': 'error', 'code': 'deserialization_failed', 'message': 'failed to create Zeek event'}
|
err2 {'type': 'error', 'code': 'deserialization_failed', 'context': 'failed to create Zeek event'}
|
||||||
err3 {'type': 'error', 'code': 'deserialization_failed', 'message': 'failed to create Zeek event'}
|
err3 {'type': 'error', 'code': 'deserialization_failed', 'context': 'failed to create Zeek event'}
|
||||||
pong {'@data-type': 'string', 'data': 'pong'} {'@data-type': 'vector', 'data': [{'@data-type': 'string', 'data': 'Hello'}, {'@data-type': 'count', 'data': 42}]}
|
pong {'@data-type': 'string', 'data': 'pong'} {'@data-type': 'vector', 'data': [{'@data-type': 'string', 'data': 'Hello'}, {'@data-type': 'count', 'data': 42}]}
|
||||||
err4 {'type': 'error', 'code': 'deserialization_failed', 'message': 'failed to decode JSON object'}
|
err4 {'type': 'error', 'code': 'deserialization_failed', 'context': 'failed to decode JSON object'}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
broken array response {'type': 'error', 'code': 'deserialization_failed', 'message': 'subscriptions not an array'}
|
broken array response {'type': 'error', 'code': 'deserialization_failed', 'context': 'subscriptions not an array'}
|
||||||
non string error {'type': 'error', 'code': 'deserialization_failed', 'message': 'individual subscription not a string'}
|
non string error {'type': 'error', 'code': 'deserialization_failed', 'context': 'individual subscription not a string'}
|
||||||
mix error {'type': 'error', 'code': 'deserialization_failed', 'message': 'individual subscription not a string'}
|
mix error {'type': 'error', 'code': 'deserialization_failed', 'context': 'individual subscription not a string'}
|
||||||
ack True
|
ack True
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
Connected ws_good!
|
Connected ws_good!
|
||||||
Connected ws_bad!
|
Connected ws_bad!
|
||||||
Error for ws_bad {'type': 'error', 'code': 'invalid_uri', 'message': 'Invalid URI - use /v1/messages/json'}
|
Error for ws_bad {'type': 'error', 'code': 'invalid_uri', 'context': 'Invalid URI - use /v1/messages/json'}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue