Repository navigation
fix(topology): preserve component failure details #26549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+749
−230
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
d79fc2f
fix(socket source): report bind errors in task failures
gwenaskell b59daf4
fix(source): preserve failure details in task errors
gwenaskell 97a039c
fix(topology): log panic payload as a field
gwenaskell c7982e2
fix(sink): preserve runtime error details
gwenaskell 8d052cb
fix(sink): retain console runtime error causes
gwenaskell c1afff8
fix(topology): retain more component runtime errors
gwenaskell 88099b2
refactor(topology): simplify component error handling
gwenaskell a676693
fix(sink): propagate Humio metrics runtime errors
gwenaskell 0486b9a
refactor(sinks): use one stream variant for runtime errors
gwenaskell 48bb414
refactor(topology): use boxed errors for component failures
gwenaskell 8fc1fac
fix(topology): retain available source errors
gwenaskell 500956e
refactor(topology): give sink errors a default wrapper
gwenaskell 7721fa0
fix(sources): retain output send error causes
gwenaskell f16b880
misc simplification
gwenaskell af8235d
refactor(topology): simplify runtime error adapters
gwenaskell 13e9b58
refactor(sources): alias downstream send results
gwenaskell 2896529
fix(topology): identify opaque source and sink failures
gwenaskell 0070a55
Merge remote-tracking branch 'origin/master' into yoenn.burban/socket…
gwenaskell 0231edc
Update changelog.d/socket_bind_error_context.fix.md
gwenaskell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Vector now reports the underlying error when a source or sink task fails at runtime; previously, it only said `the task completed with an error`. That includes failures to bind a listening socket (for example `Address already in use (os error 48)`), broker subscribe and consume errors, checkpoint file errors, sink runtime errors, and sources that stop because their downstream channel closed. Vector now includes the panic payload in its logs. | ||
|
|
||
| authors: gwenaskell |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,30 @@ | ||
| use futures::future::BoxFuture; | ||
| use std::future::Future; | ||
|
|
||
| pub type Source = BoxFuture<'static, Result<(), ()>>; | ||
| use futures::{TryFutureExt, future::BoxFuture}; | ||
|
|
||
| /// Error returned by a running source. | ||
| pub type SourceError = vector_common::Error; | ||
|
|
||
| /// Future that runs a source until shutdown or failure. | ||
| pub type Source = BoxFuture<'static, Result<(), SourceError>>; | ||
|
|
||
| fn default_source_error() -> SourceError { | ||
| "the source task completed with an error".into() | ||
| } | ||
|
|
||
| /// Adapt a source that only reports whether it failed. | ||
| pub fn opaque_source<F>(future: F) -> Source | ||
| where | ||
| F: Future<Output = Result<(), ()>> + Send + 'static, | ||
| { | ||
| Box::pin(future.map_err(|()| default_source_error())) | ||
| } | ||
|
|
||
| /// Adapt a source that returns an error with a cause. | ||
| pub fn source_with_error<F, E>(future: F) -> Source | ||
| where | ||
| F: Future<Output = Result<(), E>> + Send + 'static, | ||
| E: Into<SourceError>, | ||
| { | ||
| Box::pin(future.err_into()) | ||
| } |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.