-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Refactor] From XContentType.JSON to MediaTypeRegistry.JSON #9156
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:
|
Compatibility status:
|
Gradle Check (Jenkins) Run Completed with:
|
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 <[email protected]>
Signed-off-by: Nicholas Walter Knize <[email protected]>
Signed-off-by: Nicholas Walter Knize <[email protected]>
8262a1d
to
73b1673
Compare
Gradle Check (Jenkins) Run Completed with:
|
Compatibility status:
|
Gradle Check (Jenkins) Run Completed with:
|
Test failures look legit |
Signed-off-by: Nicholas Walter Knize <[email protected]>
They were.. it was a bonehead typo on my part. :/ |
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #9156 +/- ##
============================================
- Coverage 71.05% 71.05% -0.01%
+ Complexity 57367 57363 -4
============================================
Files 4768 4769 +1
Lines 270540 270546 +6
Branches 39559 39559
============================================
+ Hits 192228 192232 +4
- Misses 62164 62194 +30
+ Partials 16148 16120 -28
|
…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 <[email protected]>
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-9156-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 7278f434cd83f095623e34c2105f1b79d247af18
# Push it to GitHub
git push --set-upstream origin backport/backport-9156-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x Then, create a pull request where the |
Compatibility status:
|
…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 <[email protected]> (cherry picked from commit 7278f43)
….JSON (#9156) (#9210) 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 <[email protected]> (cherry picked from commit 7278f43) --------- Signed-off-by: Nicholas Walter Knize <[email protected]>
Reacts to changes in ActionListener and ActionResponse introduced in opensearch-project/OpenSearch#9082 Also includes a fix for a call to XContentHelper.toXContent in response to opensearch-project/OpenSearch#9156 Signed-off-by: Craig Perkins <[email protected]>
…nsearch-project#3153) Reacts to changes in ActionListener and ActionResponse introduced in opensearch-project/OpenSearch#9082 Also includes a fix for a call to XContentHelper.toXContent in response to opensearch-project/OpenSearch#9156 Signed-off-by: Craig Perkins <[email protected]> (cherry picked from commit 31ec322)
### Description Manual backport for #3153 of React to changes in ActionListener in core Also includes a fix for a call to XContentHelper.toXContent in response to opensearch-project/OpenSearch#9156 ### Issues Resolved * Relate opensearch-project/OpenSearch#9352 * Relate #3153 ### Check List - [ ] ~New functionality includes testing~ - [ ] ~New functionality has been documented~ - [X] 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin). --------- Signed-off-by: Ryan Liang <[email protected]> Signed-off-by: Peter Nied <[email protected]> Co-authored-by: Peter Nied <[email protected]>
…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 <[email protected]> Signed-off-by: Kaushal Kumar <[email protected]>
…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 <[email protected]> Signed-off-by: Ivan Brusic <[email protected]>
…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 <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
This PR rote refactors nearly all instances and usages of the
XContentType.JSON
singleton instance defined in the:libs:opensearch-x-content
library to theMediaTypeRegistry.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.relates #5910
relates #8110