Skip to content

fix: close leaked DNS-probe socket, silence deprecation warning noise - #422

Merged
JarbasAl merged 2 commits into
devfrom
chore/kill-warnings
Aug 14, 2026
Merged

fix: close leaked DNS-probe socket, silence deprecation warning noise#422
JarbasAl merged 2 commits into
devfrom
chore/kill-warnings

Conversation

@JarbasAl

Copy link
Copy Markdown
Member

🤖 Auto-generated by Claude Fable 5 (claude-fable-5) via Claude Code — NOT human-reviewed. Verify before acting.

is_connected_dns() opened a raw socket to check reachability and never closed it, leaking a file descriptor on every check — including every failed probe, which is the common case on a flaky network. It's now closed in a finally block, with the return semantics unchanged.

The rest of the roughly 90 warnings were tests deliberately covering deprecated shims — standardize_lang_tag/get_language_dir, ovos_utils.fakebus.Message, EventSchedulerInterface, the dialog module, expand_template — plus a couple of unrelated stdlib/test-fixture ResourceWarnings from unclosed files in the dialog test fixtures. These are now silenced with per-test/class/module pytest.mark.filterwarnings using the specific message text, so the deprecated code paths stay covered but the summary is clean.

Full suite with -W default: ~90 warnings before, 1 after. The one remaining warning is emitted by the currently-installed (unpatched) ovos-bus-client dependency's own session.py at import time, not by anything in this repo — it will clear on its own once that fix (a companion PR already up in ovos-bus-client) is released. 949 passed, 1 skipped, unchanged.

is_connected_dns() opened a raw socket for the reachability probe and never
closed it, leaking a file descriptor on every check (and on every failed
probe, which is the common case on a flaky network). It's now closed in a
finally block with the return semantics unchanged.

The rest of the ~90 warnings were tests deliberately covering deprecated
shims (standardize_lang_tag/get_language_dir, fakebus.Message,
EventSchedulerInterface, the dialog module, expand_template) plus a couple
of unrelated stdlib/test-fixture ResourceWarnings — now filtered per-test
with specific message patterns, coverage kept. One warning remains, sourced
from the still-installed (unpatched) ovos-bus-client dependency's own
session.py, not from this repo; it clears once that fix ships.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9510b2f7-fc12-4583-a0cc-1dfe7585af2b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the fix label Aug 14, 2026
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

A new update is available for your PR checks! 📥

I've aggregated the results of the automated checks for this PR below.

🏷️ Release Preview

The release candidate is looking strong. 💪

Current: 0.13.10a2Next: 0.13.11a1

Signal Value
Label fix
PR title fix: close leaked DNS-probe socket, silence deprecation warning noise
Bump build

✅ PR title follows conventional commit format.


🚀 Release Channel Compatibility

Predicted next version: 0.13.11a1

Channel Status Note Current Constraint
Stable Too new (must be <0.9.0) ovos-utils>=0.8.1,<0.9.0
Testing Too new (must be <0.8.5) ovos-utils>=0.8.4,<0.8.5
Alpha Compatible ovos-utils>=0.13.10a2

🔍 Lint

I've got some results for you! 📝

ruff: issues found — see job log

⚖️ License Check

Ensuring our project remains legally compliant. ✅

✅ No license violations found.

Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed.

📋 Repo Health

Ensuring the codebase isn't suffering from 'technical debt' flu. 🤒

✅ All required files present.

Latest Version: 0.13.10a2

ovos_utils/version.py — Version file
README.md — README
LICENSE — License file
pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
CHANGELOG.md — Changelog
ovos_utils/version.py has valid version block markers

🔒 Security (pip-audit)

Ensuring our encryption is top-notch. 🔐

✅ No known vulnerabilities found (47 packages scanned).

📊 Coverage

How much of the logic is under the microscope? 🔬

85.3% total coverage

Files below 80% coverage (5 files)
File Coverage Missing lines
ovos_utils/log_parser.py 48.4% 225
ovos_utils/__init__.py 63.6% 16
ovos_utils/file_utils.py 74.4% 56
ovos_utils/thread_utils.py 76.9% 12
ovos_utils/geolocation.py 78.4% 22

Full report: download the coverage-report artifact.

🔨 Build Tests

The compiler has spoken! Here is the verdict. 📜

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

Keeping the code clean, one PR at a time ✨

@JarbasAl
JarbasAl marked this pull request as ready for review August 14, 2026 13:15
@JarbasAl
JarbasAl merged commit 8ed8af3 into dev Aug 14, 2026
13 checks passed
@JarbasAl
JarbasAl deleted the chore/kill-warnings branch August 14, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant