-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Continue registering pipelines after one pipeline parse failure. #28752
Changes from 1 commit
bcfa96d
a1336c4
1680c0f
0d3caba
e25ea29
2da875c
4d2d3ee
dfb2679
02d3f97
31a22aa
534e155
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,16 +81,20 @@ void innerUpdatePipelines(ClusterState previousState, ClusterState state) { | |
} | ||
|
||
Map<String, Pipeline> pipelines = new HashMap<>(); | ||
ArrayList<ElasticsearchParseException> exceptions = new ArrayList<>(); | ||
for (PipelineConfiguration pipeline : ingestMetadata.getPipelines().values()) { | ||
try { | ||
pipelines.put(pipeline.getId(), factory.create(pipeline.getId(), pipeline.getConfigAsMap(), processorFactories)); | ||
} catch (ElasticsearchParseException e) { | ||
throw e; | ||
pipelines.put(pipeline.getId(), Pipeline.EMPTY); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if we can create a pipeline with a single There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like this, but I will try to do this in such a way that the pipeline isn't actually executed and is only used to store the exception. If I can't find a way to cleanly do that, then I will just let the pipeline run and fail There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, also, |
||
exceptions.add(e); | ||
} catch (Exception e) { | ||
throw new ElasticsearchParseException("Error updating pipeline with id [" + pipeline.getId() + "]", e); | ||
pipelines.put(pipeline.getId(), Pipeline.EMPTY); | ||
exceptions.add(new ElasticsearchParseException("Error updating pipeline with id [" + pipeline.getId() + "]", e)); | ||
} | ||
} | ||
this.pipelines = Collections.unmodifiableMap(pipelines); | ||
ExceptionsHelper.rethrowAndSuppress(exceptions); | ||
} | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/ArrayList/List ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated