[Rest Api Compatibility] Typed endpoint for bulk api#73571
Merged
pgomulka merged 9 commits intoelastic:masterfrom Jun 7, 2021
Merged
[Rest Api Compatibility] Typed endpoint for bulk api#73571pgomulka merged 9 commits intoelastic:masterfrom
pgomulka merged 9 commits intoelastic:masterfrom
Conversation
retrofits typed endpoint and type in request parsing the original types removal commit elastic#46983 relates elastic#51816
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
pgomulka
commented
Jun 1, 2021
...p-api-plugin/src/main/java/org/elasticsearch/plugin/noop/action/bulk/RestNoopBulkAction.java
Show resolved
Hide resolved
pgomulka
commented
Jun 1, 2021
| ensureOpen(); | ||
| bulkRequest.add(data, defaultIndex, null, null, defaultPipeline, null, | ||
| true, xContentType); | ||
| true, xContentType, RestApiVersion.current()); //TOASKONREVIEWis this only used in server, not from Rest? |
Contributor
Author
There was a problem hiding this comment.
can BulkProcessor be used from RestApi? I could not find usages. Should it support compatible API?
Contributor
Author
There was a problem hiding this comment.
from what we discussed on compatible-rest-api sync, BulkProcessor is not called from Rest layer, so should not need to care about the version from the RestRequest.
romseygeek
approved these changes
Jun 7, 2021
Contributor
romseygeek
left a comment
There was a problem hiding this comment.
Some styling nits but LGTM otherwise
...p-api-plugin/src/main/java/org/elasticsearch/plugin/noop/action/bulk/RestNoopBulkAction.java
Show resolved
Hide resolved
| apply plugin: 'elasticsearch.yaml-rest-test' | ||
| apply plugin: 'elasticsearch.internal-cluster-test' | ||
| apply plugin: 'elasticsearch.internal-test-artifact-base' | ||
| //apply plugin: 'elasticsearch.yaml-rest-compat-test' |
rest-api-spec/build.gradle
Outdated
| 'bulk/51_refresh_with_types/refresh=true immediately makes changes are visible in search', | ||
| 'bulk/51_refresh_with_types/refresh=wait_for waits until changes are visible in search', | ||
| 'bulk/81_cas_with_types/Compare And Swap Sequence Numbers', | ||
| // 'bulk/11_basic_with_types/Array of objects', |
Contributor
There was a problem hiding this comment.
Should these be deleted rather than commented out?
| builder.field(STATUS, response.status().getStatus()); | ||
| } else { | ||
| builder.field(_INDEX, failure.getIndex()); | ||
| if(builder.getRestApiVersion() == RestApiVersion.V_7){ |
| @Override | ||
| public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { | ||
| builder.field(INDEX_FIELD, index); | ||
| if(builder.getRestApiVersion() == RestApiVersion.V_7){ |
| * Helper to parse bulk requests. This should be considered an internal class. | ||
| */ | ||
| public final class BulkRequestParser { | ||
| private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(BulkRequestParser.class); |
66 tasks
This file contains hidden or 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
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.
retrofits typed endpoint and type in request parsing
the original types removal commit
#46983
relates #51816
gradle check?