Add mapper_settings support and field_mapping mapper type for pull-based ingestion - #20722
Conversation
…sed ingestion Signed-off-by: Rishab Nahata <rishab.nahata@uber.com>
PR Reviewer Guide 🔍(Review updated until commit a94a723)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to a94a723 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit cbf8280
Suggestions up to commit 4655f27
Suggestions up to commit eab96bb
Suggestions up to commit 4e13480
|
|
❌ Gradle check result for 4e13480: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Rishab Nahata <rishab.nahata@uber.com>
|
Persistent review updated to latest commit eab96bb |
|
❌ Gradle check result for eab96bb: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Rishab Nahata <rishab.nahata@uber.com>
|
❌ Gradle check result for 4655f27: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Rishab Nahata <rishab.nahata@uber.com>
|
❌ Gradle check result for cbf8280: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Rishab Nahata <rishabnahata07@gmail.com>
|
Persistent review updated to latest commit a94a723 |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #20722 +/- ##
============================================
+ Coverage 73.23% 73.28% +0.04%
- Complexity 72016 72019 +3
============================================
Files 5783 5784 +1
Lines 329438 329471 +33
Branches 47534 47541 +7
============================================
+ Hits 241268 241440 +172
+ Misses 68868 68613 -255
- Partials 19302 19418 +116 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
varunbharadwaj
left a comment
There was a problem hiding this comment.
Looks good to me.
…sed ingestion (opensearch-project#20722) * Add mapper_settings support and field_mapping mapper type for pull-based ingestion Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> * Add changelog Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> * Add setting validation Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> * Fix spotless check Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> * Add mapper class Signed-off-by: Rishab Nahata <rishabnahata07@gmail.com> --------- Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> Signed-off-by: Rishab Nahata <rishabnahata07@gmail.com> Signed-off-by: Aparajita Pandey <aparajita31pandey@gmail.com>
…sed ingestion (opensearch-project#20722) * Add mapper_settings support and field_mapping mapper type for pull-based ingestion Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> * Add changelog Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> * Add setting validation Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> * Fix spotless check Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> * Add mapper class Signed-off-by: Rishab Nahata <rishabnahata07@gmail.com> --------- Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> Signed-off-by: Rishab Nahata <rishabnahata07@gmail.com>
* Add mapper_type and mapper_settings to IngestionSource schema Companion spec change for opensearch-project/OpenSearch#20722 and opensearch-project/OpenSearch#20729 which added configurable message mapping to pull-based ingestion. Adds: - IngestionSourceMapperType enum (default, raw_payload, field_mapping) - mapper_type property on IngestionSource - mapper_settings property on IngestionSource (additionalProperties for field_mapping keys: id_field, version_field, op_type_field, etc.) Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix lint (sort enum values) and add changelog entry Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Change mapper_settings to additionalProperties: true Matches param pattern for forward compatibility with future mapper types that may require non-string values. Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Generalize mapper_settings description Avoid listing specific keys that may change across mapper types and versions. Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add test for mapper_type and mapper_settings in ingestion settings Version-gated to >=3.6 since mapper_type is introduced in that version. Uses file-based ingestion (no Kafka dependency) to validate that mapper_type and mapper_settings are accepted in index creation. Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add response payload assertions to mapper_settings test Moved index creation from prologue to a chapter so we can assert acknowledged/shards_acknowledged. The GET chapter now verifies that mapper_type and mapper_settings values are returned correctly in the index settings response. Signed-off-by: Rishab Nahata <rishab.nahata@uber.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Description
Adds a new
mapper_settings.*prefix setting toIngestionSourcethat allows mapper-specific configuration to be passed to message mappers in pull-based ingestion. Also addsfield_mappingas a newMapperTypeenum value with a version compatibility check to prevent usage in mixed clusters.This is a foundational change — the settings are stored but not yet consumed. The actual
FieldMappingIngestionMessageMapperimplementation will follow in a subsequent PR.Related Issues
Resolves #[Issue number to be closed when this PR is merged]
#20721
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.