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

Wlm create/update REST API bug fix #16422

Merged
merged 9 commits into from
Oct 23, 2024

Conversation

kaushalmahi12
Copy link
Contributor

@kaushalmahi12 kaushalmahi12 commented Oct 22, 2024

Description

WLM create/update REST APIs were not setup correctly since the APIs need to execute a clusterManager operation hence corresponding classes should extend TransportClusterManagerNodeAction class. This change is to fix it.

previously when these two apis were resulting into an error like following when accessed using either cluster endpoint or non-cluster-manager node

{
  "error" : {
    "root_cause" : [
      {
        "type" : "not_cluster_manager_exception",
        "reason" : "no longer cluster-manager. source: [query-group-persistence-service]"
      }
    ],
    "type" : "not_cluster_manager_exception",
    "reason" : "no longer cluster-manager. source: [query-group-persistence-service]"
  },
  "status" : 500
}

After the fix it goes through and looks like following

{
  "_id": "nvhPln8WReOXuinM1gmMzw",
  "name": "dpp",
  "resiliency_mode": "enforced",
  "resource_limits": {
    "cpu": 0.2,
    "memory": 0.2
  },
  "updated_at": 1729588377424
}

Tested the changes in multi-node cluster setup.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

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.

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
@kaushalmahi12 kaushalmahi12 changed the title Wlm/crud fix Wlm create/update REST API bug fix Oct 22, 2024
@kaushalmahi12 kaushalmahi12 added the backport 2.x Backport to 2.x branch label Oct 22, 2024
Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Copy link
Contributor

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

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Copy link
Contributor

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

CHANGELOG.md Outdated Show resolved Hide resolved
Signed-off-by: Ankit Jain <akjain@amazon.com>
Copy link
Contributor

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

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Copy link
Contributor

✅ Gradle check result for 4b15c58: SUCCESS

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 72.03%. Comparing base (5120efb) to head (4b15c58).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...in/wlm/action/TransportCreateQueryGroupAction.java 0.00% 5 Missing ⚠️
...in/wlm/action/TransportUpdateQueryGroupAction.java 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #16422   +/-   ##
=========================================
  Coverage     72.03%   72.03%           
+ Complexity    64998    64972   -26     
=========================================
  Files          5313     5313           
  Lines        303293   303301    +8     
  Branches      43886    43886           
=========================================
+ Hits         218476   218496   +20     
+ Misses        66863    66825   -38     
- Partials      17954    17980   +26     

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

@jainankitk jainankitk merged commit 760e676 into opensearch-project:main Oct 23, 2024
37 of 38 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-16422-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 760e67641a063adfec05721ef676e47d347b17a5
# Push it to GitHub
git push --set-upstream origin backport/backport-16422-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-16422-to-2.x.

@kaushalmahi12 kaushalmahi12 deleted the wlm/crud-fix branch October 23, 2024 00:49
kaushalmahi12 added a commit to kaushalmahi12/OpenSearch that referenced this pull request Oct 23, 2024
* test changes

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix the create/update queryGroup REST APIs

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* undo gradle change

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* add PR link in CHANGELOG

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* fix javadoc issues

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* remove redundant name param

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

* Update CHANGELOG.md

Signed-off-by: Ankit Jain <akjain@amazon.com>

* fix action name in transport class for update query group

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>

---------

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Ankit Jain <akjain@amazon.com>
Co-authored-by: Ankit Jain <akjain@amazon.com>
jainankitk added a commit that referenced this pull request Oct 23, 2024
* test changes



* fix the create/update queryGroup REST APIs



* undo gradle change



* add PR link in CHANGELOG



* fix javadoc issues



* remove redundant name param



* Update CHANGELOG.md



* fix action name in transport class for update query group



---------

Signed-off-by: Kaushal Kumar <ravi.kaushal97@gmail.com>
Signed-off-by: Ankit Jain <akjain@amazon.com>
Co-authored-by: Ankit Jain <akjain@amazon.com>
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.

2 participants