Skip to content

Pass resourceType instead of resourceIndex to resourceSharingClient#1591

Merged
cwperks merged 2 commits intoopensearch-project:mainfrom
cwperks:resource-type
Nov 4, 2025
Merged

Pass resourceType instead of resourceIndex to resourceSharingClient#1591
cwperks merged 2 commits intoopensearch-project:mainfrom
cwperks:resource-type

Conversation

@cwperks
Copy link
Copy Markdown
Member

@cwperks cwperks commented Oct 21, 2025

Description

This PR is related to the changes in opensearch-project/security#5713 to support multiple resource types in the same index. There's a small change in all ResourceSharingClient methods to accept type in the place of index.

resource type <-> resource index is a many-to-one relationship (think dashboards saved objects where multiple saved object types are in the same index).

On another note, ResourceSharingClient is used in instances where a mechanism doesn't currently exist as in parent<->child relationships (like a detector and results where all results are associated with a detector). Security is working on a mechanism to support this natively to obviate the need for ResourceSharingClient and instead abstract all the logic behind-the-scenes to the security plugin.

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • 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.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 21, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.35%. Comparing base (e52f88b) to head (ca326a9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...transport/DeleteAnomalyResultsTransportAction.java 33.33% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1591      +/-   ##
============================================
- Coverage     81.42%   81.35%   -0.08%     
+ Complexity     6129     6123       -6     
============================================
  Files           542      542              
  Lines         24913    24913              
  Branches       2541     2541              
============================================
- Hits          20286    20268      -18     
- Misses         3362     3376      +14     
- Partials       1265     1269       +4     
Flag Coverage Δ
plugin 81.35% <33.33%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...transport/DeleteAnomalyResultsTransportAction.java 15.68% <33.33%> (ø)

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks
Copy link
Copy Markdown
Member Author

cwperks commented Nov 4, 2025

Overriding and merging bc its got necessary approvals and the branch is only one behind the tip of main. This PR blocks other PRs on the repo as it contains a compilation fix after opensearch-project/security#5755 was merged.

@cwperks cwperks merged commit 6e67e44 into opensearch-project:main Nov 4, 2025
28 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants