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

Revert "Remove deprecated constant META_FIELDS_BEFORE_7DOT8 (#13860)" #13916

Merged
merged 2 commits into from
May 31, 2024

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented May 31, 2024

This reverts commit 9832972.

Description

Opening a PR to discuss this reversion. Removing this deprecated constant caused issues in the SQL Plugin which references the constant. See opensearch-project/sql#2701 where they are working to adapt.

During Union operations, the SQL plugin relies on this list to differentiate between a metafield and a docfield. Ideally, the sql plugin can use MapperService.isMetadataField to determine from the official registry of mappers if a field is a metafield, but getting an instance of the mapper service within a plugin is proving to be tricky.

The security plugin uses Guice, to get the IndicesService:

  1. GuiceHolder
  2. getGuiceServiceClasses

Security can then get the indicesService using OpenSearchSecurityPlugin.GuiceHolder.getIndicesService() which then allows it to get a handle on the mapperService.

This PR is to temporarily fix SQL's CI issues from this change until a strategic fix is implemented.

For extra context around the fields in this list: (Copying comment from here)

7DOT8 is referring to ES 7.8.

"_ttl" and "_timestamp" were removed in ES6. See https://www.elastic.co/blog/elasticsearch-5-0-0-alpha4-released

"_type" was renamed to "_nested_path" in OS 2: #3196

"_size" is not a built-in metadata mapper, it comes from the mapper-size plugin which is not installed by default. Using mapperService.isMetadataField("_size") should return true if the mapper-size plugin is installed in the cluster.

The other values in this list still exist and are built-in metadata fields so mapperService.isMetadataField() should return true.

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • API changes companion pull request created.
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • 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.

@cwperks
Copy link
Member Author

cwperks commented May 31, 2024

@ykmr1224 @fddattal I opened a revert PR for discussion. Please chime in with any additional context not already in the PR description.

Copy link
Contributor

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

Copy link
Contributor

✅ Gradle check result for b59af56: SUCCESS

Copy link

codecov bot commented May 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.69%. Comparing base (b15cb0c) to head (b59af56).
Report is 329 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13916      +/-   ##
============================================
+ Coverage     71.42%   71.69%   +0.27%     
- Complexity    59978    61358    +1380     
============================================
  Files          4985     5064      +79     
  Lines        282275   288113    +5838     
  Branches      40946    41719     +773     
============================================
+ Hits         201603   206571    +4968     
- Misses        63999    64474     +475     
- Partials      16673    17068     +395     

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

@reta reta merged commit bb84ca7 into opensearch-project:main May 31, 2024
74 checks passed
parv0201 pushed a commit to parv0201/OpenSearch that referenced this pull request Jun 10, 2024
…ch-project#13860)" (opensearch-project#13916)

* Revert "Remove deprecated constant META_FIELDS_BEFORE_7DOT8 (opensearch-project#13860)"

This reverts commit 9832972.

* Update CHANGELOG-3.0

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
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.

None yet

2 participants