opensearch-project / ml-commons

ml-commons provides a set of common machine learning algorithms, e.g. k-means, or linear regression, to help developers build ML related features within OpenSearch.
Apache License 2.0
96 stars 135 forks source link

[BUG] BWC tests are failing on Neural search with Null pointer exception #2333

Closed vibrantvarun closed 6 months ago

vibrantvarun commented 6 months ago

What is the bug? When we trigger bwc tests in neural search and it hits delete model api we get Null pointer exeception. Error mentioned below. I remember @b4sjoo solving similar kind of issue before.

{"error":{"root_cause":[{"type":"null_pointer_exception","reason":"Cannot invoke \"java.lang.Boolean.booleanValue()\" because \"isHidden\" is null"}],"type":"null_pointer_exception","reason":"Cannot invoke \"java.lang.Boolean.booleanValue()\" because \"isHidden\" is null"},"status":500}
  2> REPRODUCE WITH: ./gradlew ':qa:restart-upgrade:testAgainstNewCluster' --tests "org.opensearch.neuralsearch.bwc.SemanticSearchIT.testTextEmbeddingProcessor_E2EFlow" -Dtests.seed=BADE2F36C7C38083 -Dtests.security.manager=false -Dtests.bwc.version=2.9.0 -Dtests.locale=lv-LV -Dtests.timezone=SystemV/EST5 -Druntime.java=17
        at __randomizedtesting.SeedInfo.seed([BADE2F36C7C38083:AA4279788AB1D0DA]:0)
        at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:385)
  2> org.opensearch.client.ResponseException: method [DELETE], host [http://127.0.0.1:34975/], URI [/_plugins/_ml/models/8t7r7Y4B2PsU6Qbkggxz], status line [HTTP/1.1 500 Internal Server Error]
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:355)
    {"error":{"root_cause":[{"type":"null_pointer_exception","reason":"Cannot invoke \"java.lang.Boolean.booleanValue()\" because \"isHidden\" is null"}],"type":"null_pointer_exception","reason":"Cannot invoke \"java.lang.Boolean.booleanValue()\" because \"isHidden\" is null"},"status":500}
        at __randomizedtesting.SeedInfo.seed([BADE2F36C7C38083:AA4279788AB1D0DA]:0)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:330)
        at app//org.opensearch.neuralsearch.BaseNeuralSearchIT.makeRequest(BaseNeuralSearchIT.java:905)
        at app//org.opensearch.neuralsearch.BaseNeuralSearchIT.makeRequest(BaseNeuralSearchIT.java:878)
        at app//org.opensearch.neuralsearch.BaseNeuralSearchIT.deleteModel(BaseNeuralSearchIT.java:937)
        at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:385)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:355)
        at app//org.opensearch.neuralsearch.BaseNeuralSearchIT.wipeOfTestResources(BaseNeuralSearchIT.java:1231)
        at app//org.opensearch.client.RestClient.performRequest(RestClient.java:330)

Pipeline link of failure https://github.com/opensearch-project/neural-search/actions/runs/8728772234/job/23949314017?pr=694

How can one reproduce the bug? Steps to reproduce the behavior:

  1. Go to neural search, check out on main
  2. Run ./gradlew bwcTestSuite -Dbwc.version=2.9.0

What is the expected behavior? Tests should pass.

What is your host/environment? Linux, macos

Do you have any additional context? Add any other context about the problem.

vibrantvarun commented 6 months ago

The issue is not resolved as of now.

dhrubo-os commented 6 months ago

Checked with @vibrantvarun, the issue is solved. Closing the issue.