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

Ensure that IndexResolverReplacer resolves to indices for RolloverRequests #5076

Merged
merged 5 commits into from
Feb 4, 2025

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Jan 31, 2025

Description

Discovered this issue while trying to adapt ISM to the replacement for ThreadContext.stashContext. I noticed that the security plugin was failing to resolve indices for RolloverRequests and the reason for that is that RolloverRequest is an IndicesRequest, but it does not also implement the IndicesRequest.Replaceable interface that is already handled in IndexResolverReplacer.

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Bug fix

Testing

Currently working on a test to replicate the problem

Check List

  • New functionality includes testing
  • New functionality has been documented
  • New Roles/Permissions have a corresponding security dashboards plugin PR
  • API changes companion pull request created
  • Commits are signed per the DCO using --signoff

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: Craig Perkins <[email protected]>
@cwperks cwperks changed the title Ensure that IndexResolverReplacer resolves to indices for non-replaceable IndicesRequests Ensure that IndexResolverReplacer resolves to indices for RolloverRequests Jan 31, 2025
Signed-off-by: Craig Perkins <[email protected]>
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.51%. Comparing base (df93ff4) to head (d71b713).
Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5076      +/-   ##
==========================================
+ Coverage   71.48%   71.51%   +0.02%     
==========================================
  Files         336      336              
  Lines       22625    22628       +3     
  Branches     3601     3602       +1     
==========================================
+ Hits        16174    16182       +8     
+ Misses       4651     4644       -7     
- Partials     1800     1802       +2     
Files with missing lines Coverage Δ
...earch/security/resolver/IndexResolverReplacer.java 67.80% <100.00%> (+0.25%) ⬆️

... and 4 files with indirect coverage changes

Signed-off-by: Craig Perkins <[email protected]>
Copy link
Collaborator

@derek-ho derek-ho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cwperks cwperks added the backport 2.x backport to 2.x branch label Feb 4, 2025
@cwperks cwperks merged commit 0326d7a into opensearch-project:main Feb 4, 2025
42 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 4, 2025
…uests (#5076)

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 0326d7a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants