-
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
Add API compatibility content-type support to HLRC #77859
Comments
Pinging @elastic/es-data-management (Team:Data Management) |
After a conversation with @dakrone we fine-tuned how this should work with some implementation hints. TL;DR: LLRC is where it should go, an it's a creation-time setting that cannot be changed dynamically. I was initially thinking that HLRC was the best place for this since LLRC deals with fully-formed requests and doesn't care much about what they contain. Now looking more closely, the issue is that we need to provide an opt-in configuration along with the env var, and HLRC has no configuration and its methods are only related to API endpoints. So LLRC may indeed be the place for it in the current HLRC/LLRC design. We can add this in LLRC's Regarding the new client, this isn't done yet and is the responsibility of the And this makes even more sense in the migration scenario where users can use both HLRC and the new client on top of a single LLRC instance as they would only have to take care of compat mode once. |
This adds support for the headers necessary for REST version compatibility to the Low Level Rest Client (LLRC). Compatibility mode can be turned on either with the `.setAPICompatibilityMode(true)` when creating the client, or by setting the `ELASTIC_CLIENT_APIVERSIONING` to `true` similar to our other Elasticsearch clients. Resolves elastic#77859
This adds support for the headers necessary for REST version compatibility to the High Level Rest Client (HLRC). Compatibility mode can be turned on either with the .setAPICompatibilityMode(true) when creating the client, or by setting the ELASTIC_CLIENT_APIVERSIONING to true similar to our other Elasticsearch clients. Resolves #77859
This adds support for the headers necessary for REST version compatibility to the High Level Rest Client (HLRC). Compatibility mode can be turned on either with the .setAPICompatibilityMode(true) when creating the client, or by setting the ELASTIC_CLIENT_APIVERSIONING to true similar to our other Elasticsearch clients. Resolves elastic#77859
This adds support for the headers necessary for REST version compatibility to the High Level Rest Client (HLRC). Compatibility mode can be turned on either with the .setAPICompatibilityMode(true) when creating the client, or by setting the ELASTIC_CLIENT_APIVERSIONING to true similar to our other Elasticsearch clients. Resolves #77859
The High Level Rest Client should support the API compatibility content-type.
It should be opt-in, and enabled in two ways:
client.setApiCompatibilityMode(true)
ELASTICSEARCH_APIVERSIONING
environment variables as generally supported by Elasticsearch client libraries, which allows enabling compatibility mode without rebuilding applications.Looking at
RequestContervers.REQUEST_BODY_CONTENT_TYPE
it seems that HLRC only supports JSON encoding and not CBOR/SMILE/YAML, so we should only support the corresponding vendor media typeapplication/vnd.elasticsearch+smile;compatible-with=7
.The text was updated successfully, but these errors were encountered: