Skip to content

Conversation

@ruai0511
Copy link
Contributor

@ruai0511 ruai0511 commented Apr 3, 2025

Description

This PR introduces the create Rule API Logic.

An exampe API request is:

curl -XPUT "localhost:9200/_rules/workload_group"  -H 'Content-Type: application/json' -d '     
{
    "description": "description",
     "index_pattern": ["log*", "event*"],
     "workload_group": "EITBzjFkQ6CA-semNWGtRQ"
}'

And the return would be

{
   "_id":"Kqqra5YBzZOW_5Q0ALDc",
   "description":"description",
   "index_pattern":["log*", "event*"],
   "workload_group":"EITBzjFkQ6CA-semNWGtRQ",
   "updated_at":"2025-04-25T06:38:10.787Z"
}

Rule Schema PR:
#17238
RFC:
#16797

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 Apr 3, 2025

❌ Gradle check result for 90e2b4c: 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?

@ruai0511 ruai0511 force-pushed the create-rule-api-PR branch from 90e2b4c to 85ea24e Compare April 4, 2025 00:27
@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2025

❌ Gradle check result for 85ea24e: 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?

@ruai0511 ruai0511 force-pushed the create-rule-api-PR branch from 85ea24e to e215963 Compare April 4, 2025 01:27
@github-actions
Copy link
Contributor

github-actions bot commented Apr 4, 2025

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

ruai0511 and others added 11 commits June 4, 2025 15:45
Signed-off-by: Ruirui Zhang <[email protected]>
Signed-off-by: Ruirui Zhang <[email protected]>
Signed-off-by: Lingxi Chen <[email protected]>
Signed-off-by: Ruirui Zhang <[email protected]>
Signed-off-by: Ruirui Zhang <[email protected]>
Signed-off-by: Ruirui Zhang <[email protected]>
Signed-off-by: Ruirui Zhang <[email protected]>
@ruai0511 ruai0511 force-pushed the create-rule-api-PR branch from 023b4d0 to 778645c Compare June 4, 2025 22:46
@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2025

✅ Gradle check result for 778645c: SUCCESS

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 4d6f8ba into opensearch-project:main Jun 5, 2025
29 of 30 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-17792-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 4d6f8bafe489bde867b783c6facd189657ec34e6
# Push it to GitHub
git push --set-upstream origin backport/backport-17792-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-17792-to-2.x.

@jainankitk jainankitk removed the backport 2.x Backport to 2.x branch label Jun 5, 2025
@jainankitk
Copy link
Contributor

Removed the stale backport 2.x label!

Gagan6164 pushed a commit to Gagan6164/OpenSearch that referenced this pull request Jun 8, 2025
Gagan6164 pushed a commit to Gagan6164/OpenSearch that referenced this pull request Jun 8, 2025
rgsriram pushed a commit to rgsriram/OpenSearch that referenced this pull request Jun 9, 2025
abhita pushed a commit to abhita/OpenSearch that referenced this pull request Jun 9, 2025
neuenfeldttj added a commit to neuenfeldttj/OpenSearch that referenced this pull request Jun 26, 2025
…t#17792)

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

---------

Co-authored-by: Lingxi Chen <[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 create-rule-api-PR branch July 9, 2025 23:27
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants