Repository navigation
fix(eon): handle rebirth commands and timestamp-less CMD payloads - #67
Merged
Merged
Conversation
The Sparkplug TCK's rebirth command omits the payload timestamp, and srad rejected the whole NCMD, so the node never rebirthed. Accept command payloads without a timestamp by using the time the command was received, for both node and device commands. Also stop data publishes before a command-triggered rebirth so no DATA is sent after the rebirth request, and publish the node and device births from the same session. - Add MessageMetrics::from_payload_lenient. - Add Node::command_rebirth, which marks the node un-birthed before publishing the birth sequence. - Cover the lenient conversion with a unit test.
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.
Summary
Fixes
edge:ReceiveCommandTest, which timed out because the node never processed the TCK's rebirth command.MessageMetrics::from_payload_lenient), for both NCMD and DCMD.Why
The Sparkplug TCK's rebirth NCMD has no payload timestamp:
MessageMetrics::try_from(Payload)returnsMissingTimestamp, so srad loggedReceived invalid CMD payload - ignoring requestand never rebirthed. The TCK'srebirth-action-1andrebirth-action-2assertions then failed and the test timed out.Result
Stable across 8 consecutive runs against
tck-node. Regression tests:cargo fmt --all --check,cargo clippy --all-targets -- -D warnings, andcargo testpass.