Fix hang in SNMP device_tracker implementation#112815
Conversation
|
I wonder whether syncing |
|
@khenderick I see that you confirmed the solution in #112795. My testing on If this PR goes through I may look into updating those other two components too to future-proof them, but from a cursory look I had the impression that they were already using the newest implementation. |
|
@nmaggioni Thanks for making the changes, and they turn out to be very important now. More details in #113605. In short, we must apply both an upgrade to The sensor/switch features should have been fixed by upgrading |
|
Ping @bdraco / @bieniu / @khenderick |
|
@lextm Thanks for checking in, I've merged your latest version bump into this PR to avoid having to cherry pick it again. |
bieniu
left a comment
There was a problem hiding this comment.
PR has 3 types of change marked. We should avoid such situations. In most cases, the PR should contain such a change that only one type can be selected. I understand that in this case it should be a bugfix. Please split the change into smaller parts.
Moreover, it seems to me that currently it is not allowed to add new configuration variables for integrations that are configured only using YAML, config flow should be implemented first.
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
For reference
|
|
The legacy syntax also has the problem that all the python code for all the integrations listed under the base platform has to be loaded before the base platform can complete setup. In the example below |
|
@bieniu The changetype list in the PR description can now be considered outdated: the dependency upgrade has already been handled in #113463 and is only repeated here for ease of merging (the alternative would have been deleting 217ff1b through a force push, losing its revision history). The combined bugfix + new feat upgrade is really just a bugfix with a (IMO) necessary config coherence bump: since I have ported the async logic from the other two SNMP integrations ( As @lextm said the |
Please do, as we can't merge it with changes that violate architecture decisions. ADR0007 only has one exception and it does not apply here.
We would have to change the ADR if we wanted an exception here, which would require a new discussion at https://github.com/home-assistant/architecture/discussions and agreement by core members. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
It looks like this isn't broken anymore AFAICT (or the opening text is out of date) so it doesn't need to be tagged for backport at this time |
changes addressed, needs testing
|
As per #113605 yes, SNMP device tracking is still broken. That issue has partially superseded the initial description of this PR since this one has been stale for longer. Local testing on a fresh instance with the latest version of these changes works fine for me (that is to say: devices are correctly tracked and refreshed, and the HA startup phase doesn't hang). |
Would you please update the opening text to reflect the current state. Thanks |
|
I have amended the initial description and truncated most of the historical info as requested. |
Co-authored-by: J. Nick Koston <nick@koston.org>
Proposed change
Port SNMP device_tracker to the new asyncio implementation
Stemming from #112548 and #113605, this PR updates the SNMP
device_trackerimplementation to use the same new async facilities that itssensorandswitchcounterpart are already using and thus resolves the current breakage of the component.Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.To help with the load of incoming pull requests: