opensearch-project / opensearch-py

Python Client for OpenSearch
https://opensearch.org/docs/latest/clients/python/
Apache License 2.0
338 stars 170 forks source link

[BUG] Integration test failures against 2.11 #582

Closed dblock closed 10 months ago

dblock commented 10 months ago

What is the bug?

FAILED test_opensearchpy/test_server/test_rest_api_spec.py::test_rest_api_spec[OpenSearch-main/rest-api-spec/src/main/resources/rest-api-spec/test/search/260_sort_mixed[2]]
FAILED test_opensearchpy/test_server/test_rest_api_spec.py::test_rest_api_spec[OpenSearch-main/rest-api-spec/src/main/resources/rest-api-spec/test/search/90_search_after[4]]
E       opensearchpy.exceptions.RequestError: RequestError(400, 'search_phase_execution_exception', 'Field population is indexed with 2 bytes per dimension, but org.opensearch.index.fielddata.fieldcomparator.FloatValuesComparatorSource$1@2570133f expected 4')
DEBUG    opensearch:base.py:200 < {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Field population is indexed with 2 bytes per dimension, but org.opensearch.index.fielddata.fieldcomparator.FloatValuesComparatorSource$1@2570133f expected 4"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"test","node":"EMIK3CDxT5qq2xP112An6A","reason":{"type":"illegal_argument_exception","reason":"Field population is indexed with 2 bytes per dimension, but org.opensearch.index.fielddata.fieldcomparator.FloatValuesComparatorSource$1@2570133f expected 4"}}],"caused_by":{"type":"illegal_argument_exception","reason":"Field population is indexed with 2 bytes per dimension, but org.opensearch.index.fielddata.fieldcomparator.FloatValuesComparatorSource$1@2570133f expected 4","caused_by":{"type":"illegal_argument_exception","reason":"Field population is indexed with 2 bytes per dimension, but org.opensearch.index.fielddata.fieldcomparator.FloatValuesComparatorSource$1@2570133f expected 4"}}},"status":400}

https://github.com/opensearch-project/opensearch-py/actions/runs/6868286935/job/18678495702

How can one reproduce the bug?

./.ci/run-tests false 2.11.0 test_rest_api_spec

What is the expected behavior?

Tests to pass.

What is your host/environment?

CI/CD 2.11.

Do you have any additional context?

Seems like those were added in https://github.com/opensearch-project/OpenSearch/pull/11024

gashutos commented 10 months ago

@dblock Why we still run test for 2.11.0 ? We should be running 2.11.1 now right ?

dblock commented 10 months ago

Are these tests supposed to fail against 2.11.0 and will pass on 2.11.1? 2.11.1 has not been released yet. I PRed https://github.com/opensearch-project/opensearch-py/pull/584 for 2.11.1 when that's available.

I think the YAML rest test specs should skip the tests when run against 2.11.0 if that's known to be broken, no?

gashutos commented 10 months ago

Are these tests supposed to fail against 2.11.0 and will pass on 2.11.1? 2.11.1 has not been released yet. I PRed #584 for 2.11.1 when that's available.

I think the YAML rest test specs should skip the tests when run against 2.11.0 if that's known to be broken, no?

Makes sense, I didnt know we will be running 2.11.0 once 2.11.1 branch is cut, That is the reason it is passing in. OpenSearch Repo. Nevermind, raised the PR https://github.com/opensearch-project/OpenSearch/pull/11214