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

TODO: Improve breaking upgrade repair issue #842

Open
raman325 opened this issue Dec 11, 2023 · 3 comments
Open

TODO: Improve breaking upgrade repair issue #842

raman325 opened this issue Dec 11, 2023 · 3 comments

Comments

@raman325
Copy link
Contributor

Today we create a repair issue when we detect an incorrect server version: https://github.com/home-assistant/core/blob/dev/homeassistant/components/zwave_js/__init__.py#L161-L169

We should improve the mechanism to point users down the right path when we can

@kpine
Copy link
Contributor

kpine commented Dec 11, 2023

You might also consider relaxing the minimum schema supported when possible. Does supporting a new schema version always require abandoning support for a previous version?

@MartinHjelmare
Copy link
Contributor

If we don't bump minimum version in the client we would need to maintain compatibility code both in the server and in the client. Today we only do it in the server.

@raman325
Copy link
Contributor Author

The main reason why we require breaking changes is when new properties are added or new commands are added in the server that we want to add support for in the integration. If we wanted to, there are two options that would eliminate the breaking changes, neither of which I like, but for full transparency:

  1. Rely on the require_schema parameter in each model method in the lib. The end result would be that, if no other changes in HA were made, some functions would throw an error because the require_schema would be too high.
  2. Add code to HA that selectively adds functionality based on the schema version of the server.

In my opinion, 1 results in a poor user experience and 2 adds unnecessary complexity. But they would allow us to stop bumping the min version as often as we could be selective about when we applied these strategies and when we decided a minor version bump was needed

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

3 participants