core icon indicating copy to clipboard operation
core copied to clipboard

Issue warning if glances server version is 2

Open engrbm87 opened this issue 1 year ago • 4 comments

Breaking change

Proposed change

Issue warning if glances server version is 2

Type of change

  • [ ] Dependency upgrade
  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [ ] New integration (thank you!)
  • [ ] New feature (which adds functionality to an existing integration)
  • [x] Deprecation (breaking change to happen in the future)
  • [ ] Breaking change (fix/feature causing existing functionality to break)
  • [ ] Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • [x] The code change is tested and works locally.
  • [x] Local tests pass. Your PR cannot be merged unless tests pass
  • [x] There is no commented out code in this PR.
  • [x] I have followed the development checklist
  • [x] I have followed the perfect PR recommendations
  • [x] The code has been formatted using Ruff (ruff format homeassistant tests)
  • [x] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • [ ] The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • [ ] New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • [ ] Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

engrbm87 avatar Dec 17 '23 08:12 engrbm87

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:

Learn more about our pull request process.

home-assistant[bot] avatar Dec 26 '23 13:12 home-assistant[bot]

PR looks good imo, but I'm missing some rationale behind this change and a deadline. Why do we want to deprecate V2? Is it EoL (or planned to be soon)? Are there people that can't migrate to V3?

There are multiple changes in the data provided by glances api between v2 server and v3 server. From the library side it is hard to maintain compatibility for both versions more details here. I am not sure how many users are still using Glances V2 but for the add-on available in HASS this has been updated to v3 long ago.

engrbm87 avatar Dec 26 '23 13:12 engrbm87

EDIT: I was wrong, the 0.5.0 version of the API wrapper library does not remove Glances v2 support yet.

Glances does not seem to have any form of extended support: bug fixes are pushed to the latest release only, it seems.

https://glances.readthedocs.io/en/latest/support.html

@joostlek I understand that we want the HA platform to be stable and want to handle deprecations with advance notice. Not breaking users' setups is very important.

Glances v3.0 was released in Sept 2018

The breaking changes in Glances v3 should not prohibit anyone from upgrading Even Python 2.7 was still supported, only Python 3.3 support was dropped.

The number of Home Assistant users that is still on Glances v2 is probably very small, if not zero.

The Glances v2 deprecation is introduced in v0.5.0 of the glances API wrapper package, which is currently merged in dev. Delaying this change would also delay the features that are currently in progress that have been requested by a few HA users.

I am not able to judge if these reasons are good enough to break the rule of pre-announcing deprecations, but given that we should have deprecated v2 long ago, this might be worth an exception, maybe.

I don't have a strong opinion on this, and am not a maintainer but I hope this gives you some additional context.

fhoekstra avatar Dec 26 '23 22:12 fhoekstra

Ah understood. Let me try to ask some others what they think about it

joostlek avatar Dec 26 '23 22:12 joostlek

Please copy some of the explanations about the deprecation to the breaking change paragraph in the PR description.

MartinHjelmare avatar Dec 30 '23 11:12 MartinHjelmare

We should update the docs about supported version too.

https://www.home-assistant.io/integrations/glances/

MartinHjelmare avatar Dec 30 '23 12:12 MartinHjelmare

@MartinHjelmare should we include this PR in this month's release?

engrbm87 avatar Jan 03 '24 19:01 engrbm87

I think it's ok to wait until the February release. Users may see the warning in the log and that's ok, I think.

MartinHjelmare avatar Jan 03 '24 19:01 MartinHjelmare