-
Notifications
You must be signed in to change notification settings - Fork 24.7k
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
HLRC: Fixing bug when getting a missing pipeline #34286
Conversation
Pinging @elastic/es-core-infra |
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.
Looks good to me. I think we should also backport this to 6.4.3, as it's a bugfix to existing functionality there.
@@ -83,7 +84,7 @@ public void putPipelineAsync(PutPipelineRequest request, RequestOptions options, | |||
*/ | |||
public GetPipelineResponse getPipeline(GetPipelineRequest request, RequestOptions options) throws IOException { | |||
return restHighLevelClient.performRequestAndParseEntity( request, IngestRequestConverters::getPipeline, options, | |||
GetPipelineResponse::fromXContent, emptySet()); | |||
GetPipelineResponse::fromXContent, Collections.singleton(404)); |
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.
Big nitpick, mostly for future reference: would be nice we statically imported this, for consistency with emptySet
.
Changing the
getPipeline
API call to ignore404
errors so that the method callGetPipelineResponse::isFound
is useful again :)closes #34119