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 Get QueryGroup API Logic #14709

Merged
merged 14 commits into from
Aug 16, 2024
Merged

Conversation

ruai0511
Copy link
Contributor

@ruai0511 ruai0511 commented Jul 10, 2024

Description

This change introduces the Get 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 Get QueryGroup API schema is:

curl -XGET "localhost:9200/_wlm/query_group/"  // get all existing QueryGroups
curl -XGET "localhost:9200/_wlm/query_group/{name}"  // get the QueryGroup with name={name}

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 d7a452a: SUCCESS

Copy link
Contributor

✅ Gradle check result for 837a2bb: SUCCESS

Copy link

codecov bot commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 72.22222% with 20 lines in your changes missing coverage. Please review.

Project coverage is 71.96%. Comparing base (b316279) to head (d4615c7).
Report is 2 commits behind head on main.

Files Patch % Lines
...earch/plugin/wlm/rest/RestGetQueryGroupAction.java 0.00% 7 Missing ⚠️
...nsearch/plugin/wlm/action/GetQueryGroupAction.java 0.00% 3 Missing ⚠️
...search/plugin/wlm/action/GetQueryGroupRequest.java 76.92% 2 Missing and 1 partial ⚠️
...lugin/wlm/action/TransportGetQueryGroupAction.java 76.92% 2 Missing and 1 partial ⚠️
...pensearch/plugin/wlm/WorkloadManagementPlugin.java 0.00% 2 Missing ⚠️
...ugin/wlm/service/QueryGroupPersistenceService.java 88.88% 0 Missing and 1 partial ⚠️
...va/org/opensearch/cluster/metadata/QueryGroup.java 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #14709      +/-   ##
============================================
+ Coverage     71.80%   71.96%   +0.16%     
- Complexity    63090    63179      +89     
============================================
  Files          5207     5212       +5     
  Lines        295581   295649      +68     
  Branches      42690    42692       +2     
============================================
+ Hits         212248   212776     +528     
+ Misses        65901    65408     -493     
- Partials      17432    17465      +33     

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

Copy link
Contributor

❕ Gradle check result for 70eb0dc: 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
Contributor

❌ Gradle check result for 9379a6e: 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 a7f8835: SUCCESS

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

❌ Gradle check result for d4615c7: 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 d4615c7: SUCCESS

@jed326 jed326 merged commit a900a16 into opensearch-project:main Aug 16, 2024
34 checks passed
@jed326 jed326 added the v2.17.0 label Aug 16, 2024
@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-14709-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a900a16ce8c076488324993ec963f6a6f0e9e269
# Push it to GitHub
git push --set-upstream origin backport/backport-14709-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-14709-to-2.x.

@jed326
Copy link
Collaborator

jed326 commented Aug 16, 2024

@ruai0511 please open a manual backport. Thanks!

@jainankitk
Copy link
Collaborator

jainankitk commented Aug 16, 2024

@jed326 - Probably need to merge the create backport first? - #15227. We can trigger the backport workflow to see if it goes through then!

@jed326
Copy link
Collaborator

jed326 commented Aug 16, 2024

Makes sense, merged that one let me retrigger here

@jed326 jed326 added backport 2.x Backport to 2.x branch and removed backport 2.x Backport to 2.x branch backport-failed labels Aug 16, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 16, 2024
* Add Get QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

* change GetQueryGroupAction NAME and add more tests
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

* incorperate comments from create api PR
Signed-off-by: Ruirui Zhang <[email protected]>

* use clustermanager to get the most recent querygroups
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

* fix IT
Signed-off-by: Ruirui Zhang <[email protected]>
(cherry picked from commit a900a16)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@jainankitk
Copy link
Collaborator

Nice, the trigger-bot succeeded after the create backport merge!

jed326 pushed a commit that referenced this pull request Aug 18, 2024
* Add Get QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

* change GetQueryGroupAction NAME and add more tests
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

* incorperate comments from create api PR
Signed-off-by: Ruirui Zhang <[email protected]>

* use clustermanager to get the most recent querygroups
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

* fix IT
Signed-off-by: Ruirui Zhang <[email protected]>
(cherry picked from commit a900a16)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
wdongyu pushed a commit to wdongyu/OpenSearch that referenced this pull request Aug 22, 2024
* Add Get QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

* change GetQueryGroupAction NAME and add more tests
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

* incorperate comments from create api PR
Signed-off-by: Ruirui Zhang <[email protected]>

* use clustermanager to get the most recent querygroups
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

* fix IT
Signed-off-by: Ruirui Zhang <[email protected]>
akolarkunnu pushed a commit to akolarkunnu/OpenSearch that referenced this pull request Sep 10, 2024
* Add Get QueryGroup API Logic
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

* change GetQueryGroupAction NAME and add more tests
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

* incorperate comments from create api PR
Signed-off-by: Ruirui Zhang <[email protected]>

* use clustermanager to get the most recent querygroups
Signed-off-by: Ruirui Zhang <[email protected]>

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

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

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

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

* fix IT
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
Labels
backport 2.x Backport to 2.x branch v2.17.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants