OpenSearch
OpenSearch copied to clipboard
Abstracting outbound side of transport
Description
Coming from https://github.com/opensearch-project/OpenSearch/pull/13178#discussion_r1569221067 and as a next step to #12967, abstracting and adding support for multiple protocols on outbound side of transport.
Related Issues
Resolves #[Issue number to be closed when this PR is merged] Part of #10684
Check List
- [x] New functionality includes testing.
- [x] All tests pass
- [x] New functionality has been documented.
- [x] New functionality has javadoc added
- [x] Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
- [x] Commits are signed per the DCO using --signoff
- [x] Commit changes are listed out in CHANGELOG.md file (See: Changelog)
- [x] Public documentation issue/PR created
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.
:grey_exclamation: Gradle check result for 0a9c4d8e0a89d011546f4ad03d2fe1f80b55a737: UNSTABLE
- TEST FAILURES:
1 org.opensearch.http.SearchRestCancellationIT.testAutomaticCancellationDuringQueryPhase
Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.
Codecov Report
Attention: Patch coverage is 95.31250% with 3 lines in your changes are missing coverage. Please review.
Project coverage is 71.52%. Comparing base (
b15cb0c) to head (cc43b4b). Report is 273 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #13293 +/- ##
============================================
+ Coverage 71.42% 71.52% +0.10%
- Complexity 59978 61039 +1061
============================================
Files 4985 5054 +69
Lines 282275 287150 +4875
Branches 40946 41607 +661
============================================
+ Hits 201603 205373 +3770
- Misses 63999 64813 +814
- Partials 16673 16964 +291
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@reta @dblock Let me know what you guys think.
:x: Gradle check result for 9e629aee2a28e6f8b0a1ab571aa803056c810a11: 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?
:x: Gradle check result for 0ab2aec290cf04af17d38a3afc2b9d501379e74d: 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?
:x: Gradle check result for 3c2e5f7395bb4058d8df68273546e8f3675f89a5: 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?
Thank you for the review @reta! I will work on addressing the comments and I am also looking at some test failures which are likely due to message listeners:
org.opensearch.transport.nio.SimpleMockNioTransportTests.testMessageListeners org.opensearch.transport.nio.SimpleMockNioTransportTests.testTracerLog org.opensearch.transport.netty4.SimpleNetty4TransportTests.testTracerLog org.opensearch.transport.netty4.SimpleNetty4TransportTests.testMessageListeners org.opensearch.transport.netty4.ssl.SimpleSecureNetty4TransportTests.testTracerLog org.opensearch.transport.netty4.ssl.SimpleSecureNetty4TransportTests.testMessageListeners org.opensearch.transport.nio.SimpleNioTransportTests.testTracerLog org.opensearch.transport.nio.SimpleNioTransportTests.testMessageListeners
Thank you for the review @reta! I will work on addressing the comments and I am also looking at some test failures which are likely due to message listeners:
Thanks @VachaShah may be fixed by https://github.com/opensearch-project/OpenSearch/pull/13293#discussion_r1584794718
Thank you for the review @reta! I will work on addressing the comments and I am also looking at some test failures which are likely due to message listeners:
Thanks @VachaShah may be fixed by #13293 (comment)
Thank you @reta! Yup that fixed the message listener related tests. I have 2 more test failures to go for InboundHandlerTests which I am looking at:
2> REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.transport.InboundHandlerTests.testRequestFullyReadButMoreDataIsAvailable" -Dtests.seed=E2FAF4B5C492BE4B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=de -Dtests.timezone=Africa/Luanda -Druntime.java=21
2> java.lang.AssertionError:
Expected: an instance of java.lang.IllegalStateException
but: null
at __randomizedtesting.SeedInfo.seed([E2FAF4B5C492BE4B:2E02C61843C887C0]:0)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
at org.junit.Assert.assertThat(Assert.java:964)
at org.junit.Assert.assertThat(Assert.java:930)
at org.opensearch.transport.InboundHandlerTests.testRequestFullyReadButMoreDataIsAvailable(InboundHandlerTests.java:512)
2> REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.transport.InboundHandlerTests.testRequestNotFullyRead" -Dtests.seed=E2FAF4B5C492BE4B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=de -Dtests.timezone=Africa/Luanda -Druntime.java=21
2> java.lang.AssertionError:
Expected: an instance of java.lang.IllegalStateException
but: null
at __randomizedtesting.SeedInfo.seed([E2FAF4B5C492BE4B:4FCE7D97501DDC2C]:0)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
at org.junit.Assert.assertThat(Assert.java:964)
at org.junit.Assert.assertThat(Assert.java:930)
at org.opensearch.transport.InboundHandlerTests.testRequestNotFullyRead(InboundHandlerTests.java:441)
:x: Gradle check result for 48b17753b7c4e04039cc0bee0b78a6b7d991c642: 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?
:x: Gradle check result for 51a167e8de9ff040e5733e5cc004c6e361a41466: 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?
:x: Gradle check result for 2bf9874781e29043501281252b4761680188b658: 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?
Thank you for the review @reta! I will work on addressing the comments and I am also looking at some test failures which are likely due to message listeners:
Thanks @VachaShah may be fixed by #13293 (comment)
Thank you @reta! Yup that fixed the message listener related tests. I have 2 more test failures to go for InboundHandlerTests which I am looking at:
2> REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.transport.InboundHandlerTests.testRequestFullyReadButMoreDataIsAvailable" -Dtests.seed=E2FAF4B5C492BE4B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=de -Dtests.timezone=Africa/Luanda -Druntime.java=21 2> java.lang.AssertionError: Expected: an instance of java.lang.IllegalStateException but: null at __randomizedtesting.SeedInfo.seed([E2FAF4B5C492BE4B:2E02C61843C887C0]:0) at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18) at org.junit.Assert.assertThat(Assert.java:964) at org.junit.Assert.assertThat(Assert.java:930) at org.opensearch.transport.InboundHandlerTests.testRequestFullyReadButMoreDataIsAvailable(InboundHandlerTests.java:512)2> REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.transport.InboundHandlerTests.testRequestNotFullyRead" -Dtests.seed=E2FAF4B5C492BE4B -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=de -Dtests.timezone=Africa/Luanda -Druntime.java=21 2> java.lang.AssertionError: Expected: an instance of java.lang.IllegalStateException but: null at __randomizedtesting.SeedInfo.seed([E2FAF4B5C492BE4B:4FCE7D97501DDC2C]:0) at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18) at org.junit.Assert.assertThat(Assert.java:964) at org.junit.Assert.assertThat(Assert.java:930) at org.opensearch.transport.InboundHandlerTests.testRequestNotFullyRead(InboundHandlerTests.java:441)
Was able to fix this. Will update the PR with required changes.
@reta This is ready for review with the remaining comment addressed. I have also split/refactored tests and moved classes and tests if protocol dependent.
:white_check_mark: Gradle check result for f8da51c43f61e24614d24074124e84b4be30520f: SUCCESS
:white_check_mark: Gradle check result for 05e3921f6f42db2a80a7f23e26755f1428e8e7e9: SUCCESS
:x: Gradle check result for 2d6cdea7ce9412ff13dfeeb39ffbe43e9cead6b1: 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?
:x: Gradle check result for c6da4980b8e7cd044b1c73946186df4d29de52c4: 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?
:x: Gradle check result for c904eda8213ddf2ed54064ade2ae497b72e233ad: 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?
:x: Gradle check result for 0a7c0a36a0cf93c76490dc4dc3b6797c90bd3f20: 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?
:white_check_mark: Gradle check result for 50482538e76734988b6c9964b77c4f95f0d9420b: SUCCESS
:white_check_mark: Gradle check result for cc43b4b7685d7205ce064859c63f6db1392fe1cc: SUCCESS
Looks great, let's merge it.
The backport to 2.x failed:
The process '/usr/bin/git' failed with exit code 128
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-13293-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 14f1c43c108f378b13d109ade364216c082fb858
# Push it to GitHub
git push --set-upstream origin backport/backport-13293-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 base branch is 2.x and the compare/head branch is backport/backport-13293-to-2.x.
@VachaShah manual backport pls :(
@VachaShah manual backport pls :(
Thank you @dblock! Added the backport in #13656.