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

[BUG] Major inconsistencies between Java client and OpenSearch API #420

Open
AmiStrn opened this issue Mar 30, 2023 · 4 comments
Open

[BUG] Major inconsistencies between Java client and OpenSearch API #420

AmiStrn opened this issue Mar 30, 2023 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@AmiStrn
Copy link
Contributor

AmiStrn commented Mar 30, 2023

What is the bug?

Many API's are broken and unusable using the client due to the fact that the auto-generated code is relying on a later Elasticsearch version where the API has changed since 7.10.2

How can one reproduce the bug?

run

GetSnapshotResponse getSnapshotResponse = javaClient().snapshot().get(g -> g.repository(“test-repository”).snapshot(“test-snapshot-5"));

fails with:

error: Missing required property ‘GetSnapshotResponse.total’

what is this field total?
see it here in the elasticsearch docs version 8:

total (integer) The total number of snapshots that match the request when ignoring size limit or after query parameter.

Notice that the param is missing from the response body in same docs page in version 7.10

What is the expected behavior?

A valid response with no errors

This is causing the client to be impractical for use in production from our standpoint. as it seems to be auto-generated from an incompatible Elasticsearch client!

@AmiStrn AmiStrn added bug Something isn't working untriaged labels Mar 30, 2023
@AmiStrn
Copy link
Contributor Author

AmiStrn commented Mar 30, 2023

Thanks @MarinaRazumovsky for finding these issues 💪

@reta
Copy link
Collaborator

reta commented Mar 30, 2023

Thanks @AmiStrn , that's the real issue, we are looking into multiple ways to deal with that:

As of now, we are more reactive than proactive - fixing the APIs which people use and report inconsistencies with.

@reta
Copy link
Collaborator

reta commented Mar 30, 2023

PS: This is not just opensearch-java issue but covers all clients fleet.

@AmiStrn
Copy link
Contributor Author

AmiStrn commented Mar 30, 2023

Thank you @reta for the quick response, I was led to use the client by the docs. And we wish to use the official client.

fixing the APIs which people use and report inconsistencies with

Currently, that list is long. We can fix some, but it seems like a futile task since the base code needs to be taken from a client that is compatible with elasticsearch 7.10. And then we would gladly build on top of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants