Skip to content

[rule based autotagging] Add Delete Rule API Logic #3

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

Closed
wants to merge 36 commits into from

Conversation

Lindsay-00
Copy link
Collaborator

Description

This PR introduces the Delete Rule API Logic.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

@ruai0511 ruai0511 force-pushed the get-rule-api-PR branch 3 times, most recently from 1e1b71b to 9e396a5 Compare March 31, 2025 22:53
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule can be replaced with AcknowledgedResponse

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will not need this once we remove the source class as commented above to use AcknowledgedResponse

@kaushalmahi12
Copy link
Collaborator

We would also need to add rest based yaml tests once create API pr is merged

@ruai0511 ruai0511 force-pushed the get-rule-api-PR branch 6 times, most recently from d9d1387 to 58cac7a Compare April 4, 2025 00:47
vibrantvarun and others added 13 commits April 22, 2025 10:23
* visit the subquery

Signed-off-by: Varun Jain <[email protected]>

* Fix visit method of constant score query and function score query to iterate recursively

Signed-off-by: Varun Jain <[email protected]>

---------

Signed-off-by: Varun Jain <[email protected]>
…earch-project#17682)

* Removed includeDiscoveryNodes from BaseNodesRequest

Signed-off-by: Manik Garg <[email protected]>
…/test/framework (opensearch-project#17922)

* Bump com.github.spotbugs:spotbugs-annotations in /test/framework

Bumps [com.github.spotbugs:spotbugs-annotations](https://github.com/spotbugs/spotbugs) from 4.9.0 to 4.9.3.
- [Release notes](https://github.com/spotbugs/spotbugs/releases)
- [Changelog](https://github.com/spotbugs/spotbugs/blob/master/CHANGELOG.md)
- [Commits](spotbugs/spotbugs@4.9.0...4.9.3)

---
updated-dependencies:
- dependency-name: com.github.spotbugs:spotbugs-annotations
  dependency-version: 4.9.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update changelog

Signed-off-by: dependabot[bot] <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ository-azure (opensearch-project#17925)

* Bump com.microsoft.azure:msal4j in /plugins/repository-azure

Bumps [com.microsoft.azure:msal4j](https://github.com/AzureAD/microsoft-authentication-library-for-java) from 1.18.0 to 1.20.0.
- [Release notes](https://github.com/AzureAD/microsoft-authentication-library-for-java/releases)
- [Changelog](https://github.com/AzureAD/microsoft-authentication-library-for-java/blob/dev/changelog.txt)
- [Commits](AzureAD/microsoft-authentication-library-for-java@v1.18.0...1.20.0)

---
updated-dependencies:
- dependency-name: com.microsoft.azure:msal4j
  dependency-version: 1.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Updating SHAs

Signed-off-by: dependabot[bot] <[email protected]>

* Update changelog

Signed-off-by: dependabot[bot] <[email protected]>

* Fix test failure by modifying the error message

Signed-off-by: Binlong Gao <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Binlong Gao <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Binlong Gao <[email protected]>
…s/hdfs-fixture (opensearch-project#17923)

* Bump com.google.code.gson:gson in /test/fixtures/hdfs-fixture

Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.12.1 to 2.13.0.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/main/CHANGELOG.md)
- [Commits](google/gson@gson-parent-2.12.1...gson-parent-2.13.0)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-version: 2.13.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update changelog

Signed-off-by: dependabot[bot] <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: gaobinlong <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: gaobinlong <[email protected]>
Add change log



Remove duplicate line

Signed-off-by: 10000-ki <[email protected]>
We'll need to come back and update this after the 3.0 release but for
now we should not be enforcing breaking changes against 3.0.

Signed-off-by: Andrew Ross <[email protected]>
…roject#18040)

We've seen multiple failures where the 3 second timeout was breached.
This happens in the test setup of many different tests so multiple
individual test failures have been reported.

Also replace deprecated method in Kafka API and simplify a couple other
code paths.

Signed-off-by: Andrew Ross <[email protected]>
@ruai0511 ruai0511 force-pushed the get-rule-api-PR branch 5 times, most recently from f1f2108 to d6b3e79 Compare April 23, 2025 10:46
reta and others added 15 commits April 23, 2025 09:55
…7336)

* add get rule api logic
Signed-off-by: Ruirui Zhang <[email protected]>

* modify based on comments
Signed-off-by: Ruirui Zhang <[email protected]>

* rebase from main after the schema merged
Signed-off-by: Ruirui Zhang <[email protected]>

* modify based on comments
Signed-off-by: Ruirui Zhang <[email protected]>

* extract common logics to libs
Signed-off-by: Ruirui Zhang <[email protected]>

* Add javadocs for libs
Signed-off-by: Ruirui Zhang <[email protected]>

* modify based on comments
Signed-off-by: Ruirui Zhang <[email protected]>

* modify based on comments
Signed-off-by: Ruirui Zhang <[email protected]>

* modify based on comments
Signed-off-by: Ruirui Zhang <[email protected]>

* correct UT
Signed-off-by: Ruirui Zhang <[email protected]>

* modify based on comments
Signed-off-by: Ruirui Zhang <[email protected]>

r

* refactor code and fix ut

Signed-off-by: Kaushal Kumar <[email protected]>

* remove commented code

Signed-off-by: Kaushal Kumar <[email protected]>

* address comments

Signed-off-by: Kaushal Kumar <[email protected]>

* change method name

Signed-off-by: Kaushal Kumar <[email protected]>

* fix merge conflicts

Signed-off-by: Kaushal Kumar <[email protected]>

* rename queryGroup to workloadGroup

Signed-off-by: Kaushal Kumar <[email protected]>

* add guice binding related changes

Signed-off-by: Kaushal Kumar <[email protected]>

* refactor code to create a generic rule framework structure

Signed-off-by: Kaushal Kumar <[email protected]>

* fix javadoc
Signed-off-by: Ruirui Zhang <[email protected]>

* fix UT
Signed-off-by: Ruirui Zhang <[email protected]>

* restructure tests

Signed-off-by: Kaushal Kumar <[email protected]>

* rebase with mainline

Signed-off-by: Kaushal Kumar <[email protected]>

* fix gradlew file
Signed-off-by: Ruirui Zhang <[email protected]>

* add UT
Signed-off-by: Ruirui Zhang <[email protected]>

* add action UTs

Signed-off-by: Kaushal Kumar <[email protected]>

* correct the comment

Signed-off-by: Kaushal Kumar <[email protected]>

* add more UT
Signed-off-by: Ruirui Zhang <[email protected]>

---------

Signed-off-by: Kaushal Kumar <[email protected]>
Co-authored-by: Kaushal Kumar <[email protected]>
…quests for update_by_query and reindex (opensearch-project#18003)

* Fix ingest pipeline cannot be executed when retry the failed index requests for update_by_query API and reindex API

Signed-off-by: Binlong Gao <[email protected]>

* Modify changelog

Signed-off-by: Binlong Gao <[email protected]>

* Optimize some code

Signed-off-by: Binlong Gao <[email protected]>

* Fix precommit failure

Signed-off-by: Binlong Gao <[email protected]>

---------

Signed-off-by: Binlong Gao <[email protected]>
opensearch-project#17977)

* emit lag metric for pull-based ingestion poller

Signed-off-by: Yupeng Fu <[email protected]>

* changelog

Signed-off-by: Yupeng Fu <[email protected]>

* fix ut

Signed-off-by: Yupeng Fu <[email protected]>

---------

Signed-off-by: Yupeng Fu <[email protected]>
…ject#17978)

* Enable concurrent_segment_search auto mode by default

Signed-off-by: Vikasht34 <[email protected]>

* Make Default Slice count to 1 for Non-Concurrent Path

Signed-off-by: Vikasht34 <[email protected]>

* Add tolerance to matrix_stats agg correlation value assertion

The correlation metric could be different for different document distribution across shards, or slices. slice1(doc1,doc2), slice2(doc3,doc4,doc5) could give different correlation from slice1(doc1,doc2,doc3), slice2(doc4,doc5)

The tolerance followed here is 0.000000000000001

Signed-off-by: bowenlan-amzn <[email protected]>

---------

Signed-off-by: Vikasht34 <[email protected]>
Signed-off-by: bowenlan-amzn <[email protected]>
Co-authored-by: bowenlan-amzn <[email protected]>
I observed a failure in local testing due to this issue. The code
previously was assuming it would observe a yellow cluster after
restarting a node, but the node could restart and re-join the cluster
before the assertion causing a failure. The `onNodeStopped` callback
lets the test execute code before the node is restarted, so it should
fix this issue.

Signed-off-by: Andrew Ross <[email protected]>
ruai0511 and others added 6 commits April 25, 2025 17:48
Signed-off-by: Ruirui Zhang <[email protected]>
rebase

Signed-off-by: Lingxi Chen <[email protected]>
Signed-off-by: Ruirui Zhang <[email protected]>

rebase

Signed-off-by: Lingxi Chen <[email protected]>
Signed-off-by: Ruirui Zhang <[email protected]>

rebase

Signed-off-by: Lingxi Chen <[email protected]>
rebase

Signed-off-by: Lingxi Chen <[email protected]>
Signed-off-by: Lingxi Chen <[email protected]>
Signed-off-by: Lingxi Chen <[email protected]>
@ruai0511 ruai0511 closed this Jul 9, 2025
@ruai0511 ruai0511 deleted the delete-rule-api-PR branch July 9, 2025 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.