Add getMetadataFields to MapperService#13819
Merged
reta merged 3 commits intoopensearch-project:mainfrom May 24, 2024
Merged
Conversation
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
reta
reviewed
May 24, 2024
reta
reviewed
May 24, 2024
server/src/main/java/org/opensearch/index/mapper/MapperService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Craig Perkins <cwperx@amazon.com>
reta
approved these changes
May 24, 2024
Contributor
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13819 +/- ##
============================================
+ Coverage 71.42% 71.62% +0.20%
- Complexity 59978 61300 +1322
============================================
Files 4985 5063 +78
Lines 282275 288028 +5753
Branches 40946 41710 +764
============================================
+ Hits 201603 206294 +4691
- Misses 63999 64789 +790
- Partials 16673 16945 +272 ☔ View full report in Codecov by Sentry. |
Contributor
|
❌ Gradle check result for e404fa9: 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? |
Contributor
Contributor
|
The backport to 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-13819-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 8883e62a8f3d862739250cff1eb8d3d18680cfa2
# Push it to GitHub
git push --set-upstream origin backport/backport-13819-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.xThen, create a pull request where the |
Contributor
|
@cwperks mind please backport to |
cwperks
added a commit
to cwperks/OpenSearch
that referenced
this pull request
May 24, 2024
* Add getMetadataFields to MapperService Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add to CHANGELOG Signed-off-by: Craig Perkins <cwperx@amazon.com> * Unmodifiable Set Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com> (cherry picked from commit 8883e62)
reta
pushed a commit
that referenced
this pull request
May 29, 2024
* Add getMetadataFields to MapperService (#13819) * Add getMetadataFields to MapperService Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add to CHANGELOG Signed-off-by: Craig Perkins <cwperx@amazon.com> * Unmodifiable Set Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com> (cherry picked from commit 8883e62) * Pass indexVersionCreated Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com>
parv0201
pushed a commit
to parv0201/OpenSearch
that referenced
this pull request
Jun 10, 2024
* Add getMetadataFields to MapperService Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add to CHANGELOG Signed-off-by: Craig Perkins <cwperx@amazon.com> * Unmodifiable Set Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com>
3 tasks
3 tasks
kkewwei
pushed a commit
to kkewwei/OpenSearch
that referenced
this pull request
Jul 24, 2024
…ject#13819) (opensearch-project#13822) * Add getMetadataFields to MapperService (opensearch-project#13819) * Add getMetadataFields to MapperService Signed-off-by: Craig Perkins <cwperx@amazon.com> * Add to CHANGELOG Signed-off-by: Craig Perkins <cwperx@amazon.com> * Unmodifiable Set Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com> (cherry picked from commit 8883e62) * Pass indexVersionCreated Signed-off-by: Craig Perkins <cwperx@amazon.com> --------- Signed-off-by: Craig Perkins <cwperx@amazon.com> Signed-off-by: kkewwei <kkewwei@163.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a method to the MapperService to get the full list of metadata fields.
This is needed in the security plugin to remove dependence on a static list maintained here: https://github.com/opensearch-project/security/blob/main/src/main/java/org/opensearch/security/configuration/SecurityFlsDlsIndexSearcherWrapper.java#L41-L59
The primary list is maintained in IndicesModules.getBuiltInMetadataFields, but this class is marked as
@internaland not meant to be referenced by plugins.Related Issues
Related to opensearch-project/security#4349
Check List
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.