You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull request introduces a new Architectural Decision Record (ADR) for handling safe device failures on the satellite. The ADR proposes patterns to replace the now removed hardware dictionary that used to track device initialization state.
Hey @nateinaction! Thanks for putting this together and this is a great way to document decision points going forward. I added a tag that can be used for these kinds of issues so we can go back to them in the future easily.
After spending some time thinking about the two options, I think Option #2 would be preferable to try and maintain the highest level of code safety without putting too much of a burden on the end user. Especially because the expectation is that this codebase will primarily be used by beginner software teams with very limited resources, creating a system where it is unlikely or impossible that downstream function calls might become an unhandled exception minefield feels like it should be a top priority.
In my mind one of the other potential benefits of going with the second option is making it easier to implement a "Circuit Breaker Pattern" type of thing to allow downstream services to still call into something which has built in functionality to try and restore the connection to the downstream sensor over time.
### Pattern 1: Generic Device Protocol with `get_state()`
We propose to add a `get_state()` method to the generic device protocol. This method will return 1 of 3 possible states: `unknown`, `initialized`, or `failed` allowing downstream services to check the state of a device before attempting to use it.
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
We propose to add a `get_state()` method to the generic device protocol. This method will return 1 of 3 possible states: `unknown`, `initialized`, or `failed` allowing downstream services to check the state of a device before attempting to use it.
We propose to add a `get_state()` method to the generic device protocol. This method will return 1 of 3 possible states: `disabled`, `enabled`, or `failed` allowing downstream services to check the state of a device before attempting to use it.
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
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
This pull request introduces a new Architectural Decision Record (ADR) for handling safe device failures on the satellite. The ADR proposes patterns to replace the now removed
hardwaredictionary that used to track device initialization state.