-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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] StreamIO and OpenSearchException foundation to core library #8035
[Refactor] StreamIO and OpenSearchException foundation to core library #8035
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
One more commit coming. After quick review of this PR I've decided to eliminate the intermediate |
Codecov Report
@@ Coverage Diff @@
## main #8035 +/- ##
============================================
- Coverage 70.92% 70.80% -0.13%
+ Complexity 56664 56575 -89
============================================
Files 4722 4719 -3
Lines 267604 267551 -53
Branches 39214 39204 -10
============================================
- Hits 189803 189439 -364
- Misses 61826 62128 +302
- Partials 15975 15984 +9
|
With the changes to hlrs, how badly is it going to mess up opensearch-java? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a few passes through, lgtm. Given size here should prob get a second set of eyes.
@andrross do you want to give it a quick pass? |
libs/core/src/main/java/org/opensearch/core/common/io/StreamsUtil.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
libs/core/src/main/java/org/opensearch/action/support/DefaultShardOperationFailedException.java
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing a first pass.
Thanks for the changes, this decouples server from steamIO which @VachaShah has been trying to untangle for #6844
Thanks @saratvemulapalli ... 💯 This makes it a lot easier for ProtoBuf to move to :libs:opensearch-xcontent alongside cbor, smile, yaml, etc and not be forced to land in :server. A great example of decoupling! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nknize!!
I am worried all downstream dependencies would break and we should provide enough time for them to consume these changes. Quick search shows 2.2k files[1]
For this PR, as long as the downstream is taking a |
@nknize There are failures in mocking Writable objects with NoClassFound Exception as mentioned in above two pull requests. Couldn't figure out the root cause. Any help would be appreciated. Error details
|
@vamsi-amazon looks like these were resolved due to artifact update lag? LMK |
@nknize seems like the issue got fixed itself after artifact update. |
opensearch-project#8035) This commit refactors the Stream IO classes from the server to core library to support cloud native and serverless extensions. The following classes are refactored: * StreamInput * StreamOutput * Writeable * NamedWriteable * NamedWriteableRegistry * Index * ShardId * BytesReference * ByteArray * BigArray * SecureString * Text * ParsingException * RestStatus The namespace is left unchanged but will be refactored in a follow up commit to avoid split package in order to support jigsaw modularity. Signed-off-by: Nicholas Walter Knize <nknize@apache.org> Signed-off-by: Rishab Nahata <rnnahata@amazon.com>
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-8035-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5a968a8ec59926ce4b696c13473f88e4559f79c9
# Push it to GitHub
git push --set-upstream origin backport/backport-8035-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 |
opensearch-project#8035) This commit refactors the Stream IO classes from the server to core library to support cloud native and serverless extensions. The following classes are refactored: * StreamInput * StreamOutput * Writeable * NamedWriteable * NamedWriteableRegistry * Index * ShardId * BytesReference * ByteArray * BigArray * SecureString * Text * ParsingException * RestStatus The namespace is left unchanged but will be refactored in a follow up commit to avoid split package in order to support jigsaw modularity. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
#8035) (#8540) This commit refactors the Stream IO classes from the server to core library to support cloud native and serverless extensions. The following classes are refactored: * StreamInput * StreamOutput * Writeable * NamedWriteable * NamedWriteableRegistry * Index * ShardId * BytesReference * ByteArray * BigArray * SecureString * Text * ParsingException * RestStatus The namespace is left unchanged but will be refactored in a follow up commit to avoid split package in order to support jigsaw modularity. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
opensearch-project#8035) This commit refactors the Stream IO classes from the server to core library to support cloud native and serverless extensions. The following classes are refactored: * StreamInput * StreamOutput * Writeable * NamedWriteable * NamedWriteableRegistry * Index * ShardId * BytesReference * ByteArray * BigArray * SecureString * Text * ParsingException * RestStatus The namespace is left unchanged but will be refactored in a follow up commit to avoid split package in order to support jigsaw modularity. Signed-off-by: Nicholas Walter Knize <nknize@apache.org> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
This PR refactors the Stream IO classes from the
:server
module to:opensearch-core
library to support cloud native and serverless extensions.The following classes are refactored:
This is a predecessor PR to #7783 such that the namespace is left unchanged. The follow up #7783 PR refactors from the
org.opensearch
toorg.opensearch.core
namespace to avoid split package in support of jigsaw modularity. This is done to minimize the change surface area as much as possible.relates #5910
relates #8110
dependency of #7783