Skip to content
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

Add Update QueryGroup API Logic #14775

Merged
merged 9 commits into from
Sep 4, 2024

Conversation

ruai0511
Copy link
Contributor

@ruai0511 ruai0511 commented Jul 16, 2024

Description

This change introduces the Update QueryGroup API which we will use to enforce node level resiliency as part of this RFC: #12342. The draft PR opened for the API specs is: opensearch-project/opensearch-api-specification#356

The Update QueryGroup API schema is:

curl -XPUT "localhost:9200/_wlm/query_group/{name}" -H 'Content-Type: application/json' -d ' 
{
    "resiliency_mode": "enforced",
    "resource_limits": {
        "cpu" : 0.4,
        "memory" : 0.2
    }
}'

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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.

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

❕ Gradle check result for 42785b8: UNSTABLE

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

codecov bot commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 82.20339% with 42 lines in your changes missing coverage. Please review.

Project coverage is 71.97%. Comparing base (3fc0139) to head (ed85052).
Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
.../org/opensearch/wlm/MutableQueryGroupFragment.java 87.50% 7 Missing and 5 partials ⚠️
...ch/plugin/wlm/rest/RestUpdateQueryGroupAction.java 0.00% 8 Missing ⚠️
...in/wlm/action/TransportUpdateQueryGroupAction.java 0.00% 5 Missing ⚠️
...va/org/opensearch/cluster/metadata/QueryGroup.java 86.48% 2 Missing and 3 partials ⚠️
...rch/plugin/wlm/action/UpdateQueryGroupRequest.java 73.33% 4 Missing ⚠️
...ugin/wlm/service/QueryGroupPersistenceService.java 92.85% 2 Missing and 2 partials ⚠️
...arch/plugin/wlm/action/UpdateQueryGroupAction.java 0.00% 3 Missing ⚠️
...pensearch/plugin/wlm/WorkloadManagementPlugin.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14775      +/-   ##
============================================
- Coverage     71.97%   71.97%   -0.01%     
- Complexity    64067    64079      +12     
============================================
  Files          5259     5265       +6     
  Lines        299431   299588     +157     
  Branches      43270    43280      +10     
============================================
+ Hits         215527   215633     +106     
- Misses        66217    66219       +2     
- Partials      17687    17736      +49     

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

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

github-actions bot commented Sep 3, 2024

❕ Gradle check result for ed85052: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=snapshot.status/10_basic/Get missing snapshot status succeeds when ignoreUnavailable is true}

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

@jainankitk jainankitk merged commit 0753461 into opensearch-project:main Sep 4, 2024
33 of 34 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-14775-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0753461986cd5746bf7b7ed2ba153cc65cea9a59
# Push it to GitHub
git push --set-upstream origin backport/backport-14775-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-14775-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.17 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.17 2.17
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.17
# Create a new branch
git switch --create backport/backport-14775-to-2.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 0753461986cd5746bf7b7ed2ba153cc65cea9a59
# Push it to GitHub
git push --set-upstream origin backport/backport-14775-to-2.17
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.17

Then, create a pull request where the base branch is 2.17 and the compare/head branch is backport/backport-14775-to-2.17.

ruai0511 added a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 4, 2024
Signed-off-by: Ruirui Zhang <[email protected]>

* Add Update QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

* append to changlog
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

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

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

* address comments
Signed-off-by: Ruirui Zhang <[email protected]>
(cherry picked from commit 0753461)
ruai0511 added a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 4, 2024
Signed-off-by: Ruirui Zhang <[email protected]>

* Add Update QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

* append to changlog
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

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

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

* address comments
Signed-off-by: Ruirui Zhang <[email protected]>
(cherry picked from commit 0753461)
ruai0511 added a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 4, 2024
Signed-off-by: Ruirui Zhang <[email protected]>

* Add Update QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

* append to changlog
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

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

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

* address comments
Signed-off-by: Ruirui Zhang <[email protected]>
(cherry picked from commit 0753461)
jainankitk pushed a commit that referenced this pull request Sep 4, 2024
Signed-off-by: Ruirui Zhang <[email protected]>

* Add Update QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

* append to changlog
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

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

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

* address comments
Signed-off-by: Ruirui Zhang <[email protected]>
(cherry picked from commit 0753461)

Signed-off-by: Ruirui Zhang <[email protected]>
ruai0511 added a commit to kaushalmahi12/OpenSearch that referenced this pull request Sep 4, 2024
Signed-off-by: Ruirui Zhang <[email protected]>

* Add Update QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

* append to changlog
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

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

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

* address comments
Signed-off-by: Ruirui Zhang <[email protected]>
(cherry picked from commit 0753461)
jainankitk pushed a commit that referenced this pull request Sep 5, 2024
Signed-off-by: Ruirui Zhang <[email protected]>

* Add Update QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

* append to changlog
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

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

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

* address comments
Signed-off-by: Ruirui Zhang <[email protected]>
(cherry picked from commit 0753461)
akolarkunnu pushed a commit to akolarkunnu/OpenSearch that referenced this pull request Sep 10, 2024
* Add Update QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

* append to changlog
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

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

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

* address comments
Signed-off-by: Ruirui Zhang <[email protected]>
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 16, 2024
* Add Update QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

* append to changlog
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

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

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

* address comments
Signed-off-by: Ruirui Zhang <[email protected]>
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 17, 2024
* Add Update QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

* append to changlog
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

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

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

* address comments
Signed-off-by: Ruirui Zhang <[email protected]>
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 21, 2024
* Add Update QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

* append to changlog
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

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

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

* address comments
Signed-off-by: Ruirui Zhang <[email protected]>
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