Skip to content

Conversation

@cwperks
Copy link
Member

@cwperks cwperks commented Feb 9, 2023

Description

XContentFactory.xContent changed from .xContent(XContentType type) to .xContent(MediaType type) so the usage in the security plugin needs updated.

PR in core where it was changed: https://github.com/opensearch-project/OpenSearch/pull/6218/files#diff-43443b6903e7fb18cd02e5ebb48c17f2168b75e9d31cf7e24a7df7d0d763c220L144-L145

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

Maintenance

Check List

  • New functionality includes testing
  • New functionality has been documented
  • 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.

@cwperks cwperks requested a review from a team February 9, 2023 19:55
@DarshitChanpura
Copy link
Member

Looks like CI failures are due to stale OS version in cache

Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

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

Needs change here too:

private static BytesReference readXContent(final String content, final XContentType xContentType) throws IOException {

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

cwperks commented Feb 9, 2023

Thank you @DarshitChanpura, I missed that instance. It is updated now.

DarshitChanpura
DarshitChanpura previously approved these changes Feb 9, 2023
Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

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

LGTM!

RyanL1997
RyanL1997 previously approved these changes Feb 9, 2023
Signed-off-by: Peter Nied <petern@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Feb 14, 2023

Codecov Report

Merging #2433 (05c82eb) into main (d676716) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #2433      +/-   ##
============================================
- Coverage     61.25%   61.18%   -0.08%     
+ Complexity     3327     3322       -5     
============================================
  Files           260      260              
  Lines         18487    18487              
  Branches       3267     3267              
============================================
- Hits          11325    11312      -13     
- Misses         5570     5578       +8     
- Partials       1592     1597       +5     
Impacted Files Coverage Δ
.../org/opensearch/security/support/ConfigHelper.java 86.00% <100.00%> (ø)
...a/org/opensearch/security/tools/SecurityAdmin.java 36.60% <100.00%> (ø)
...ch/security/auditlog/routing/AsyncStoragePool.java 50.00% <0.00%> (-5.56%) ⬇️
...urity/ssl/transport/SecuritySSLNettyTransport.java 62.36% <0.00%> (-4.31%) ⬇️
...earch/security/ssl/util/SSLConnectionTestUtil.java 93.18% <0.00%> (-2.28%) ⬇️
...ecurity/configuration/ConfigurationRepository.java 72.13% <0.00%> (-1.64%) ⬇️
.../dlic/auth/ldap2/LDAPConnectionFactoryFactory.java 57.46% <0.00%> (-1.50%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@peternied peternied merged commit bae002b into opensearch-project:main Feb 14, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 21, 2023
* Switch from XContentType to MediaType

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
Co-authored-by: Peter Nied <petern@amazon.com>
(cherry picked from commit bae002b)
stephen-crawford pushed a commit that referenced this pull request Feb 24, 2023
…f XContentFactory.xContent (#2451)

* Update usage of XContentFactory.xContent (#2433)

* Switch from XContentType to MediaType

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
Co-authored-by: Peter Nied <petern@amazon.com>
(cherry picked from commit bae002b)

* Increment version to 2.7.0.0

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

* Update bwcVersion

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

* Update bwc_version in ci.yml

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

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Co-authored-by: Craig Perkins <cwperx@amazon.com>
Co-authored-by: Ryan Liang <109499885+RyanL1997@users.noreply.github.com>
MaciejMierzwa pushed a commit to MaciejMierzwa/security that referenced this pull request Apr 27, 2023
* Switch from XContentType to MediaType

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
Co-authored-by: Peter Nied <petern@amazon.com>
Signed-off-by: Maciej Mierzwa <dev.maciej.mierzwa@gmail.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.

6 participants