Release v2.6.0 - #13
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthrough
ChangesStatistics Integration
Sequence Diagram(s)sequenceDiagram
participant Coordinator
participant HonClient
participant Appliance
participant HonBaseEntity
Coordinator->>HonClient: _update_appliance_sync(appliance)
HonClient->>Appliance: update()
Appliance-->>HonClient: attributes (non-empty)
HonClient->>Appliance: load_statistics()
Appliance-->>HonClient: statistics populated
HonClient-->>Coordinator: snapshot includes statistics field
Coordinator->>HonBaseEntity: state update triggered
HonBaseEntity->>HonBaseEntity: _get_attr(key)
HonBaseEntity->>HonBaseEntity: check _statistics[key]
HonBaseEntity-->>HonBaseEntity: return normalized value from statistics
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
#3: the watchdog rebuild (_start + _subscribe_appliances) sat outside try/except in 'while True', so a transient error (load_aws_token 5xx, subscribe timeout) ended the task and left realtime dead until a reload. Wrap the loop body: re-raise asyncio.CancelledError FIRST (stop() cancels+awaits the task, so swallowing it would deadlock shutdown), and on any other error log a WARNING (exc_info) and keep looping with an additive backoff (capped at 60s, reset on recovery) so a persistent 5xx is not hammered every tick. #13: _subscribe used a blocking awscrt future .result(_SUBSCRIBE_TIMEOUT), freezing the hon_loop up to 10s per topic. Make _subscribe/_subscribe_appliances async and await asyncio.wait_for(asyncio.wrap_future(future), _SUBSCRIBE_TIMEOUT) instead, yielding the loop while keeping the order and the timeout bound. Also use the null-tolerant _subscribed_topics() helper. Tests: watchdog survives a raising _start, propagates CancelledError, backoff grows/resets/caps; subscribe preserves order, yields the loop, honours the timeout.
#3: the watchdog rebuild (_start + _subscribe_appliances) sat outside try/except in 'while True', so a transient error (load_aws_token 5xx, subscribe timeout) ended the task and left realtime dead until a reload. Wrap the loop body: re-raise asyncio.CancelledError FIRST (stop() cancels+awaits the task, so swallowing it would deadlock shutdown), and on any other error log a WARNING (exc_info) and keep looping with an additive backoff (capped at 60s, reset on recovery) so a persistent 5xx is not hammered every tick. #13: _subscribe used a blocking awscrt future .result(_SUBSCRIBE_TIMEOUT), freezing the hon_loop up to 10s per topic. Make _subscribe/_subscribe_appliances async and await asyncio.wait_for(asyncio.wrap_future(future), _SUBSCRIBE_TIMEOUT) instead, yielding the loop while keeping the order and the timeout bound. Also use the null-tolerant _subscribed_topics() helper. Tests: watchdog survives a raising _start, propagates CancelledError, backoff grows/resets/caps; subscribe preserves order, yields the loop, honours the timeout.
#3: the watchdog rebuild (_start + _subscribe_appliances) sat outside try/except in 'while True', so a transient error (load_aws_token 5xx, subscribe timeout) ended the task and left realtime dead until a reload. Wrap the loop body: re-raise asyncio.CancelledError FIRST (stop() cancels+awaits the task, so swallowing it would deadlock shutdown), and on any other error log a WARNING (exc_info) and keep looping with an additive backoff (capped at 60s, reset on recovery) so a persistent 5xx is not hammered every tick. #13: _subscribe used a blocking awscrt future .result(_SUBSCRIBE_TIMEOUT), freezing the hon_loop up to 10s per topic. Make _subscribe/_subscribe_appliances async and await asyncio.wait_for(asyncio.wrap_future(future), _SUBSCRIBE_TIMEOUT) instead, yielding the loop while keeping the order and the timeout bound. Also use the null-tolerant _subscribed_topics() helper. Tests: watchdog survives a raising _start, propagates CancelledError, backoff grows/resets/caps; subscribe preserves order, yields the loop, honours the timeout.
Automated release PR for
v2.6.0.Summary by CodeRabbit
Release Notes
Dependencies
Improvements