chore: override state transitions into topic#1659
Open
alter-mage wants to merge 1 commit intomainfrom
Open
Conversation
MikeDombo
reviewed
Sep 6, 2024
Comment on lines
444
to
446
| stateTopic.overrideValue(newState.ordinal()); | ||
| statusCodeTopic.withValue(stateTransitionEvent.getStatusCode().name()); | ||
| statusReasonTopic.withValue(stateTransitionEvent.getStatusReason()); |
Member
There was a problem hiding this comment.
the statuses should be overridden too
19cf9de to
032644b
Compare
032644b to
4f2da75
Compare
|
Unit Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against 4f2da75 |
|
Integration Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against 4f2da75 |
yitingb
approved these changes
Sep 6, 2024
junfuchen99
approved these changes
Sep 6, 2024
MikeDombo
requested changes
Sep 6, 2024
| return withNewerValue(this.modtime, nv); | ||
| } | ||
|
|
||
| private Topic overrideValue(Object nv, long proposedModTime) { |
Member
There was a problem hiding this comment.
This doesn't make sense, it won't do anything different from with newer value.
The point of overriding is that the value provided here is going to be set no matter what the timestamp is on the node. This implementation won't do that, this is a straight up alias for with newer value.
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.
Issue #, if available:
Description of changes:
Override changes to lifecycle state transition into the Nucleus config tree.
Why is this change necessary:
Today, we first compare the timestamps of the previously persisted lifecycle state and the incoming lifecycle state. If, due to clock skew, previously persisted state is in the future compared to the incoming state, the incoming state is rejected. This can cause an endless loop of timestamp comparisons between persisted and incoming state, blocking the main thread, bricking the device.
How was this change tested:
Any additional information or context required to review the change:
Documentation Checklist:
Compatibility Checklist:
any deprecated method or type.
Refer to Compatibility Guidelines for more information.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.