Fix events system upgrade#1348
Merged
khyatimahendru merged 3 commits intoJun 4, 2026
Merged
Conversation
grafnu
approved these changes
Jun 4, 2026
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.
The Problem
1.4.1used by the EasyIO devices), network connection events were logged using thesystem.network.*category prefix (e.g.,system.network.disconnectandsystem.network.connect). In version1.5.0, the schema was updated, and this category namespace was migrated tolocalnet.network.*.1.4.1), it automatically tries to upgrade the message in memory to the latest standard before validating it against the newest schemas.MessageUpgradercomponent contained logic for upgradingstatemessages, but it completely lacked any upgrade logic forevents_systemmessages.events_systemmessages were checked against the 1.5.0 schema, the categories were still prefixed withsystem.network.*. The 1.5.0 schema validator correctly rejected them as unrecognized categories since it was strictly expectinglocalnet.network.*.The Solution
events_systemCategories: Added a new methodupgradeTo_1_5_0_events_system()to theMessageUpgraderclass. This method interceptsevents_systemmessages as they are being upgraded to1.5.0.logentriesarray inside the payload payload. For each log entry, if thecategorystring begins withsystem.network, it replaces the prefix withlocalnet.network(e.g. translatingsystem.network.connecttolocalnet.network.connect).eventsSystemUpgrade) inMessageUpgraderTest.javato ensure this substitution behaves correctly and doesn't affect other valid categories likesystem.auth.login.