Repository navigation
fix(osc): wait and log once when an OSC client cannot be created - #492
Merged
Merged
Conversation
A destination whose client cannot be created, most often a host name the show network's resolver cannot answer, was retried on every send and logged an ERROR each time: a row streaming at its frame rate wrote thousands of lines a minute and buried the log tail the diagnostics bundle carries. Only a pinned target waited before retrying. Every target whose client cannot be created (unresolvable name, refused pin, malformed host) now waits 1 s before the next attempt, and its failures are logged per streak: one WARNING when it starts, a reminder with the attempt count at most once a minute, one INFO when the client is finally created. An eviction still clears the retry delay but keeps the streak, so an address change does not announce it again. Refs #369 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
Review roundsEach round reviewed the whole Round 1
Round 2
Round 3
Left as is
Results
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan
Summary
Part of #369.
An OSC destination whose client cannot be created, most often a host name the show network's resolver cannot answer, was retried on every send and logged an ERROR each time. A transmitter row streaming at its frame rate wrote thousands of lines a minute and buried the log tail the diagnostics bundle carries. Only a destination with an interface pin waited before retrying.
Now every destination whose client cannot be created (a name that does not resolve, a refused interface pin, a malformed host) waits 1 s before the next attempt. Its failures are logged per streak:
Cannot create OSC client for udp://<host>:<port>, retrying every 1s: <reason>An interface eviction still retries a pinned destination at once, but keeps its streak, so an address change does not announce the failure again.
This is the main-only part of #369. The issue also asks for a row naming the destination on the Operator Screen and in Statistics. That row needs the per-destination send records from #359, which targets another branch, so it is not in this PR and #369 stays open for it.
What #359 replaces or extends
When #359 lands, the per-streak logging in
OscService._record_create_failure(and_CreateFailure/_create_failures) gives way to recording the failed creation in that destination'sSendHealth, which then owns the log lines and puts the row on screen. The 1 s retry for every destination (_CREATE_RETRY_S, renamed from_PINNED_CREATE_RETRY_S) stays as it is. Expect one small conflict at thenew_entry = _ClientEntry(...)line in_get_or_create_client, which #359 also changes.Behaviour notes
Failed to create OSC clientline.Test plan
tests/test_osc_service.py::TestClientCreationFailure: 600 sends make one lookup and one WARNING; a 150 s streak logs the start, reminders after 61 and 121 attempts, and one INFO on recovery; a new streak after a recovery starts afresh; an eviction retries at once and keeps the streak; an unresolvable name, a refused pin and a malformed host all wait 1 s (parametrized)openfollow/osc/service.pymake ci-remote🤖 Generated with Claude Code