-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix ignore_missing parameter has no effect in rename ingest processor #9725
Fix ignore_missing parameter has no effect in rename ingest processor #9725
Conversation
…t in rename ingest processor Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Compatibility status:Checks if related components are compatible with change b19ed23 Incompatible componentsSkipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/reporting.git] |
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #9725 +/- ##
============================================
- Coverage 71.16% 71.08% -0.09%
+ Complexity 58114 58048 -66
============================================
Files 4824 4824
Lines 273897 273900 +3
Branches 39910 39911 +1
============================================
- Hits 194926 194708 -218
- Misses 62573 62865 +292
+ Partials 16398 16327 -71
|
Could anyone help to review this PR? Thanks! |
modules/ingest-common/src/main/java/org/opensearch/ingest/common/RenameProcessor.java
Outdated
Show resolved
Hide resolved
modules/ingest-common/src/test/java/org/opensearch/ingest/common/RenameProcessorTests.java
Show resolved
Hide resolved
Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: gaobinlong <gbl_long@163.com>
Gradle Check (Jenkins) Run Completed with:
|
@msfroh any comments from your side? thank you! |
Looks good to me! 👍 Thanks @gaobinlong ! |
…#9725) * Fix ignore_missing parameter has no effect when using template snippet in rename ingest processor Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Small change Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: gaobinlong <gbl_long@163.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com> Signed-off-by: gaobinlong <gbl_long@163.com> Co-authored-by: Andriy Redko <drreta@gmail.com> (cherry picked from commit 921cd0c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…#9725) (#10043) * Fix ignore_missing parameter has no effect when using template snippet in rename ingest processor * Small change --------- (cherry picked from commit 921cd0c) Signed-off-by: Gao Binlong <gbinlong@amazon.com> Signed-off-by: gaobinlong <gbl_long@163.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Andriy Redko <drreta@gmail.com>
…opensearch-project#9725) * Fix ignore_missing parameter has no effect when using template snippet in rename ingest processor Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Small change Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: gaobinlong <gbl_long@163.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com> Signed-off-by: gaobinlong <gbl_long@163.com> Co-authored-by: Andriy Redko <drreta@gmail.com>
…opensearch-project#9725) * Fix ignore_missing parameter has no effect when using template snippet in rename ingest processor Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Small change Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: gaobinlong <gbl_long@163.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com> Signed-off-by: gaobinlong <gbl_long@163.com> Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: Ivan Brusic <ivan.brusic@flocksafety.com>
…opensearch-project#9725) * Fix ignore_missing parameter has no effect when using template snippet in rename ingest processor Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Small change Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: gaobinlong <gbl_long@163.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com> Signed-off-by: gaobinlong <gbl_long@163.com> Co-authored-by: Andriy Redko <drreta@gmail.com>
…opensearch-project#9725) * Fix ignore_missing parameter has no effect when using template snippet in rename ingest processor Signed-off-by: Gao Binlong <gbinlong@amazon.com> * Small change Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: gaobinlong <gbl_long@163.com> --------- Signed-off-by: Gao Binlong <gbinlong@amazon.com> Signed-off-by: gaobinlong <gbl_long@163.com> Co-authored-by: Andriy Redko <drreta@gmail.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Description
Fix the bug of ignore_missing parameter has no effect when using template snippet in rename ingest processor, if the field in the template snippet
{{field}}
does not exist, the resolved field path is''
, thendocument.hasField
method will throwpath cannot be null nor empty
error directly even though the parameterignore_missing
istrue
. So we should check the resolve field path in advance, if it's empty andignore_missing
istrue
, exits quietly.Related Issues
#9687
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.