Skip to content

Conversation

@ruai0511
Copy link
Contributor

Description

This PR enhances the _rules/workload_group GET API to support filtering by nested attributes in addition to top-level fields. Previously, users could filter only by top-level attributes, such as index_pattern. With this update, the API now supports filtering on nested attributes like principal.username and principal.role.

Examples

Previously it supports:

GET _rules/workload_group?index_pattern=my-index

Returns all rules with index_pattern matching the prefix my-index.

Now it also supports nested attribute filter:

GET _rules/workload_group?principal.username=admin&principal.role=a

Returns all rules where principal.username equals admin and principal.role equals a.

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.

@ruai0511 ruai0511 requested a review from a team as a code owner September 26, 2025 00:18
@ruai0511 ruai0511 force-pushed the getapi branch 2 times, most recently from 7b66b1d to 7a51365 Compare September 26, 2025 00:30
@github-actions
Copy link
Contributor

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

@codecov
Copy link

codecov bot commented Sep 26, 2025

Codecov Report

❌ Patch coverage is 86.11111% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.95%. Comparing base (2817029) to head (b076cea).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...ule/service/IndexStoredRulePersistenceService.java 33.33% 3 Missing and 1 partial ⚠️
...search/rule/storage/IndexBasedRuleQueryMapper.java 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #19429      +/-   ##
============================================
- Coverage     73.00%   72.95%   -0.05%     
+ Complexity    70373    70337      -36     
============================================
  Files          5708     5708              
  Lines        322433   322460      +27     
  Branches      46695    46702       +7     
============================================
- Hits         235385   235258     -127     
- Misses        68066    68216     +150     
- Partials      18982    18986       +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Contributor

❌ Gradle check result for e99f7bd: 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: Ruirui Zhang <mariazrr@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2025

❌ Gradle check result for 8e8d45b: 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: Ruirui Zhang <mariazrr@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2025

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

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.

3 participants