Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timestamp to actions to ensure correct order and prevent incorrect installedDS updates #2093

Open
herdt-michael opened this issue Nov 21, 2024 · 0 comments

Comments

@herdt-michael
Copy link
Contributor

Offline actions can currently be sent to indicate that a device has performed an update without being connected, meaning the update could also have occurred in the past. These actions are then persisted in the action history. However, there is an issue with the order of these offline actions. Reports can arrive in the wrong sequence, or an online update might occur after an offline update. The current logic interprets the most recently received report as the current state of the device.

Suggestion:

To improve the accuracy of the action history and prevent incorrect updates to the installedDS flag, following enhancements could be performed:

Extend action/report with a timestamp:

  • Introduce a new timestamp property for actions, which can be set by the device.
  • This timestamp should indicate when the event happened or the action was executed.
  • We can also think about supporting this timestamp for the connected case (non offline action).

InstalledDS logic:

  • Modify the logic to ensure that the installedDS flag is not overwritten if the reported finished action is not the latest one.

Benefits:

  • Ensures that actions are correctly ordered in the history.
  • Prevents the installedDS flag from being incorrectly updated.
  • Provides a more accurate representation of the device's update history.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant