[ECO-4970] Remove check for msg_serial when converting protocol message to JSON#437
Merged
lawrence-forooghian merged 1 commit intomainfrom Sep 11, 2024
Merged
Conversation
9d1d41e to
09085fd
Compare
This check is currently failing when calling as_json on an incoming MESSAGE protocol message — for example, in the case where you receive a message whilst using debug-level logging. I’m not sure what was the intention of this check, which dates back to 523a4b1 (there, the error message is "(…) cannot generate valid JSON for ProtocolMessage"). It’s not clear to me why a msgSerial would be required in order to serialise a protocol message; I can only guess it was intended as some sort of a business logic sense check on outgoing messages. Perhaps, back then, it was the case that incoming MESSAGE protocol messages contained a msgSerial, hence causing this check to succeed, but this is certainly no longer the case (even on protocol v1), nor can I see any good reason why it should be. Until aaa6211, this check could be (and was) satisfied by the presence of the connectionSerial attribute in the protocol message. That commit removed all references to connectionSerial and hence this check started failing. Given that there doesn’t seem to be a good reason for this check, remove it and hope that it wasn’t doing anything important. Resolves #436.
09085fd to
f37b8c9
Compare
Contributor
|
We have already removed similar check as a part of protocol 2 work, so we should be good 7a04abc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This check is currently failing when calling
as_jsonon an incomingMESSAGEprotocol message — for example, in the case where you receive a message whilst using debug-level logging.I’m not sure what was the intention of this check, which dates back to 523a4b1 (there, the error message is "(…) cannot generate valid JSON for ProtocolMessage"). It’s not clear to me why a
msgSerialwould be required in order to serialise a protocol message; I can only guess it was intended as some sort of a business logic sense check on outgoing messages.Perhaps, back then, it was the case that incoming
MESSAGEprotocol messages contained amsgSerial, hence causing this check to succeed, but this is certainly no longer the case (even on protocol v1), nor can I see any good reason why it should be.Until aaa6211, this check could be (and was) satisfied by the presence of the
connectionSerialattribute in the protocol message. That commit removed all references toconnectionSerialand hence this check started failing.Given that there doesn’t seem to be a good reason for this check, remove it and hope that it wasn’t doing anything important.
Resolves #436.