Skip to content

Conversation

@ruai0511
Copy link
Contributor

@ruai0511 ruai0511 commented Feb 3, 2025

Description

This PR introduces the schema for Rule object used in the auto tagging feature. A single rule will only have one feature but could have multiple attributes.
For the example below, the feature is query_group, and corresponds to the tag dev_query_group_id

{
    "_id": "fwhbuib397u4o03==",
    "description": "description",
    "attribute_1": ["logs123"],
    "attribute_2": ["xxxx", "yyyy"],
    "query_group": "dev_query_group_id",
    "updated_at": "01-10-2025T21:23:456Z"
}

Related issues:
RFC: #16797
#16813

Check List

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2025

✅ Gradle check result for f6a4a28: SUCCESS

@codecov
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 79.32692% with 43 lines in your changes missing coverage. Please review.

Project coverage is 72.36%. Comparing base (47d3655) to head (8f106ae).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...src/main/java/org/opensearch/autotagging/Rule.java 81.63% 6 Missing and 12 partials ⚠️
...java/org/opensearch/autotagging/RuleValidator.java 81.08% 4 Missing and 10 partials ⚠️
...ain/java/org/opensearch/autotagging/Attribute.java 45.45% 5 Missing and 1 partial ⚠️
...rg/opensearch/autotagging/AutoTaggingRegistry.java 83.33% 1 Missing and 2 partials ⚠️
...n/java/org/opensearch/autotagging/FeatureType.java 71.42% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17238      +/-   ##
============================================
- Coverage     72.53%   72.36%   -0.18%     
+ Complexity    65826    65741      -85     
============================================
  Files          5311     5316       +5     
  Lines        305073   305281     +208     
  Branches      44243    44287      +44     
============================================
- Hits         221293   220912     -381     
- Misses        65688    66197     +509     
- Partials      18092    18172      +80     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ruai0511 ruai0511 added the backport 2.x Backport to 2.x branch label Feb 7, 2025
@github-actions
Copy link
Contributor

✅ Gradle check result for 5c7de13: SUCCESS

@github-actions
Copy link
Contributor

❕ Gradle check result for 108ae79: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testSnapshotWithStuckNode
      1 org.opensearch.repositories.azure.AzureBlobStoreRepositoryTests.testIndicesDeletedFromRepository

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@github-actions
Copy link
Contributor

❕ Gradle check result for 8f106ae: UNSTABLE

  • TEST FAILURES:
      2 org.opensearch.cluster.MinimumClusterManagerNodesIT.testThreeNodesNoClusterManagerBlock
      1 org.opensearch.snapshots.DedicatedClusterSnapshotRestoreIT.testSnapshotWithStuckNode

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link
Contributor

@sgup432 sgup432 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for making the change

@jainankitk jainankitk merged commit b24c72b into opensearch-project:main Mar 21, 2025
31 of 32 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

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-17238-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b24c72b06bfd76d7d1d134a9ec9804965ad74352
# Push it to GitHub
git push --set-upstream origin backport/backport-17238-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 base branch is 2.x and the compare/head branch is backport/backport-17238-to-2.x.

ruai0511 added a commit to ruai0511/OpenSearch that referenced this pull request Mar 21, 2025
…h-project#17238)

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

* add rule schema for workload management
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

* add javadoc for autotagging directory
Signed-off-by: Ruirui Zhang <[email protected]>

* change field name from 'name' to 'description'
Signed-off-by: Ruirui Zhang <[email protected]>

* update the rule schema
Signed-off-by: Ruirui Zhang <[email protected]>

* simplify autotagging registry
Signed-off-by: Ruirui Zhang <[email protected]>

* remove generic type parameter from Rule class
Signed-off-by: Ruirui Zhang <[email protected]>

* modify based on comments
Signed-off-by: Ruirui Zhang <[email protected]>
(cherry picked from commit b24c72b)
jainankitk pushed a commit that referenced this pull request Mar 21, 2025
…17653)

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

* add rule schema for workload management
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

* add javadoc for autotagging directory
Signed-off-by: Ruirui Zhang <[email protected]>

* change field name from 'name' to 'description'
Signed-off-by: Ruirui Zhang <[email protected]>

* update the rule schema
Signed-off-by: Ruirui Zhang <[email protected]>

* simplify autotagging registry
Signed-off-by: Ruirui Zhang <[email protected]>

* remove generic type parameter from Rule class
Signed-off-by: Ruirui Zhang <[email protected]>

* modify based on comments
Signed-off-by: Ruirui Zhang <[email protected]>
(cherry picked from commit b24c72b)

Signed-off-by: Ruirui Zhang <[email protected]>
bzhangam pushed a commit to bzhangam/OpenSearch that referenced this pull request Mar 25, 2025
…h-project#17238)

* add rule schema for workload management
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

* add javadoc for autotagging directory
Signed-off-by: Ruirui Zhang <[email protected]>

* change field name from 'name' to 'description'
Signed-off-by: Ruirui Zhang <[email protected]>

* update the rule schema
Signed-off-by: Ruirui Zhang <[email protected]>

* simplify autotagging registry
Signed-off-by: Ruirui Zhang <[email protected]>

* remove generic type parameter from Rule class
Signed-off-by: Ruirui Zhang <[email protected]>

* modify based on comments
Signed-off-by: Ruirui Zhang <[email protected]>
@ruai0511 ruai0511 deleted the rule-schema-PR branch July 9, 2025 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.x Backport to 2.x branch backport-failed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants