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

Skip elements with titles. #777

Closed dblock closed 2 months ago

dblock commented 2 months ago

Description

A workaround for the change in https://github.com/opensearch-project/opensearch-api-specification/pull/416 to avoid adding node_id_or_metric. With https://github.com/opensearch-project/opensearch-api-specification/pull/434 the only API tests that need to be skipped are those that catch an error (missing index parameters). These fail as expected on the client side.

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.

saimedhi commented 2 months ago

@dblock, Please take a look at the failing tests. Thank you.

dblock commented 2 months ago

The failure is unrelated caused by https://github.com/opensearch-project/OpenSearch/commit/29a3e2c980764f305f0ed5e858878bc7bb3dbe64. The put_alias method doesn't actually require index or alias, which can be specified in the body. The tests added in that PR do that.

What's the right way to fix this @saimedhi? Where do I remove the fact that these parameters are required and can default to None?

saimedhi commented 2 months ago

The failure is unrelated caused by opensearch-project/OpenSearch@29a3e2c. The put_alias method doesn't actually require index or alias, which can be specified in the body. The tests added in that PR do that.

What's the right way to fix this @saimedhi? Where do I remove the fact that these parameters are required and can default to None?

Hi @dblock, for path params they can be changed here

dblock commented 2 months ago

https://github.com/opensearch-project/opensearch-py/pull/778

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 73.40%. Comparing base (ba715b9) to head (5a5174b). Report is 36 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #777 +/- ## ========================================== + Coverage 71.95% 73.40% +1.44% ========================================== Files 91 67 -24 Lines 8001 5339 -2662 ========================================== - Hits 5757 3919 -1838 + Misses 2244 1420 -824 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.