-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[Rule based auto tagging] Add in-memory rule processing service #17365
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
[Rule based auto tagging] Add in-memory rule processing service #17365
Conversation
❌ Gradle check result for 09e3013: 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? |
❌ Gradle check result for 3bea59a: 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? |
@kaushalmahi12 - Precommit failing due to license error:
|
...d-management/src/main/java/org/opensearch/plugin/wlm/rule/InMemoryRuleProcessingService.java
Outdated
Show resolved
Hide resolved
...d-management/src/main/java/org/opensearch/plugin/wlm/rule/InMemoryRuleProcessingService.java
Outdated
Show resolved
Hide resolved
...d-management/src/main/java/org/opensearch/plugin/wlm/rule/InMemoryRuleProcessingService.java
Outdated
Show resolved
Hide resolved
...d-management/src/main/java/org/opensearch/plugin/wlm/rule/InMemoryRuleProcessingService.java
Outdated
Show resolved
Hide resolved
plugins/workload-management/src/main/java/org/opensearch/plugin/wlm/rule/Rule.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
Signed-off-by: Kaushal Kumar <[email protected]>
2f13ba2
to
627efa6
Compare
libs/autotagging-commons/src/main/java/org/opensearch/rule/InMemoryRuleProcessingService.java
Outdated
Show resolved
Hide resolved
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.
LGTM overall
Signed-off-by: Kaushal Kumar <[email protected]>
❌ Gradle check result for e502a38: 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? |
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.
Thanks @kaushalmahi12 for this PR. Mostly looks good, have few minor comments
libs/autotagging-commons/src/main/java/org/opensearch/rule/InMemoryRuleProcessingService.java
Outdated
Show resolved
Hide resolved
libs/autotagging-commons/src/main/java/org/opensearch/rule/InMemoryRuleProcessingService.java
Show resolved
Hide resolved
libs/autotagging-commons/src/main/java/org/opensearch/rule/InMemoryRuleProcessingService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Kaushal Kumar <[email protected]>
❌ Gradle check result for cfeaace: 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: Kaushal Kumar <[email protected]>
❌ Gradle check result for 512b0ca: 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: Kaushal Kumar <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17365 +/- ##
============================================
- Coverage 72.43% 72.39% -0.05%
+ Complexity 66065 66027 -38
============================================
Files 5351 5355 +4
Lines 306220 306338 +118
Branches 44376 44386 +10
============================================
- Hits 221812 221759 -53
- Misses 66272 66445 +173
+ Partials 18136 18134 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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-17365-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8312e42362e3fdb068cbe6b36edaeabc2f987f47
# Push it to GitHub
git push --set-upstream origin backport/backport-17365-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 |
…search-project#17365) * [rule based autotagging] add attribute value store Signed-off-by: Kaushal Kumar <[email protected]> * add in-memory rule processing service Signed-off-by: Kaushal Kumar <[email protected]> * add missing javadoc Signed-off-by: Kaushal Kumar <[email protected]> * merge the in-memory store changes: commit d02e544 Author: Kaushal Kumar <[email protected]> Date: Mon Feb 17 13:05:20 2025 -0800 add licenses directory Signed-off-by: Kaushal Kumar <[email protected]> commit 3f98f9d Author: Kaushal Kumar <[email protected]> Date: Mon Feb 17 11:52:56 2025 -0800 improve binary search bisecting expression Signed-off-by: Kaushal Kumar <[email protected]> commit 630a3ee Author: Kaushal Kumar <[email protected]> Date: Mon Feb 17 11:14:39 2025 -0800 improve javadoc for attribute value store Signed-off-by: Kaushal Kumar <[email protected]> commit acdb27c Author: Kaushal Kumar <[email protected]> Date: Fri Feb 14 10:09:58 2025 -0800 add missing javadoc Signed-off-by: Kaushal Kumar <[email protected]> commit 24c4ea6 Author: Kaushal Kumar <[email protected]> Date: Fri Feb 14 09:28:46 2025 -0800 run spotless apply Signed-off-by: Kaushal Kumar <[email protected]> commit 75b6e68 Author: Kaushal Kumar <[email protected]> Date: Fri Feb 14 09:24:32 2025 -0800 make the store interface generic Signed-off-by: Kaushal Kumar <[email protected]> Signed-off-by: Kaushal Kumar <[email protected]> * fix generics error Signed-off-by: Kaushal Kumar <[email protected]> * add CHANGELOG entry Signed-off-by: Kaushal Kumar <[email protected]> * remove stubs Signed-off-by: Kaushal Kumar <[email protected]> * move generic logic to lib Signed-off-by: Kaushal Kumar <[email protected]> * fix javadoc error Signed-off-by: Kaushal Kumar <[email protected]> * fix javadoc error Signed-off-by: Kaushal Kumar <[email protected]> * delete licenses from the wlm plugin Signed-off-by: Kaushal Kumar <[email protected]> * expose feature level attribute value store init method Signed-off-by: Kaushal Kumar <[email protected]> * add extra space to remove unwanted entry from the changelog diff Signed-off-by: Kaushal Kumar <[email protected]> * address comments Signed-off-by: Kaushal Kumar <[email protected]> * use constructors over static methods Signed-off-by: Kaushal Kumar <[email protected]> * make member var final in InMemoryRuleProcessingService Signed-off-by: Kaushal Kumar <[email protected]> * make concurrency checks more granular Signed-off-by: Kaushal Kumar <[email protected]> * add concurrent test Signed-off-by: Kaushal Kumar <[email protected]> * remove forbidden api usage Signed-off-by: Kaushal Kumar <[email protected]> --------- Signed-off-by: Kaushal Kumar <[email protected]>
…g service (#17781) * [Rule based auto tagging] Add in-memory rule processing service (#17365) * [rule based autotagging] add attribute value store Signed-off-by: Kaushal Kumar <[email protected]> * add in-memory rule processing service Signed-off-by: Kaushal Kumar <[email protected]> * add missing javadoc Signed-off-by: Kaushal Kumar <[email protected]> * merge the in-memory store changes: commit d02e544 Author: Kaushal Kumar <[email protected]> Date: Mon Feb 17 13:05:20 2025 -0800 add licenses directory Signed-off-by: Kaushal Kumar <[email protected]> commit 3f98f9d Author: Kaushal Kumar <[email protected]> Date: Mon Feb 17 11:52:56 2025 -0800 improve binary search bisecting expression Signed-off-by: Kaushal Kumar <[email protected]> commit 630a3ee Author: Kaushal Kumar <[email protected]> Date: Mon Feb 17 11:14:39 2025 -0800 improve javadoc for attribute value store Signed-off-by: Kaushal Kumar <[email protected]> commit acdb27c Author: Kaushal Kumar <[email protected]> Date: Fri Feb 14 10:09:58 2025 -0800 add missing javadoc Signed-off-by: Kaushal Kumar <[email protected]> commit 24c4ea6 Author: Kaushal Kumar <[email protected]> Date: Fri Feb 14 09:28:46 2025 -0800 run spotless apply Signed-off-by: Kaushal Kumar <[email protected]> commit 75b6e68 Author: Kaushal Kumar <[email protected]> Date: Fri Feb 14 09:24:32 2025 -0800 make the store interface generic Signed-off-by: Kaushal Kumar <[email protected]> Signed-off-by: Kaushal Kumar <[email protected]> * fix generics error Signed-off-by: Kaushal Kumar <[email protected]> * add CHANGELOG entry Signed-off-by: Kaushal Kumar <[email protected]> * remove stubs Signed-off-by: Kaushal Kumar <[email protected]> * move generic logic to lib Signed-off-by: Kaushal Kumar <[email protected]> * fix javadoc error Signed-off-by: Kaushal Kumar <[email protected]> * fix javadoc error Signed-off-by: Kaushal Kumar <[email protected]> * delete licenses from the wlm plugin Signed-off-by: Kaushal Kumar <[email protected]> * expose feature level attribute value store init method Signed-off-by: Kaushal Kumar <[email protected]> * add extra space to remove unwanted entry from the changelog diff Signed-off-by: Kaushal Kumar <[email protected]> * address comments Signed-off-by: Kaushal Kumar <[email protected]> * use constructors over static methods Signed-off-by: Kaushal Kumar <[email protected]> * make member var final in InMemoryRuleProcessingService Signed-off-by: Kaushal Kumar <[email protected]> * make concurrency checks more granular Signed-off-by: Kaushal Kumar <[email protected]> * add concurrent test Signed-off-by: Kaushal Kumar <[email protected]> * remove forbidden api usage Signed-off-by: Kaushal Kumar <[email protected]> --------- Signed-off-by: Kaushal Kumar <[email protected]> * add changelog entry Signed-off-by: Kaushal Kumar <[email protected]> * remove generic type usage with instanceof operator Signed-off-by: Kaushal Kumar <[email protected]> --------- Signed-off-by: Kaushal Kumar <[email protected]>
Description
This change adds the service class for managing in-memory view of rules and evaluates the target label for incoming search requests.
Do not review the following files since they are part of other PRs
Rule.java
PRbuild.gradle
, Everything understorage
package and corresponding UTs PRRelated Issues
#16797 (comment)
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.