Skip to content
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

Merged
merged 2 commits into from
Oct 6, 2018

Conversation

benwtrent
Copy link
Member

Changing the getPipeline API call to ignore 404 errors so that the method call GetPipelineResponse::isFound is useful again :)

closes #34119

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

Copy link
Contributor

@jtibshirani jtibshirani left a 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));
Copy link
Contributor

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.

@benwtrent benwtrent merged commit 6f32f71 into elastic:master Oct 6, 2018
@benwtrent benwtrent deleted the bug/hlrc-ingest-404 branch October 6, 2018 14:25
benwtrent added a commit that referenced this pull request Oct 6, 2018
benwtrent added a commit that referenced this pull request Oct 6, 2018
@colings86 colings86 added the >bug label Oct 25, 2018
kcm pushed a commit that referenced this pull request Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HLRC] GetPipelineResponse.isFound() is useless
4 participants