Skip to content

Conversation

@Lindsay-00
Copy link
Contributor

@Lindsay-00 Lindsay-00 commented Mar 19, 2025

Description

This change addresses a scalability issue in the existing /_wlm/stats API by introducing a new paginated endpoint: /_list/wlm_stats. The original API returns statistics for all nodes and query groups in a single response, which becomes inefficient and resource-intensive as cluster size grows.

This enhancement is part of the ongoing effort to improve observability and scalability in OpenSearch Workload Management, as described in GitHub Issue #17592.

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.

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

❌ Gradle check result for 0dd053d: 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
Copy link
Contributor

Can we provide a better name for this PR and add some description? A single word title is not descriptive

@jainankitk
Copy link
Contributor

@Lindsay-00 - I can see related test failures:

[Test Result](https://build.ci.opensearch.org/job/gradle-check/58688/testReport/) (14 failures / +12)

    [org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=wlm_stats/10_basic/Custom size param still returns headers}](https://build.ci.opensearch.org/job/gradle-check/58688/testReport/junit/org.opensearch.backwards/MixedClusterClientYamlTestSuiteIT/test__p0_wlm_stats_10_basic_Custom_size_param_still_returns_headers_/)
    [org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=wlm_stats/10_basic/Sort by node_id asc does not error}](https://build.ci.opensearch.org/job/gradle-check/58688/testReport/junit/org.opensearch.backwards/MixedClusterClientYamlTestSuiteIT/test__p0_wlm_stats_10_basic_Sort_by_node_id_asc_does_not_error_/)
    [org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=wlm_stats/10_basic/Invalid sort field returns error}](https://build.ci.opensearch.org/job/gradle-check/58688/testReport/junit/org.opensearch.backwards/MixedClusterClientYamlTestSuiteIT/test__p0_wlm_stats_10_basic_Invalid_sort_field_returns_error_/)
    [org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=wlm_stats/10_basic/Sort by workload_group_id desc does not error}](https://build.ci.opensearch.org/job/gradle-check/58688/testReport/junit/org.opensearch.backwards/MixedClusterClientYamlTestSuiteIT/test__p0_wlm_stats_10_basic_Sort_by_workload_group_id_desc_does_not_error_/)
    [org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=wlm_stats/10_basic/Invalid sort order returns error}](https://build.ci.opensearch.org/job/gradle-check/58688/testReport/junit/org.opensearch.backwards/MixedClusterClientYamlTestSuiteIT/test__p0_wlm_stats_10_basic_Invalid_sort_order_returns_error_/)
    [org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=wlm_stats/10_basic/Sort by node_id asc does not error}](https://build.ci.opensearch.org/job/gradle-check/58688/testReport/junit/org.opensearch.backwards/MixedClusterClientYamlTestSuiteIT/test__p0_wlm_stats_10_basic_Sort_by_node_id_asc_does_not_error__2/)
    [org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=wlm_stats/10_basic/Invalid sort field returns error}](https://build.ci.opensearch.org/job/gradle-check/58688/testReport/junit/org.opensearch.backwards/MixedClusterClientYamlTestSuiteIT/test__p0_wlm_stats_10_basic_Invalid_sort_field_returns_error__2/)
    [org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=wlm_stats/10_basic/Sort by workload_group_id desc does not error}](https://build.ci.opensearch.org/job/gradle-check/58688/testReport/junit/org.opensearch.backwards/MixedClusterClientYamlTestSuiteIT/test__p0_wlm_stats_10_basic_Sort_by_workload_group_id_desc_does_not_error__2/)
    [org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=wlm_stats/10_basic/Invalid sort order returns error}](https://build.ci.opensearch.org/job/gradle-check/58688/testReport/junit/org.opensearch.backwards/MixedClusterClientYamlTestSuiteIT/test__p0_wlm_stats_10_basic_Invalid_sort_order_returns_error__2/)
    [org.opensearch.backwards.MixedClusterClientYamlTestSuiteIT.test {p0=wlm_stats/10_basic/Invalid sort field returns error}](https://build.ci.opensearch.org/job/gradle-check/58688/testReport/junit/org.opensearch.backwards/MixedClusterClientYamlTestSuiteIT/test__p0_wlm_stats_10_basic_Invalid_sort_field_returns_error__3/)

Signed-off-by: Lingxi Chen <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2025

✅ Gradle check result for 97d6868: SUCCESS

@jainankitk
Copy link
Contributor

@Lindsay-00 - The code coverage for this change is bit low - https://app.codecov.io/gh/opensearch-project/OpenSearch/pull/17638?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=checks&utm_campaign=pr+comments&utm_term=opensearch-project. I am wondering if there is opportunity to improve that by adding few more tests?

Lingxi Chen added 2 commits June 3, 2025 16:03
Signed-off-by: Lingxi Chen <[email protected]>
Signed-off-by: Lingxi Chen <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2025

❌ Gradle check result for e48e03a: 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: Lingxi Chen <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2025

❌ Gradle check result for bbad32e: 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: Lingxi Chen <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2025

✅ Gradle check result for 0330990: SUCCESS

@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2025

❌ Gradle check result for c808b69: 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: Lingxi Chen <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2025

✅ Gradle check result for d2e01fb: SUCCESS

Signed-off-by: Lingxi Chen <[email protected]>
@github-actions
Copy link
Contributor

github-actions bot commented Jun 4, 2025

❕ Gradle check result for 4dbd9e4: 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.

@jainankitk jainankitk merged commit d2b3ba0 into opensearch-project:main Jun 4, 2025
30 checks passed
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 pushed a commit to neuenfeldttj/OpenSearch that referenced this pull request Jun 26, 2025
---------

Signed-off-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
tandonks pushed a commit to tandonks/OpenSearch that referenced this pull request Aug 5, 2025
@Lindsay-00 Lindsay-00 deleted the pagination branch September 11, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants