fix: log broadcast URI hostname resolution errors at ERROR level (#716)#882
Open
janisag07 wants to merge 2 commits intopermitio:masterfrom
Open
fix: log broadcast URI hostname resolution errors at ERROR level (#716)#882janisag07 wants to merge 2 commits intopermitio:masterfrom
janisag07 wants to merge 2 commits intopermitio:masterfrom
Conversation
added 2 commits
February 16, 2026 04:01
…lure (permitio#634) When clone_repository or remote.fetch fails (e.g. GitHub is unreachable), the partially created repo directory and any broken symlinks are now properly cleaned up via _cleanup_repo_path(). The class-level repos cache is also invalidated to prevent subsequent operations from using a broken Repository object. Changes: - Add _cleanup_repo_path() helper for safe directory/symlink removal - Add _invalidate_repo_cache() to evict broken repos from class caches - _clone(): clean up repo_path and cache on pygit2.GitError - fetch_and_notify_on_changes(): catch fetch GitError, clean up, return - Invalid repo discovery path now also invalidates cache before cleanup - Add comprehensive tests for all cleanup and cache invalidation paths Closes permitio#634
✅ Deploy Preview for opal-docs canceled.
|
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.
Problem
When the OPAL server is configured with a broadcast backend URI containing an unresolvable hostname, the error is silently swallowed. The server starts without any indication that broadcasting will fail, making it very difficult to debug connectivity issues.
Fix
pubsub.py): Added_validate_broadcast_uri()that checks the hostname can be resolved viasocket.getaddrinfo(). Logs a clearERRORmessage with the hostname and resolution failure. Passwords in URIs are masked in log output.server.py): Added a broadcaster disconnect callback that logs atERRORlevel when the connection to the broadcast backend is lost.Changes
packages/opal-server/opal_server/pubsub.py: URI validation + password maskingpackages/opal-server/opal_server/server.py: Disconnect callback with error loggingNotes
Behavior-compatible: validation is advisory (logs errors but does not prevent startup), so existing deployments are unaffected.
/claim #716