Repository navigation
feat(core): default error handler - #648
Merged
lburgazzoli merged 5 commits intoApr 13, 2021
Merged
Conversation
oscerd
approved these changes
Apr 5, 2021
lburgazzoli
reviewed
Apr 5, 2021
Adding a new configurer that will look for a camel.k.global-error-handler property that can be used to set a default global error handler. Any route builder will inherit this error handler unless it is explicitly specified.
* Introduced a new SourceType, errorHandler, that can be used as a source for spotting a default error handler that will be used in those routes that don't specify any * Forced the sources sorting in order to load errorHandler first, sources and templates * Added a check to make sure only one error handler is provided
squakez
force-pushed
the
feat/kameletbinding_error_handler
branch
from
April 13, 2021 10:46
3266051 to
00121eb
Compare
lburgazzoli
reviewed
Apr 13, 2021
squakez
force-pushed
the
feat/kameletbinding_error_handler
branch
from
April 13, 2021 13:34
a2ac53a to
d3236de
Compare
lburgazzoli
reviewed
Apr 13, 2021
squakez
force-pushed
the
feat/kameletbinding_error_handler
branch
from
April 13, 2021 14:11
d3236de to
088c3cd
Compare
lburgazzoli
reviewed
Apr 13, 2021
| return; | ||
| } | ||
| // We must ensure the source order as defined in SourceType enum | ||
| Arrays.sort(sources, |
Contributor
There was a problem hiding this comment.
I think getType should never return null so maybe we should add some validation and then this can maybe simplified with something like:
Arrays.sort(source, Comparator.comparing(SourceDefinition::getType))
Contributor
Author
There was a problem hiding this comment.
I agree. I had to introduce those checks because there were a few unit test failing and also the real integration. I think the root cause may be within camel k which leaves that field blank. However, it will need a bit more of investigation. Are you okey if I open a follow up issue and we keep this ahead?
lburgazzoli
approved these changes
Apr 13, 2021
This was referenced Apr 14, 2021
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.
I've changed a little bit the first commit in order to avoid re-loading the source. Adding a new SourceType and make it load the very first will allow Camel K operator to specify the
error-handlerKamelet just once.Release Note