This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new dffe04ada4 Fix mypy index property access in opensearch example
(#35691)
dffe04ada4 is described below
commit dffe04ada4c05a3e29422f6ea92625c6e040bf10
Author: Jarek Potiuk <[email protected]>
AuthorDate: Thu Nov 16 21:32:16 2023 +0100
Fix mypy index property access in opensearch example (#35691)
The new opensearch-py 2.4.1 added mypy stubs in
https://github.com/opensearch-project/opensearch-py/pull/563 and
they detected an error in our example (and they cause mypy error
when the new version is used)
---
tests/system/providers/opensearch/example_opensearch.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/system/providers/opensearch/example_opensearch.py
b/tests/system/providers/opensearch/example_opensearch.py
index 6a8660557c..b82af8ebdd 100644
--- a/tests/system/providers/opensearch/example_opensearch.py
+++ b/tests/system/providers/opensearch/example_opensearch.py
@@ -110,7 +110,7 @@ with DAG(
query={"query": {"bool": {"must": {"match": {"message": "hello
world"}}}}},
)
search = Search()
- search.index = INDEX_NAME
+ search._index = [INDEX_NAME]
search_object = search.filter("term", logger="airflow").query("match",
message="hello airflow")
search_high_level = OpenSearchQueryOperator(task_id="high_level_query",
search_object=search_object)