Skip to content

Fix guava and errorprone dependencies#2883

Closed
karenyrx wants to merge 8 commits intoopensearch-project:mainfrom
karenyrx:guavatest
Closed

Fix guava and errorprone dependencies#2883
karenyrx wants to merge 8 commits intoopensearch-project:mainfrom
karenyrx:guavatest

Conversation

@karenyrx
Copy link
Copy Markdown
Contributor

@karenyrx karenyrx commented Sep 18, 2025

Description

To address this CI failure (Execution failed for task ':compileTestFixturesJava'.)

References:
PR 2817
PR 2833

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • 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.

@karenyrx karenyrx changed the title Remove guava test dependencies Restore guava and failure access dependencies Sep 18, 2025
Signed-off-by: karenx <karenx@uber.com>
Signed-off-by: karenx <karenx@uber.com>
@karenyrx karenyrx closed this Sep 18, 2025
@karenyrx karenyrx reopened this Sep 18, 2025
@karenyrx
Copy link
Copy Markdown
Contributor Author

starting a local opensearch cluster using ./gradlew run shows KNN queries are able to go through:

~/k-NN on [guavatest] % curl -X GET "localhost:9200/knn-test-index/_search" -H 'Content-Type: application/json' -d'
{
  "size": 3,
  "query": {
    "knn": {
      "my_vector": {
        "vector": [1.0, 2.0, 3.0, 4.0],
        "k": 3
      }
    }
  },
  "_source": ["description"]
}' | jq 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   580  100   413  100   167   8156   3298 --:--:-- --:--:-- --:--:-- 11600
{
  "error": {
    "root_cause": [
      {
        "type": "index_not_found_exception",
        "reason": "no such index [knn-test-index]",
        "index": "knn-test-index",
        "resource.id": "knn-test-index",
        "resource.type": "index_or_alias",
        "index_uuid": "_na_"
      }
    ],
    "type": "index_not_found_exception",
    "reason": "no such index [knn-test-index]",
    "index": "knn-test-index",
    "resource.id": "knn-test-index",
    "resource.type": "index_or_alias",
    "index_uuid": "_na_"
  },
  "status": 404
}

continuing to debug if the failing CI is related


2025-09-18T03:33:26.9605612Z > Task :integTestRemoteIndexBuild
2025-09-18T03:33:33.4604210Z 
2025-09-18T03:33:33.4604236Z 
2025-09-18T03:33:33.4758555Z REPRODUCE WITH: ./gradlew ':integTestRemoteIndexBuild' --tests 'org.opensearch.knn.index.ADCIT.testADCWithInnerProduct' -Dtests.seed=86AAC3D30C1B482 -Dtests.security.manager=false -Dtests.locale=vai-LR -Dtests.timezone=Canada/Newfoundland -Druntime.java=21
2025-09-18T03:33:33.4760220Z ADCIT > testADCWithInnerProduct FAILED
2025-09-18T03:33:33.4761625Z 
2025-09-18T03:33:33.4762103Z     java.net.ConnectException: Connect to http://127.0.0.1:34625 [/127.0.0.1] failed: Connection refused
2025-09-18T03:33:33.4765136Z REPRODUCE WITH: ./gradlew ':integTestRemoteIndexBuild' --tests 'org.opensearch.knn.index.ADCIT.testADCWithCosineSim' -Dtests.seed=86AAC3D30C1B482 -Dtests.security.manager=false -Dtests.locale=vai-LR -Dtests.timezone=Canada/Newfoundland -Druntime.java=21
2025-09-18T03:33:33.4767237Z         at org.opensearch.client.RestClient.extractAndWrapCause(RestClient.java:1343)
2025-09-18T03:33:33.4768724Z 
2025-09-18T03:33:33.4769074Z         at org.opensearch.client.RestClient.performRequest(RestClient.java:371)
2025-09-18T03:33:33.4772273Z REPRODUCE WITH: ./gradlew ':integTestRemoteIndexBuild' --tests 'org.opensearch.knn.index.ADCIT.testADCWithL2' -Dtests.seed=86AAC3D30C1B482 -Dtests.security.manager=false -Dtests.locale=vai-LR -Dtests.timezone=Canada/Newfoundland -Druntime.java=21
2025-09-18T03:33:33.4774081Z         at org.opensearch.client.RestClient.performRequest(RestClient.java:374)
2025-09-18T03:33:33.4775578Z         at org.opensearch.client.RestClient.performRequest(RestClient.java:359)
2025-09-18T03:33:33.4776747Z         at org.opensearch.knn.KNNRestTestCase.searchKNNIndex(KNNRestTestCase.java:368)
2025-09-18T03:33:33.4777854Z         at org.opensearch.knn.KNNRestTestCase.searchKNNIndex(KNNRestTestCase.java:353)
2025-09-18T03:33:33.4778833Z         at org.opensearch.knn.index.ADCIT.adcTestSpaceType(ADCIT.java:134)
2025-09-18T03:33:33.4779854Z         at org.opensearch.knn.index.ADCIT.testADCWithInnerProduct(ADCIT.java:75)
2025-09-18T03:33:33.4780372Z 
2025-09-18T03:33:33.4780493Z         Caused by:
2025-09-18T03:33:33.4781364Z         org.apache.hc.client5.http.HttpHostConnectException: Connect to http://127.0.0.1:34625 [/127.0.0.1] failed: Connection refused
2025-09-18T03:33:33.4782365Z             at java.base@21.0.6/sun.nio.ch.Net.pollConnect(Native Method)
2025-09-18T03:33:33.4782986Z             at java.base@21.0.6/sun.nio.ch.Net.pollConnectNow(Net.java:682)
2025-09-18T03:33:33.4783778Z             at java.base@21.0.6/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:973)
2025-09-18T03:33:33.4784840Z             at app//org.apache.hc.core5.reactor.InternalConnectChannel.onIOEvent(InternalConnectChannel.java:70)
2025-09-18T03:33:33.4785922Z             at app//org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
2025-09-18T03:33:33.4787013Z             at app//org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:176)
2025-09-18T03:33:33.4788128Z             at app//org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:125)
2025-09-18T03:33:33.4789312Z             at app//org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:92)
2025-09-18T03:33:33.4790374Z             at app//org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
2025-09-18T03:33:33.4791099Z             at java.base@21.0.6/java.lang.Thread.run(Thread.java:1583)
2025-09-18T03:33:33.4792000Z 
2025-09-18T03:33:33.4792465Z     java.net.ConnectException: Connect to http://[::1]:38263 [/0:0:0:0:0:0:0:1] failed: Connection refused
2025-09-18T03:33:33.4793395Z         at org.opensearch.client.RestClient.extractAndWrapCause(RestClient.java:1343)
2025-09-18T03:33:33.4794262Z         at org.opensearch.client.RestClient.performRequest(RestClient.java:371)
2025-09-18T03:33:33.4795062Z         at org.opensearch.client.RestClient.performRequest(RestClient.java:374)
2025-09-18T03:33:33.4795814Z         at org.opensearch.client.RestClient.performRequest(RestClient.java:359)
2025-09-18T03:33:33.4796707Z         at 

@karenyrx karenyrx changed the title Restore guava and failure access dependencies Fix guava and errorprone dependencies Sep 18, 2025
@karenyrx
Copy link
Copy Markdown
Contributor Author

The current failing CI on this PR is due to java.net.ConnectException: Connect to http://127.0.0.1:38437 [/127.0.0.1] failed: Connection refused, which seems like a transient issue / unrelated to this PR. I will retry them again tomorrow.

@bzhangam @navneet1v I believe this fix should resolve the previous CI failure, would you mind helping take a look tomorrow?

Signed-off-by: Karen X <karenxyr@gmail.com>
Signed-off-by: Karen X <karenxyr@gmail.com>

apply from : "$rootDir/qa/build.gradle"

dependencies {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed as it inherits from qa/build.gradle (as it has apply from : "$rootDir/qa/build.gradle" on Line 9)


apply from : "$rootDir/qa/build.gradle"

dependencies {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed as it inherits from qa/build.gradle (as it has apply from : "$rootDir/qa/build.gradle" on Line 9)

@bzhangam
Copy link
Copy Markdown
Contributor

@karenyrx I think in your test your knn query didn't go through. It fail fast due to index not found issue. You probably want to create a knn index and index some docs and then run knn query.

And in this PR's BWS failure I also find

» ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [knnBwcCluster-restart-2] fatal error in thread [opensearch[knnBwcCluster-restart-2][search][T#4]], exiting
»  java.lang.NoClassDefFoundError: com/google/common/util/concurrent/internal/InternalFutureFailureAccess
»  	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
»  	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)

Which seems the real issue causing the failure.

@navneet1v
Copy link
Copy Markdown
Collaborator

@karenyrx the runtime issues are still happning

Caused by: java.lang.ClassNotFoundException: com.google.common.util.concurrent.internal.InternalFutureFailureAccess
2025-09-18T17:40:15.6764320Z »  	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
2025-09-18T17:40:15.6765265Z »  	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
2025-09-18T17:40:15.6766261Z »  	at java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:872)
2025-09-18T17:40:15.6767265Z »  	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
2025-09-18T17:40:15.6767889Z »  	... 82 more

https://productionresultssa14.blob.core.windows.net/actions-results/7669b21d-937e-4736-b0b1-6f2be5c43f49/workflow-job-run-64b3aa33-65ec-5cab-b44a-ce2ad29a51d5/logs/job/job-logs.txt?rsct=text%2Fplain&se=2025-09-18T18%3A05%3A57Z&sig=cFSYZUfrj%2FIGfIHOlqugz5lrGTPrsbXND9uK83lKQRg%3D&ske=2025-09-19T02%3A21%3A44Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-09-18T14%3A21%3A44Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-11-05&sp=r&spr=https&sr=b&st=2025-09-18T17%3A55%3A52Z&sv=2025-11-05

Please fix this ASAP. This is blocking multiple features

Signed-off-by: karenx <karenx@uber.com>
@navneet1v
Copy link
Copy Markdown
Collaborator

@karenyrx still the issue persist, can you please check.

Signed-off-by: karenx <karenx@uber.com>
Signed-off-by: karenx <karenx@uber.com>
@finnegancarroll
Copy link
Copy Markdown

Hi @navneet1v @bzhangam @karenyrx ,
I did not notice there was discussion on these CI failures and started my own attempted fix here:
#2885

I was thinking this is not related to grpc transport which should not include guava at all since the SPI was introduced. There is this PR on core which I think made it into the snapshot at the time when CI began failing:
opensearch-project/OpenSearch@b9c5bc7#diff-1767b7f709666659fcea718930d017913630119903232332e9b9b08627ca7c0fR29

The dependency insights tool seems to me to indicate this is the cause of failures.

@karenyrx
Copy link
Copy Markdown
Contributor Author

Closing this PR, in lieu of:
opensearch-project/OpenSearch#19339
#2878

@karenyrx karenyrx closed this Sep 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants