Skip to content

Conversation

@nibix
Copy link
Collaborator

@nibix nibix commented May 15, 2025

Description

As determined in #5200, OpenSearch 3 no longer needs to have the custom User serialization code which was introduced in #2802. That's because the last version of OpenSearch that used custom serialization was 2.13. OpenSearch 3 no longer supports mixed clusters with OpenSearch 2.13 - the minimum mixed cluster version is OpenSearch 2.19. Thus, the code in question is no longer necessary.

This PR removes the unneccesary code.

This is part of the preparation for the immutable user object PR #5212 which aims to remove a couple of special subclasses of the User object and thus breaks tests in the custom serialization code.

  • Category
    • Maintenance
  • Why these changes are required?
    • Code hygiene, maintenance facilitation
  • What is the old behavior before changes and new behavior after changes?
    • No behavioral changes

Issues Resolved

Fixes #5200

Testing

  • Int tests

Check List

  • 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.

nibix added 2 commits May 14, 2025 13:13
Signed-off-by: Nils Bandener <nils.bandener@eliatra.com>
Signed-off-by: Nils Bandener <nils.bandener@eliatra.com>
Signed-off-by: Nils Bandener <nils.bandener@eliatra.com>
@codecov
Copy link

codecov bot commented May 15, 2025

Codecov Report

Attention: Patch coverage is 92.30769% with 3 lines in your changes missing coverage. Please review.

Project coverage is 71.84%. Comparing base (7421138) to head (7723f55).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
.../org/opensearch/security/support/Base64Helper.java 93.33% 0 Missing and 2 partials ⚠️
...earch/security/auditlog/impl/AbstractAuditLog.java 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5339      +/-   ##
==========================================
- Coverage   72.03%   71.84%   -0.19%     
==========================================
  Files         384      380       -4     
  Lines       23927    23677     -250     
  Branches     3656     3636      -20     
==========================================
- Hits        17235    17011     -224     
+ Misses       4856     4846      -10     
+ Partials     1836     1820      -16     
Files with missing lines Coverage Δ
.../main/java/com/amazon/dlic/auth/ldap/LdapUser.java 85.71% <ø> (-3.58%) ⬇️
...ava/org/opensearch/security/auth/UserInjector.java 88.88% <ø> (-0.65%) ⬇️
...org/opensearch/security/filter/SecurityFilter.java 66.02% <ø> (-0.80%) ⬇️
...urity/ssl/transport/SecuritySSLRequestHandler.java 62.50% <ø> (-9.46%) ⬇️
...g/opensearch/security/support/ConfigConstants.java 95.23% <ø> (ø)
.../org/opensearch/security/support/HeaderHelper.java 68.42% <100.00%> (-1.58%) ⬇️
...ensearch/security/support/SourceFieldsContext.java 46.87% <ø> (-10.91%) ⬇️
...search/security/transport/SecurityInterceptor.java 75.94% <100.00%> (-1.71%) ⬇️
...rch/security/transport/SecurityRequestHandler.java 54.72% <100.00%> (-0.31%) ⬇️
...c/main/java/org/opensearch/security/user/User.java 67.14% <ø> (-2.27%) ⬇️
... and 2 more

... and 7 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.

@cwperks
Copy link
Member

cwperks commented May 15, 2025

Thank you @nibix , overall the PR lgtm and is a nice simplification in the code.

Signed-off-by: Nils Bandener <nils.bandener@eliatra.com>
@DarshitChanpura DarshitChanpura merged commit bce9fad into opensearch-project:main May 15, 2025
46 of 47 checks passed
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.

[RFC] When to retire the serialization backward compat code for OpenSearch 2.11/2.12/2.13

3 participants