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

Settings versioning #52

Open
TjazVracko opened this issue Nov 30, 2023 · 1 comment
Open

Settings versioning #52

TjazVracko opened this issue Nov 30, 2023 · 1 comment
Labels
type: feature request New feature or request.

Comments

@TjazVracko
Copy link
Collaborator

Context

With the current implementation, after a product is released, its settings and default values are fixed. Only new settings can be added. Keys and IDs of existing settings must never be changed or removed.

We could add a version field, which will version the whole "settings package" of a device. Whenever the version changes, the lib can do one of the following:

  1. Delete all existing settings and values and store new settings with default values
  2. Perform some kind of "diff" procedure, in which unchanged settings keep their values, removed settings are deleted and new settings are added.

Required steps / Implementation details

Note that the key is used to actually store into NVS.
We would have to determine if option 2 is possible, and what it can support. Ideally:

  • unchanged settings (same key) keep their values but update their default values
  • new settings are simply added as they are now
  • changed settings (how to detect??) are deleted and added anew
  • deleted settings (how to detect??) are deleted from NVS

Definition of Done

???

@TjazVracko TjazVracko added the type: feature request New feature or request. label Nov 30, 2023
@TjazVracko
Copy link
Collaborator Author

@MarkoSagadin Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant