fix: retry_on_conflicts is not bool (#795)
Signed-off-by: dblock <dblock@amazon.com> Co-authored-by: Patrick Rice <patrickrice20@gmail.com>
This commit is contained in:
co-authored by
Patrick Rice
parent
55f9940d51
commit
be56ae82b8
@@ -13,6 +13,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
### Fixed
|
||||
- Fixed Search helper to ensure proper retention of the _collapse attribute in chained operations. ([#771](https://github.com/opensearch-project/opensearch-py/pull/771))
|
||||
- Fixed the use of `minimum_should_match` with `Bool` to allow the use of string-based value (percent string, combination). ([#780](https://github.com/opensearch-project/opensearch-py/pull/780))
|
||||
- Fixed incorrect `retry_on_conflict` type ([#795](https://github.com/opensearch-project/opensearch-py/pull/795))
|
||||
### Updated APIs
|
||||
- Updated opensearch-py APIs to reflect [opensearch-api-specification@9d3bc34](https://github.com/opensearch-project/opensearch-api-specification/commit/9d3bc340ccd7d049e7d6e14a4aff2293780cb446)
|
||||
### Security
|
||||
|
||||
@@ -315,7 +315,7 @@ class AsyncDocument(ObjectBase, metaclass=AsyncIndexMeta):
|
||||
detect_noop: Optional[bool] = True,
|
||||
doc_as_upsert: Optional[bool] = False,
|
||||
refresh: Optional[bool] = False,
|
||||
retry_on_conflict: Optional[bool] = None,
|
||||
retry_on_conflict: Optional[int] = None,
|
||||
script: Any = None,
|
||||
script_id: Optional[str] = None,
|
||||
scripted_upsert: Optional[bool] = False,
|
||||
|
||||
@@ -370,7 +370,7 @@ class Document(ObjectBase, metaclass=IndexMeta):
|
||||
detect_noop: bool = True,
|
||||
doc_as_upsert: bool = False,
|
||||
refresh: bool = False,
|
||||
retry_on_conflict: Any = None,
|
||||
retry_on_conflict: int = 0,
|
||||
script: Any = None,
|
||||
script_id: Any = None,
|
||||
scripted_upsert: bool = False,
|
||||
|
||||
@@ -251,7 +251,7 @@ async def test_update_retry_on_conflict(write_client: Any) -> None:
|
||||
|
||||
@pytest.mark.parametrize("retry_on_conflict", [None, 0]) # type: ignore
|
||||
async def test_update_conflicting_version(
|
||||
write_client: Any, retry_on_conflict: bool
|
||||
write_client: Any, retry_on_conflict: int
|
||||
) -> None:
|
||||
await Wiki.init()
|
||||
w = Wiki(owner=User(name="Honza Kral"), _id="opensearch-py", views=42)
|
||||
|
||||
@@ -261,7 +261,7 @@ def test_update_retry_on_conflict(write_client: Any) -> None:
|
||||
|
||||
|
||||
@pytest.mark.parametrize("retry_on_conflict", [None, 0]) # type: ignore
|
||||
def test_update_conflicting_version(write_client: Any, retry_on_conflict: Any) -> None:
|
||||
def test_update_conflicting_version(write_client: Any, retry_on_conflict: int) -> None:
|
||||
Wiki.init()
|
||||
w = Wiki(owner=User(name="Honza Kral"), _id="opensearch-py", views=42)
|
||||
w.save()
|
||||
|
||||
Reference in New Issue
Block a user