-
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
Add template snippets support for field and target_field in KV ingest processor #10040
Conversation
… processor Signed-off-by: Gao Binlong <[email protected]>
Signed-off-by: Gao Binlong <[email protected]>
Compatibility status:Checks if related components are compatible with change cd50504 Incompatible componentsIncompatible components: [https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/performance-analyzer.git] Skipped componentsCompatible componentsCompatible components: [https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/alerting.git] |
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
❌ Gradle check result for e4a31b7: 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? |
modules/ingest-common/src/main/java/org/opensearch/ingest/common/KeyValueProcessor.java
Outdated
Show resolved
Hide resolved
modules/ingest-common/src/yamlRestTest/resources/rest-api-spec/test/ingest/150_kv.yml
Show resolved
Hide resolved
@msfroh another one for you :) |
Signed-off-by: Gao Binlong <[email protected]>
Signed-off-by: Gao Binlong <[email protected]>
❕ Gradle check result for cd50504: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reta you good with this?
@gaobinlong could you please create a documentation issue update for this processor? (https://github.com/opensearch-project/documentation-website/) Thank you. |
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-10040-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 7f4537c3d4068a117576e6e2214eaf924db6748f
# Push it to GitHub
git push --set-upstream origin backport/backport-10040-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
@gaobinlong could you please send a manual backport to |
@reta, sure, I'll create a backport PR and documentation PR for this change later. |
… processor (opensearch-project#10040) * Add template snippets support for field and target_field in KV ingest processor Signed-off-by: Gao Binlong <[email protected]> * modify change log Signed-off-by: Gao Binlong <[email protected]> * revert replace assertThat by assertEquals Signed-off-by: Gao Binlong <[email protected]> * Revert some code Signed-off-by: Gao Binlong <[email protected]> * Revert some code Signed-off-by: Gao Binlong <[email protected]> * Fix typo and skip some yml test by version Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> (cherry picked from commit 7f4537c)
… processor (#10040) (#11300) * Add template snippets support for field and target_field in KV ingest processor Signed-off-by: Gao Binlong <[email protected]> * modify change log Signed-off-by: Gao Binlong <[email protected]> * revert replace assertThat by assertEquals Signed-off-by: Gao Binlong <[email protected]> * Revert some code Signed-off-by: Gao Binlong <[email protected]> * Revert some code Signed-off-by: Gao Binlong <[email protected]> * Fix typo and skip some yml test by version Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> (cherry picked from commit 7f4537c)
… processor (opensearch-project#10040) * Add template snippets support for field and target_field in KV ingest processor Signed-off-by: Gao Binlong <[email protected]> * modify change log Signed-off-by: Gao Binlong <[email protected]> * revert replace assertThat by assertEquals Signed-off-by: Gao Binlong <[email protected]> * Revert some code Signed-off-by: Gao Binlong <[email protected]> * Revert some code Signed-off-by: Gao Binlong <[email protected]> * Fix typo and skip some yml test by version Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]>
… processor (opensearch-project#10040) * Add template snippets support for field and target_field in KV ingest processor Signed-off-by: Gao Binlong <[email protected]> * modify change log Signed-off-by: Gao Binlong <[email protected]> * revert replace assertThat by assertEquals Signed-off-by: Gao Binlong <[email protected]> * Revert some code Signed-off-by: Gao Binlong <[email protected]> * Revert some code Signed-off-by: Gao Binlong <[email protected]> * Fix typo and skip some yml test by version Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]>
… processor (opensearch-project#10040) * Add template snippets support for field and target_field in KV ingest processor Signed-off-by: Gao Binlong <[email protected]> * modify change log Signed-off-by: Gao Binlong <[email protected]> * revert replace assertThat by assertEquals Signed-off-by: Gao Binlong <[email protected]> * Revert some code Signed-off-by: Gao Binlong <[email protected]> * Revert some code Signed-off-by: Gao Binlong <[email protected]> * Fix typo and skip some yml test by version Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]>
… processor (opensearch-project#10040) * Add template snippets support for field and target_field in KV ingest processor Signed-off-by: Gao Binlong <[email protected]> * modify change log Signed-off-by: Gao Binlong <[email protected]> * revert replace assertThat by assertEquals Signed-off-by: Gao Binlong <[email protected]> * Revert some code Signed-off-by: Gao Binlong <[email protected]> * Revert some code Signed-off-by: Gao Binlong <[email protected]> * Fix typo and skip some yml test by version Signed-off-by: Gao Binlong <[email protected]> --------- Signed-off-by: Gao Binlong <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
Description
Add template snippets support for
field
andtarget_field
parameters in KV ingest processor so that users can use mustache script like{{some filed}}
to set those parameters.Here is an example:
The response is:
The main changes of this PR are:
field
andtarget_field
parameters in KV ingest processor.Related Issues
#9964
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.