-
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
Add opensearch version info while deserialization #16494
Add opensearch version info while deserialization #16494
Conversation
❌ Gradle check result for f98da36: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16494 +/- ##
============================================
+ Coverage 72.30% 72.32% +0.01%
+ Complexity 65482 65463 -19
============================================
Files 5309 5309
Lines 304324 304350 +26
Branches 44132 44141 +9
============================================
+ Hits 220056 220113 +57
+ Misses 66259 66136 -123
- Partials 18009 18101 +92 ☔ View full report in Codecov by Sentry. |
7a49332
to
e448dd3
Compare
❌ Gradle check result for e448dd3: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
e448dd3
to
64c813f
Compare
It would be broken for 2.16 and 2.17 as well. |
I have used |
server/src/test/java/org/opensearch/gateway/remote/RemoteGlobalMetadataManagerTests.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/opensearch/gateway/remote/RemoteGlobalMetadataManagerTests.java
Show resolved
Hide resolved
@soosinha lets add mixed version mode test if it doesn't exist. |
Created an issue to track mixed version tests: #16497 |
This PR is stalled because it has been open for 30 days with no activity. |
This PR is stalled because it has been open for 30 days with no activity. |
Signed-off-by: Sooraj Sinha <[email protected]>
4bd03a7
to
a1c7f26
Compare
❕ Gradle check result for a1c7f26: UNSTABLE
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Signed-off-by: Sooraj Sinha <[email protected]>
a1c7f26
to
619b4e6
Compare
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-16494-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 3032bef54d502836789ea438f464ae0b1ba978b2
# Push it to GitHub
git push --set-upstream origin backport/backport-16494-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x Then, create a pull request where the |
…#16494) Signed-off-by: Sooraj Sinha <[email protected]>
Signed-off-by: Sooraj Sinha <[email protected]>
Description
Custom Metadata is serialized
writeTo
and deserialized using thereadFrom
method or a constructor with stream input.For example -
ComposableIndexTemplate
is serialized using ComposableIndexTemplate.writeTo and deserialized using the stream input constructor.Consider a case where a new attribute is added in a version. For example
context
is added in ComposableIndexTemplate from 2.16 onwards. When it serialized from cluster manager of 2.15 version, the context field will not be present. But when the 2.16 cluster manager deserializes the object, it expectscontext
field to be present and breaks.The fix is to set the opensearch version in the stream input so that the deserialization will not look for new fields.
Related Issues
NA
Check List
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.