Repository navigation
refactor(connectors): isolate per-connector init failures in runtime - #3244
Merged
Merged
Conversation
Previously, any failure during connector init (path resolution, dlopen, state load, plugin init, consumer/producer setup) was propagated as a fatal `RuntimeError` and aborted the entire runtime. A single bad config or missing plugin file took down every other healthy connector with it, and the failing connector was hidden from the API/health view since it never reached the manager. Capture per-connector failures inline against the offending plugin and continue iterating. Connectors that fail before their FFI container can be loaded are returned from `sink::init` / `source::init` as `FailedPlugin` entries and surfaced through the manager as `ConnectorStatus::Error` with the captured message in `last_error`, so operators can still see and diagnose them. The `Result` return is preserved on both init paths for symmetry and future fatal-error handling, but no system-level errors are currently emitted.
mmodzelewski
force-pushed
the
connectors-runtime
branch
from
May 12, 2026 15:11
3b620dc to
4de954d
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3244 +/- ##
=============================================
- Coverage 73.83% 51.19% -22.64%
Complexity 943 943
=============================================
Files 1190 1188 -2
Lines 107833 94263 -13570
Branches 84850 71281 -13569
=============================================
- Hits 79614 48257 -31357
- Misses 25467 43471 +18004
+ Partials 2752 2535 -217
🚀 New features to boost your workflow:
|
spetz
previously approved these changes
May 12, 2026
hubcio
requested changes
May 13, 2026
hubcio
left a comment
Contributor
There was a problem hiding this comment.
overall pr is sound but it's not tested well enough. only one failure mode is tested (the schema-level poll_interval = "not-a-valid-duration", which fails inside setup_sink_consumers). The other branches added by this refactor are not exercised:
- resolve_plugin_path failure (e.g. path = "does-not-exist")
- Container::load failure (e.g. valid path but not a dylib)
- init_sink / init_source failure (plugin returns non-zero)
- FileStateProvider::load failure for sources
- the entire source side has no failure-isolation test
spetz
approved these changes
May 13, 2026
numinnex
approved these changes
May 13, 2026
hubcio
approved these changes
May 13, 2026
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.
Previously, any failure during connector init (path resolution,
dlopen, state load, plugin init, consumer/producer setup) was
propagated as a fatal
RuntimeErrorand aborted the entireruntime. A single bad config or missing plugin file took down
every other healthy connector with it, and the failing connector
was hidden from the API/health view since it never reached the
manager.
Capture per-connector failures inline against the offending
plugin and continue iterating. Connectors that fail before their
FFI container can be loaded are returned from
sink::init/source::initasFailedPluginentries and surfaced through themanager as
ConnectorStatus::Errorwith the captured message inlast_error, so operators can still see and diagnose them.The
Resultreturn is preserved on both init paths for symmetryand future fatal-error handling, but no system-level errors are
currently emitted.