-
Notifications
You must be signed in to change notification settings - Fork 247
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 misc improvements to the framework #760
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swallez
added
Category: Enhancement
New feature or request
backport 7.17
backport 8.13
labels
Mar 12, 2024
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-7.17 7.17
# Navigate to the new working tree
cd .worktrees/backport-7.17
# Create a new branch
git switch --create backport-760-to-7.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick --mainline 1 b5aed69e3311caef0090fc616b5628fb269e1e34
# Push it to GitHub
git push --set-upstream origin backport-760-to-7.17
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-7.17 Then, create a pull request where the |
github-actions bot
pushed a commit
that referenced
this pull request
Mar 12, 2024
Adds a number of improvements and bugfixes to the JSON and utility classes: JSON framework: * A new `BufferingJsonpMapper` allows the creation of `JsonGenerator` that store JSON events in a buffer that can be replayed. This is useful to efficiently create synthetic JSON documents. * An additional `JsonpMapper.deserialize` method variant accepts the current JSON event. Fixes #741 * The Jackson implementation of `JsonpMapper` now enables the `ACCEPT_SINGLE_VALUE_AS_ARRAY` deserialization feature. This allows single values in a JSON stream to be considered as a single-value collection. API & transport framework: * `ElasticsearchException` now holds the low level http response, so that the application can inspect the details of the error. * Endpoints now have a `call` methods, to make calling endpoints programmatically easier. This is for advanced use, as an application will normally use the `ElasticsearchClient` that hides endpoint objects. * A `BinaryDataResponse` can now easily be created from a byte array. Test framework: * The `ElasticsearchTestServer` now tries to contact an Elasticsearch server running on `http://elastic:changeme@localhost:9200` before spawning a container. * A `MockHttpClient` has been added that allows writing integration-like tests without requiring a running server. This is an alternative to using `com.sun.net.httpserver.HttpServer` when we want to test http response decoding but don't need to test the network layer.
swallez
added a commit
that referenced
this pull request
Mar 12, 2024
Adds a number of improvements and bugfixes to the JSON and utility classes: JSON framework: * A new `BufferingJsonpMapper` allows the creation of `JsonGenerator` that store JSON events in a buffer that can be replayed. This is useful to efficiently create synthetic JSON documents. * An additional `JsonpMapper.deserialize` method variant accepts the current JSON event. Fixes #741 * The Jackson implementation of `JsonpMapper` now enables the `ACCEPT_SINGLE_VALUE_AS_ARRAY` deserialization feature. This allows single values in a JSON stream to be considered as a single-value collection. API & transport framework: * `ElasticsearchException` now holds the low level http response, so that the application can inspect the details of the error. * Endpoints now have a `call` methods, to make calling endpoints programmatically easier. This is for advanced use, as an application will normally use the `ElasticsearchClient` that hides endpoint objects. * A `BinaryDataResponse` can now easily be created from a byte array. Test framework: * The `ElasticsearchTestServer` now tries to contact an Elasticsearch server running on `http://elastic:changeme@localhost:9200` before spawning a container. * A `MockHttpClient` has been added that allows writing integration-like tests without requiring a running server. This is an alternative to using `com.sun.net.httpserver.HttpServer` when we want to test http response decoding but don't need to test the network layer. Co-authored-by: Sylvain Wallez <sylvain@elastic.co>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a number of improvements and bugfixes to the JSON and utility classes:
JSON framework:
BufferingJsonpMapper
allows the creation ofJsonGenerator
that store JSON events in a buffer that can be replayed. This is useful to efficiently create synthetic JSON documents.JsonpMapper.deserialize
method variant accepts the current JSON event. Fixes GetSource API throws TransportException #741JsonpMapper
now enables theACCEPT_SINGLE_VALUE_AS_ARRAY
deserialization feature. This allows single values in a JSON stream to be considered as a single-value collection.API & transport framework:
ElasticsearchException
now holds the low level http response, so that the application can inspect the details of the error.call
methods, to make calling endpoints programmatically easier. This is for advanced use, as an applicaition will normally use theElasticsearchClient
that hides endpoint objects.BinaryDataResponse
can now easily be created from a byte array.Test framework:
ElasticsearchTestServer
now tries to contact an Elasticsearch server running onhttp://elastic:changeme@localhost:9200
before spawning a container.MockHttpClient
has been added that allows writing integration-like tests without requiring a running server. This is an alternative to usingcom.sun.net.httpserver.HttpServer
when we want to rest http response decoding but don't need to test the network layer.