Skip to content

[Backport 2.x] [Refactor] From XContentType.JSON to MediaTypeRegistry.JSON (#9156)#9210

Merged
nknize merged 2 commits intoopensearch-project:2.xfrom
nknize:backport/backport-9156-to-2.x
Aug 10, 2023
Merged

[Backport 2.x] [Refactor] From XContentType.JSON to MediaTypeRegistry.JSON (#9156)#9210
nknize merged 2 commits intoopensearch-project:2.xfrom
nknize:backport/backport-9156-to-2.x

Conversation

@nknize
Copy link
Copy Markdown
Contributor

@nknize nknize commented Aug 9, 2023

Backport 7278f43 from #9156.

…ch-project#9156)

This commit rote refactors nearly all instances and usages of the
XContentType.JSON singleton instance defined in the
:libs:opensearch-x-content library to the MediaTypeRegistry.JSON
singleton instance defined in :libs:opensearch-core. This decouples the
server and test implementations from the x-content library such that
foundation classes can be further refactored from the :server module to
the :opensearch-core library without requiring a strict dependency on
the x-content library. This keeps opensearch-core library loosely
coupled with the remaining :libs:opensearch-* libraries such that
serverless and cloud-native implementations can selective import only
the libraries needed for implementation.

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
(cherry picked from commit 7278f43)
@nknize nknize added enhancement Enhancement or improvement to existing feature or request backport PRs or issues specific to backporting features or enhancments skip-changelog v2.10.0 labels Aug 9, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 9, 2023

Gradle Check (Jenkins) Run Completed with:

@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

Compatibility status:

> Task :checkCompatibility
Checking compatibility for: https://github.com/opensearch-project/opensearch-oci-object-storage.git with ref: 2.x
Skipping compatibility check for https://github.com/opensearch-project/opensearch-oci-object-storage.git
Incompatible components: [https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/performance-analyzer.git]
Components skipped due to git failures: [https://github.com/opensearch-project/opensearch-oci-object-storage.git]
Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/ml-commons.git]

BUILD SUCCESSFUL in 24m 7s

Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

Compatibility status:

> Task :checkCompatibility
Checking compatibility for: https://github.com/opensearch-project/opensearch-oci-object-storage.git with ref: 2.x
Skipping compatibility check for https://github.com/opensearch-project/opensearch-oci-object-storage.git
Incompatible components: [https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/performance-analyzer.git]
Components skipped due to git failures: [https://github.com/opensearch-project/opensearch-oci-object-storage.git]
Compatible components: [https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/ml-commons.git]

BUILD SUCCESSFUL in 25m 19s

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 9, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.repositories.azure.AzureBlobContainerRetriesTests.testWriteLargeBlob
      1 org.opensearch.remotestore.RemoteIndexPrimaryRelocationIT.testPrimaryRelocationWhileIndexing

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 9, 2023

Codecov Report

Merging #9210 (4171598) into 2.x (ed3cfce) will decrease coverage by 0.12%.
The diff coverage is 45.52%.

@@             Coverage Diff              @@
##                2.x    #9210      +/-   ##
============================================
- Coverage     70.85%   70.74%   -0.12%     
+ Complexity    57522    57458      -64     
============================================
  Files          4756     4757       +1     
  Lines        271788   271794       +6     
  Branches      40086    40086              
============================================
- Hits         192588   192284     -304     
- Misses        62703    63015     +312     
+ Partials      16497    16495       -2     
Files Changed Coverage Δ
...opensearch/client/slm/SnapshotLifecyclePolicy.java 0.00% <0.00%> (ø)
...ch/client/slm/SnapshotLifecyclePolicyMetadata.java 0.00% <0.00%> (ø)
.../opensearch/client/slm/SnapshotLifecycleStats.java 0.00% <0.00%> (ø)
...rch/client/slm/SnapshotRetentionConfiguration.java 0.00% <0.00%> (ø)
...a/org/opensearch/core/xcontent/XContentParser.java 100.00% <ø> (ø)
...h/script/mustache/MultiSearchTemplateResponse.java 56.25% <0.00%> (ø)
...script/mustache/TransportSearchTemplateAction.java 0.00% <0.00%> (ø)
...rg/opensearch/index/rankeval/RankEvalResponse.java 88.57% <0.00%> (-2.86%) ⬇️
...va/org/opensearch/index/rankeval/RankEvalSpec.java 96.49% <0.00%> (+2.63%) ⬆️
...a/org/opensearch/index/rankeval/RatedDocument.java 81.03% <0.00%> (ø)
... and 154 more

... and 425 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport PRs or issues specific to backporting features or enhancments enhancement Enhancement or improvement to existing feature or request skip-changelog v2.10.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants