Skip to content

Conversation

@ruai0511
Copy link
Contributor

@ruai0511 ruai0511 commented Jun 11, 2025

Description

Bug fix for https://github.com/opensearch-project/OpenSearch/pull/17797/files

Problem:
When trying to update a rule by just changing its description, the system incorrectly throws a "duplicate rule" error, even though no duplicate rule is created.

When the rule in any api has the same rule id as an existing rule, it means either we are updating an existing rule or we already have the exact same rule in the system under the same doc id (because id is generated based on rule content), in either case, we are not creating duplicate rules so the system shouldn't throw error.

This PR addressed the above issue.

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 requested a review from a team as a code owner June 11, 2025 03:08
Signed-off-by: Ruirui Zhang <[email protected]>
@ruai0511 ruai0511 force-pushed the update-rule-bugfix branch from 28d1368 to 3f2f49e Compare June 11, 2025 03:10
@github-actions
Copy link
Contributor

❌ Gradle check result for 3f2f49e: 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?

@jainankitk
Copy link
Contributor

Seems like a flaky test:

[Test Result](https://build.ci.opensearch.org/job/gradle-check/59101/testReport/) (2 failures / +2)

    [org.opensearch.recovery.RecoveryWhileUnderLoadIT.testRecoverWhileUnderLoadWithDerivedSource {p0={"cluster.indices.replication.strategy":"SEGMENT"}}](https://build.ci.opensearch.org/job/gradle-check/59101/testReport/junit/org.opensearch.recovery/RecoveryWhileUnderLoadIT/testRecoverWhileUnderLoadWithDerivedSource__p0___cluster_indices_replication_strategy___SEGMENT___/)

Retrying the gradle check

Copy link
Contributor

@jainankitk jainankitk left a comment

Choose a reason for hiding this comment

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

LGTM!

@jainankitk jainankitk merged commit f7ebe22 into opensearch-project:main Jun 11, 2025
32 of 35 checks passed
abhita pushed a commit to abhita/OpenSearch that referenced this pull request Jun 17, 2025
neuenfeldttj pushed a commit to neuenfeldttj/OpenSearch that referenced this pull request Jun 26, 2025
Signed-off-by: Ruirui Zhang <[email protected]>Signed-off-by: TJ Neuenfeldt <[email protected]>
neuenfeldttj pushed a commit to neuenfeldttj/OpenSearch that referenced this pull request Jun 26, 2025
@ruai0511 ruai0511 deleted the update-rule-bugfix branch July 9, 2025 23:28
tandonks pushed a commit to tandonks/OpenSearch that referenced this pull request Aug 5, 2025
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.

3 participants