fix(connection): log status request NACK retries at DEBUG (#43) - #44
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
The core fix looks correct: status-request NACK retries are now logged at Before approval, I have one scope concern: this PR also includes the Could you please remove these unrelated release changes and handle them separately, or explain and document why they are required here? It would also be useful to clarify that this fix changes the logging level only—the status request is still retried after a NACK. Once this is addressed, the PR looks ready for approval. |
c96da07 to
3152906
Compare
|
Thanks for the thorough review @xtimmy86x! Context on the release changesThe
Action takenYou make a very valid point that I have removed both the version bump and the workflow change from this branch and force-pushed, leaving PR #44 strictly focused on the #43 logging fix. A separate release PR will be opened once this merges. Clarification on retry behaviorTo confirm: this PR modifies the logging level only. When a status request ( |
Summary
Fixes #43. Follows up on testing feedback from @TheDarkWizard in OpenWebNet-HA/MyHOME#402.
In
OWNCommandSession._locked_send(), when a status request (is_status_request=True) is rejected with a NACK by the gateway:self._logger.error("%s Could not send message%s. Retrying (%d)...")regardless ofis_status_request.DEBUG(Gateway rejected status request...).This PR gates the retry log with
if is_status_request:so that status request retries are logged atDEBUGrather thanERROR. This prevents downstream consumers like Home Assistant from emitting alarming error messages when discovery probes (*#4*0##,*#16*0##) receive standard NACKs for uninstalled subsystems.Changes
OWNd/connection.py: Log NACK retries foris_status_requestatDEBUG.tests/test_connection.py: Assertlogger.error.assert_not_called()and verify retry debug logging intest_rejected_status_request_is_logged_at_debug.