Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions x-pack/lib/config_management/elasticsearch_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ def pipeline_configs
begin
fetcher.fetch_config(es_version, pipeline_ids, client)
rescue LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError => e
# es-output 12.0.2 throws 404 as error, but we want to handle it as empty config
return [] if e.response_code == 404
# es-output 12.0.2 throws 404 as an error, returned cache if it exists, otherwise none
if e.response_code == 404
return @cached_pipelines || []
end
raise e
end

fetcher.get_pipeline_ids.collect do |pid|
get_pipeline(pid, fetcher)
end.compact
@cached_pipelines = fetcher.get_pipeline_ids.collect { |pid| get_pipeline(pid, fetcher) }.compact
return @cached_pipelines
end

def get_es_version
Expand Down