zigpy / bellows

A Python 3 project to implement EZSP for EmberZNet devices
GNU General Public License v3.0
177 stars 87 forks source link

Wait for explicit stack messages for network state #554

Closed puddly closed 1 year ago

puddly commented 1 year ago

Looks like #553 affected more than just zigbeed, as I've been able to replicate it on EmberZNet 6.9 and 7.1 with NCP USB coordinators...

The root cause appears to be us not properly waiting for stack events to happen (i.e. NETWORK_UP and NETWORK_DOWN), leading to race conditions or outright failures at random.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (8549f27) 99.76% compared to head (91750b5) 99.76%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #554 +/- ## ======================================= Coverage 99.76% 99.76% ======================================= Files 62 62 Lines 4586 4594 +8 ======================================= + Hits 4575 4583 +8 Misses 11 11 ``` | [Impacted Files](https://app.codecov.io/gh/zigpy/bellows/pull/554?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy) | Coverage Δ | | |---|---|---| | [bellows/ezsp/\_\_init\_\_.py](https://app.codecov.io/gh/zigpy/bellows/pull/554?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy9lenNwL19faW5pdF9fLnB5) | `99.17% <100.00%> (+0.03%)` | :arrow_up: | | [bellows/zigbee/application.py](https://app.codecov.io/gh/zigpy/bellows/pull/554?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zigpy#diff-YmVsbG93cy96aWdiZWUvYXBwbGljYXRpb24ucHk=) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.