Commit Graph
80 Commits
Author SHA1 Message Date
VatsalandGitHub f0bce7cf33 Fixed issue 769:Collapse not preserved when chaining a search instance (#771)
* Fixed issue 769:Collapse not preserved when chaining a search instance

Signed-off-by: vatsal <[email protected]>

* Fixed issue 769:Collapse not preserved when chaining a search instance

Signed-off-by: vatsal <[email protected]>

* Fixed issue 769:Collapse not preserved when chaining a search instance

Signed-off-by: vatsal <[email protected]>

* Fixed issue 769:Collapse not preserved when chaining a search instance

Signed-off-by: vatsal <[email protected]>

* Fixed issue 769:Collapse not preserved when chaining a search instance

Signed-off-by: vatsal <[email protected]>

---------

Signed-off-by: vatsal <[email protected]>
2024-07-09 09:39:19 -07:00
Derek HoandGitHub d3177a8bcb Pass in initial admin password and remove admin:admin references (#631)
* Update to pass in initial admin password

Signed-off-by: Derek Ho <[email protected]>

* Add changelog and logic to distinguish between versions

Signed-off-by: Derek Ho <[email protected]>

* fix syntax

Signed-off-by: Derek Ho <[email protected]>

* Revert tests

Signed-off-by: Derek Ho <[email protected]>

* Add 2.12 to the matrix and fix testing logic

Signed-off-by: Derek Ho <[email protected]>

* Fix version logic

Signed-off-by: Derek Ho <[email protected]>

* Try to split job into two batches

Signed-off-by: Derek Ho <[email protected]>

* Fix lint

Signed-off-by: Derek Ho <[email protected]>

* Change name

Signed-off-by: Derek Ho <[email protected]>

* Remove period

Signed-off-by: Derek Ho <[email protected]>

* Pull password dynamically

Signed-off-by: Derek Ho <[email protected]>

* Change to proper env var

Signed-off-by: Derek Ho <[email protected]>

* Try passing through

Signed-off-by: Derek Ho <[email protected]>

---------

Signed-off-by: Derek Ho <[email protected]>
Signed-off-by: Derek Ho <[email protected]>
2024-06-18 11:44:21 -04:00
Sai Medhini Reddy MaryadaandGitHub 1739a988d3 Removed deprecated numpy.float_ and update NumPy/Pandas imports (#762)
Signed-off-by: saimedhi <[email protected]>
2024-06-17 15:19:13 -07:00
AbitraryYuandGitHub 0caacf870c Added Tests for Search Pipeline and Notifications Plugin (#668)
* Added Tests for Notification and Search Pipeline.ml

Signed-off-by: AbitraryYu <[email protected]>

* Add back the lines of comment in indices.py during resolving merge conflict.

Signed-off-by: AbitraryYu <[email protected]>

* Fix notification plugin tests, from async def to def.

Signed-off-by: AbitraryYu <[email protected]>

* Fix test errors. Rename function names and rewrite assertion tests.

Signed-off-by: AbitraryYu <[email protected]>

* Fix formatting errors. Added typings to CONTENT.

Signed-off-by: AbitraryYu <[email protected]>

---------

Signed-off-by: AbitraryYu <[email protected]>
2024-04-30 16:51:22 -04:00
Sai Medhini Reddy MaryadaandGitHub fd48eb450a added tests (#726)
Signed-off-by: saimedhi <[email protected]>
2024-04-23 15:47:15 -04:00
Sai Medhini Reddy MaryadaandGitHub 0e28f5ffe9 Updated code generator to use new version of OpenAPI specification (#721)
* Updated code generator to use new version of OpenAPI specification

Signed-off-by: saimedhi <[email protected]>

* Updated code generator to use native OpenAPI specification

Signed-off-by: saimedhi <[email protected]>

---------

Signed-off-by: saimedhi <[email protected]>
2024-04-17 17:22:10 -04:00
Sai Medhini Reddy MaryadaandGitHub 58e9b1d66c Introduced service time metrics to OpenSearch-Py client. (#716)
* Introduced service time metrics to opensearch-py client

Signed-off-by: saimedhi <[email protected]>

* Introduced service time metrics to opensearch-py client

Signed-off-by: saimedhi <[email protected]>

* Introduced service time metrics to opensearch-py client

Signed-off-by: saimedhi <[email protected]>

* Added service time metrics

Signed-off-by: saimedhi <[email protected]>

---------

Signed-off-by: saimedhi <[email protected]>
Signed-off-by: Sai Medhini Reddy Maryada <[email protected]>
2024-04-15 07:20:46 -04:00
Sai Medhini Reddy MaryadaandGitHub ba715b9d3f Dropped support for python 3.6, 3.7 and added support for python 3.12 (#717)
Signed-off-by: saimedhi <[email protected]>
2024-04-06 11:18:47 -04:00
Sai Medhini Reddy MaryadaandGitHub b2a1796b8e Fixed yaml test runner (#696)
Signed-off-by: saimedhi <[email protected]>
2024-03-16 07:58:10 -04:00
Sai Medhini Reddy MaryadaandGitHub 94e33c6899 skipping failing integ test that is newly added (#652)
* skipping a newly added test

Signed-off-by: saimedhi <[email protected]>

* skipping a newly added test

Signed-off-by: saimedhi <[email protected]>

---------

Signed-off-by: saimedhi <[email protected]>
2024-02-02 09:34:31 -08:00
Mark CohenandGitHub a80bab2ad5 Assignment from no return (#658)
* added unnecessary-dunder-call to pylintrc files; disabled for certain lines

in run_tests.py, exception thrown by 'git remote add origin' when the remote already exists will not exit

Signed-off-by: Mark Cohen <[email protected]>

* updates to adhere to assignment-from-no-return lint

Signed-off-by: Mark Cohen <[email protected]>

* simplified get_value_filter in Facet to return None
added assert to test get_value_filter returning None

Signed-off-by: Mark Cohen <[email protected]>

* added option to output HTML test coverage locally from run_tests.py

returning None from test_faceted_search.Facet.get_value_filter

Signed-off-by: Mark Cohen <[email protected]>

* added unused-variable lints; replaced unused variables with _ or referenced them

Signed-off-by: Mark Cohen <[email protected]>

* updated CHANGELOG to point to the right PR

Signed-off-by: Mark Cohen <[email protected]>

---------

Signed-off-by: Mark Cohen <[email protected]>
2024-01-25 15:17:09 -08:00
Mark CohenandGitHub 6e58837993 added unnecessary-dunder-call to pylintrc files; disabled for certain lines (#655)
in run_tests.py, exception thrown by 'git remote add origin' when the remote already exists will not exit

Signed-off-by: Mark Cohen <[email protected]>
2024-01-22 09:12:57 -05:00
Mark CohenandGitHub 7c66e8cf3d Use .pylintrc files (#654)
* switched pylint to a .pylintrc based config

Signed-off-by: Mark Cohen <[email protected]>

* added invalid-name pylint disable instruction because the framework requires camel case instead of snake case

Signed-off-by: Mark Cohen <[email protected]>

---------

Signed-off-by: Mark Cohen <[email protected]>
2024-01-19 16:17:32 -05:00
Mark CohenandGitHub 0ddbf8cafa Pylint integration updates (#643)
* updated files with docstrings to pass pylint

Signed-off-by: Mark Cohen <[email protected]>

* updated samples to prepare for enabling missing-docstring linter; will continue to work on this before committing setup.cfg

Signed-off-by: Mark Cohen <[email protected]>

* removed missing-function-docstring from setup.cfg so the linter doesn't fail while work on docstrings continues

Signed-off-by: Mark Cohen <[email protected]>

* corrected unnecessary return docstring values

Signed-off-by: Mark Cohen <[email protected]>

* fixing failure in 'black' on reformatting

Signed-off-by: Mark Cohen <[email protected]>

* updated utils to pass missing-function-docstring tests

Signed-off-by: Mark Cohen <[email protected]>

* updated functions with missing docstrings or pylint ignore instructions; added a utility to automatically add these ignore instructions to most functions that should be self-describing; rolled back some automatically generated code mistakenly changed

Signed-off-by: Mark Cohen <[email protected]>

* * ignoring opensearchpy for pylint and then added it back to noxfile.py
* fixed some lints; created a feature flag for newer dynamic pylint so now lints can be fixed first in legacy code and then enabled by multiple people
* extracted a method for per-folder linting
* updated noxfile.lint_per_folder with type hints
* enabled unspecified-encoding in pylint
* added disable missing-function-docstring pragma to test_clients.py in test_async and test_server
* added more encodings to pass unspecified-encoding pylint tests
* updated changelog
Signed-off-by: Mark Cohen <[email protected]>

* updated CHANGELOG.md entry
removed the feature flag for pylint lint_per_folder
fixed failures from mypy and pylint
removed pylint MESSAGE CONTROL config from setup.cfg after relocating to lint_per_folder method
Signed-off-by: Mark Cohen <[email protected]>

* removed pylint ignore missing-function-docstring

Signed-off-by: Mark Cohen <[email protected]>

* added pylint.extensions.docparams plugin

updated some docstrings to correct parameters

removed pylint from setup.cfg

Signed-off-by: Mark Cohen <[email protected]>

* added four lints for opensearchpy/

Signed-off-by: Mark Cohen <[email protected]>

* adding await back to client.info() call

Signed-off-by: Mark Cohen <[email protected]>

* updated TODOs as requested

renamed test_opensearchpy.test_async.test_server.test_helpers.conftest.setup_ubq_tests to setup_update_by_query_tests

added
OpenSearch-main/rest-api-spec/src/main/resources/rest-api-spec/test/indices/stats/50_noop_update[0]
to skip tests list

run_tests.py catches a CalledProcessError when the git repo already exists and the command to add the origin fails in fetch_opensearch_repo()

Signed-off-by: Mark Cohen <[email protected]>

---------

Signed-off-by: Mark Cohen <[email protected]>
2024-01-19 13:36:05 -05:00
odelmarcelleandGitHub 3eba72c320 Reusable async client (#639)
* set aiohttp.ClientSession to None after close()

Signed-off-by: odlmarce <[email protected]>

* add test

Signed-off-by: odlmarce <[email protected]>

* update changelog

Signed-off-by: odlmarce <[email protected]>

* update changelog + format
Signed-off-by: odlmarce <[email protected]>

* update changelog
Signed-off-by: odlmarce <[email protected]>

* add tests using `with` and synchronous client
Signed-off-by: odlmarce <[email protected]>

* fix `urllib3.exceptions.ClosedPoolError` breaking synchronous client after `close`
Signed-off-by: odlmarce <[email protected]>

* update changelog
Signed-off-by: odlmarce <[email protected]>

* separate tests
Signed-off-by: odlmarce <[email protected]>

* refactor pool factory as lambda
Signed-off-by: odlmarce <[email protected]>

---------

Signed-off-by: odlmarce <[email protected]>
2024-01-02 13:33:24 -05:00
DJ CarrilloandGitHub db61b5943b Added fix for key error because of missing 'hits' key. (#616)
Updated CHANGELOG.md.



nox formatting applied.



Added new unit test for actions scan function.



Added type hints & nox formatting.



Added fix to async scan function & added matching unit tests for async.

Signed-off-by: Djcarrillo6 <[email protected]>
2023-12-04 09:26:25 -05:00
Samuel OrjiandGitHub 6f26eb3e8e remove unnecessary utf-8 header in .py files (#615)
* remove unnecessary utf-8 header in .py files

Signed-off-by: samuel orji <[email protected]>

* review feedback: add link to changelog

Signed-off-by: samuel orji <[email protected]>

---------

Signed-off-by: samuel orji <[email protected]>
2023-11-24 16:19:50 -05:00
Daniel (dB.) DoubrovkineandGitHub e92eac2c82 Enabled pylint:pointless-statement. (#611)
Signed-off-by: dblock <[email protected]>
2023-11-21 12:55:24 -08:00
Daniel (dB.) DoubrovkineandGitHub 1801ada270 Added pylint, enforce naming. (#590)
* Added pylint.

Signed-off-by: dblock <[email protected]>

* Enforce pylint:invalid-name.

Signed-off-by: dblock <[email protected]>

* Updated the generated code header to prevent broken links.

Signed-off-by: dblock <[email protected]>

* Swapped order of messages.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-11-21 10:04:39 -08:00
Daniel (dB.) DoubrovkineandGitHub 103bc89486 Fixes a suspicious setattr that should be taking an Any (#604)
* Fix invalid value type.

Signed-off-by: dblock <[email protected]>

* Workaround Incompatible types in assignment (expression has type float, variable has type Double)  [assignment]

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-11-17 16:54:54 -05:00
Daniel (dB.) DoubrovkineandGitHub 7509a15ef3 Fix Amazon OpenSearch Serverless integration with LangChain. (#603)
Signed-off-by: dblock <[email protected]>
2023-11-17 16:09:19 -05:00
Daniel (dB.) DoubrovkineandGitHub c66e1e37be Fix: TypeError on calling parallel_bulk. (#601)
* Fix: TypeError on calling parallel_bulk.

Signed-off-by: dblock <[email protected]>

* Added a sample that uses a bulk function generator.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-11-17 10:18:42 -08:00
Daniel (dB.) DoubrovkineandGitHub e68b9e762d Added client-level REST helpers. (#544)
* Added client-level REST helpers.

Signed-off-by: dblock <[email protected]>

* Move functions into an .http namespace.

Signed-off-by: dblock <[email protected]>

* Poetry update in samples.

Signed-off-by: dblock <[email protected]>

* Fix: typo.

Signed-off-by: dblock <[email protected]>

* Clarified what to use in which older versions.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-11-13 12:52:13 -08:00
Daniel (dB.) DoubrovkineandGitHub f02d6dee27 Avoid decoding request body unless it needs to be logged. (#571)
Signed-off-by: dblock <[email protected]>
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
2023-11-12 11:42:45 -08:00
Daniel (dB.) DoubrovkineandGitHub e079c00b48 Remove support for local client in testing. (#573)
Signed-off-by: dblock <[email protected]>
2023-11-12 08:35:06 -08:00
Daniel (dB.) DoubrovkineandGitHub f1d02376e4 Fix: assert deprecation. (#572)
Signed-off-by: dblock <[email protected]>
2023-11-10 10:26:10 -08:00
Daniel (dB.) DoubrovkineandGitHub 55d0e0d7ba Fix asyncio warnings/markers. (#574)
* Fix asyncio warnings/markers.

Signed-off-by: dblock <[email protected]>

* Allow some flexibility in codecov.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-11-10 10:20:26 -08:00
Daniel (dB.) DoubrovkineandGitHub 58b83d8c06 Added Windows CI. (#569)
Signed-off-by: dblock <[email protected]>
2023-11-09 17:41:37 -08:00
Daniel (dB.) DoubrovkineandGitHub 56c96d7c4f Expanded type coverage to benchmarks, samples and tests. (#566)
* Renamed json samples to fix duplicate module name.

Signed-off-by: dblock <[email protected]>

* Enabled mypy on all source files.

Signed-off-by: dblock <[email protected]>

* Added missing types.

Signed-off-by: dblock <[email protected]>

* Added CHANGELOG.

Signed-off-by: dblock <[email protected]>

* Move type: ignore to fix untyped decorator makes function untyped.

Signed-off-by: dblock <[email protected]>

* Fix nox -rs lint-3.7.

Signed-off-by: dblock <[email protected]>

* Fixed incorrect import.

Signed-off-by: dblock <[email protected]>

* Fix broken test.

Signed-off-by: dblock <[email protected]>

* Fixed TestBulk::test_bulk_works_with_bytestring_body.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-11-09 10:51:20 -05:00
Daniel (dB.) DoubrovkineandGitHub dcb79cc322 Merge .pyi type stubs inline (#563)
* Merged types into .py code.

Signed-off-by: dblock <[email protected]>

* Fix: nox -rs generate.

Signed-off-by: dblock <[email protected]>

* Updated CHANGELOG.

Signed-off-by: dblock <[email protected]>

* Use lowest common python version for lint.

Signed-off-by: dblock <[email protected]>

* Fix: don't typeshed.

Signed-off-by: dblock <[email protected]>

* Removed unneeded comment.

Signed-off-by: dblock <[email protected]>

* Simplify OPENSEARCH_URL.

Signed-off-by: dblock <[email protected]>

* Fix: positional ignore_status used as chunk_size.

Signed-off-by: dblock <[email protected]>

* Fix: parse version string.

Signed-off-by: dblock <[email protected]>

* Remove future annotations for Python 3.6.

Signed-off-by: dblock <[email protected]>

* Fix: types in documentation.

Signed-off-by: dblock <[email protected]>

* Improve CHANGELOG text.

Signed-off-by: dblock <[email protected]>

* Re-added missing separator.

Signed-off-by: dblock <[email protected]>

* Remove duplicate licenses.

Signed-off-by: dblock <[email protected]>

* Get rid of Optional[Any].

Signed-off-by: dblock <[email protected]>

* Fix docs with AsyncOpenSearch.

Signed-off-by: dblock <[email protected]>

* Fix: undo comment.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-11-06 10:08:19 -08:00
Daniel (dB.) DoubrovkineandGitHub bcfef113c4 Added samples, benchmarks and docs for nox format. (#556)
* Added samples for nox format.

Signed-off-by: dblock <[email protected]>

* Added space after #!/usr/bin/env python.

Signed-off-by: dblock <[email protected]>

* Added benchmarks and docs.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-10-26 19:55:50 -07:00
Daniel (dB.) DoubrovkineandGitHub 0da60b2623 Added a utf-8 header to all .py files (#557)
Signed-off-by: dblock <[email protected]>
2023-10-26 13:34:34 -04:00
Daniel (dB.) DoubrovkineandGitHub 5c7fe9dbde Fix: don't hardcode client class name. (#555)
Signed-off-by: dblock <[email protected]>
2023-10-26 09:30:23 -07:00
Sai Medhini Reddy MaryadaandGitHub fe4b6d754c added remote store client (#552)
Signed-off-by: saimedhi <[email protected]>
2023-10-26 10:59:07 -04:00
Daniel (dB.) DoubrovkineandGitHub 59072a67b8 Remove PY2. (#550)
Signed-off-by: dblock <[email protected]>
2023-10-25 08:41:50 -04:00
Daniel (dB.) DoubrovkineandGitHub 627e717534 Remove support for Python 2.x. (#548)
Signed-off-by: dblock <[email protected]>
2023-10-24 07:57:21 -07:00
Daniel (dB.) DoubrovkineandGitHub a1f942b6f9 Added support for AWS Sigv4 for UrlLib3. (#547)
* WIP: Added support for AWS Sigv4 for UrlLib3.

Signed-off-by: dblock <[email protected]>

* Refactored common implementation.

Signed-off-by: dblock <[email protected]>

* Added sigv4 samples.

Signed-off-by: dblock <[email protected]>

* Updated CHANGELOG.

Signed-off-by: dblock <[email protected]>

* Add documentation.

Signed-off-by: dblock <[email protected]>

* Use the correct class in tests.

Signed-off-by: dblock <[email protected]>

* Renamed samples.

Signed-off-by: dblock <[email protected]>

* Split up requests and urllib3 unit tests.

Signed-off-by: dblock <[email protected]>

* Rename AWSV4Signer.

Signed-off-by: dblock <[email protected]>

* Clarified documentation of when to use Urllib3AWSV4SignerAuth vs. RequestHttpConnection.

Signed-off-by: dblock <[email protected]>

* Move fetch_url inside the signer class.

Signed-off-by: dblock <[email protected]>

* Added unit test for Urllib3AWSV4SignerAuth adding headers.

Signed-off-by: dblock <[email protected]>

* Added unit test for signing to include query string.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-10-23 19:46:19 -04:00
Daniel (dB.) DoubrovkineandGitHub 7a638cdafc Align pool_maxsize for different connection pool implementations. (#535)
* Align pool_maxsize for different connection pool implementations.

Signed-off-by: dblock <[email protected]>

* Document connection classes and settings.

Signed-off-by: dblock <[email protected]>

* Undo change in async for backwards compatibility.

Signed-off-by: dblock <[email protected]>

* Fix: typo.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-10-12 18:55:31 -04:00
Daniel (dB.) DoubrovkineandGitHub 2bfc409177 Fix: typos. (#526)
* Fix: typo.

Signed-off-by: dblock <[email protected]>

* Fix: typo.

Signed-off-by: dblock <[email protected]>

* Fixed its.

Signed-off-by: dblock <[email protected]>

* Added Visual Code settings to .gitignore.

Signed-off-by: dblock <[email protected]>

* Added loop type for async client.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
2023-10-09 10:45:18 -07:00
Sai Medhini Reddy MaryadaandGitHub c6c7df5461 Updated APIs to match other clients and opensearch openapi spec (#502)
Signed-off-by: saimedhi <[email protected]>
2023-09-26 12:46:18 -04:00
Logan AttwoodandGitHub fca8bd3d0e Fix race condition in AWS request signers (#470)
* Fix race condition in AWS request signers

Signed-off-by: Logan Attwood <[email protected]>

* Conditionally expose get_frozen_credentials on mock_session

Signed-off-by: Logan Attwood <[email protected]>

* Use inheritance to make tests cleaner

Signed-off-by: Logan Attwood <[email protected]>

---------

Signed-off-by: Logan Attwood <[email protected]>
2023-08-10 13:32:53 -04:00
Sai Medhini Reddy MaryadaandGitHub caeaa13250 Updated Security Client APIs (#450)
Signed-off-by: saimedhi <[email protected]>
2023-07-26 18:38:49 -04:00
87b402c16e Finish up #305, tests for AsyncTransport (#452)
* fix multihost connection of AsyncTransport for AIOHttpConnection as connection_class & ConnectionPool as connection_pool_class parameters with compatability legacy test cases

Signed-off-by: ARashitov <[email protected]>

* adding test cases for checking multihost connection pool init with specified connection_class object

Signed-off-by: ARashitov <[email protected]>

* remove introduced updates

Signed-off-by: ARashitov <[email protected]>

* fix test cases by adding _async_init() call to init the actual hosts

Signed-off-by: ARashitov <[email protected]>

* remove unneeded imports

Signed-off-by: ARashitov <[email protected]>

* fix test cases of multi hosts connection pool init & adding documentation

Signed-off-by: ARashitov <[email protected]>

* Addressed comments in #305.

Signed-off-by: dblock <[email protected]>

* Renamed file for consistency.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: ARashitov <[email protected]>
Signed-off-by: dblock <[email protected]>
Co-authored-by: ARashitov <[email protected]>
2023-07-26 10:45:52 -07:00
Daniel (dB.) DoubrovkineandGitHub e022932ed1 Add the ability to run test patterns. (#454)
Signed-off-by: dblock <[email protected]>
2023-07-26 10:18:45 -07:00
florianvazelleandGitHub 5866880c81 Add async tests for plugins (#425)
* test(plugins): add async tests for plugins

Signed-off-by: florian <[email protected]>

* chore(USER_GUIDE): remove **

Signed-off-by: florian <[email protected]>

* test(async): remove the event loop session scoped fixture

Signed-off-by: florian <[email protected]>

---------

Signed-off-by: florian <[email protected]>
2023-07-24 09:56:32 -04:00
Sai Medhini Reddy MaryadaandGitHub 5fa6d994bd Added support for latest OpenSearch versions 2.7.0, 2.8.0 (#445)
Signed-off-by: saimedhi <[email protected]>
2023-07-21 13:08:09 -04:00
Michael OliverandGitHub 4dba35deea Allow passing trust_env to aiohttp.ClientSession (#438)
Fixes #368

Signed-off-by: Michael Oliver <[email protected]>
2023-07-19 09:02:04 -04:00
12ebe82cba Fix string/tuple/no auth on AsyncHttpConnection class (#424)
* Fix string/tuple/no auth on AsyncHttpConnection class. Fixes #283

Signed-off-by: dannosaur <[email protected]>

* Update for PR comments. Add tests.

Signed-off-by: dannosaur <[email protected]>

* Moving tests to its own file.

Also had to install asynctest into the dev-requirements to get access to the context managers necessary to mock out aiohttp.

Signed-off-by: dannosaur <[email protected]>

* Update CHANGELOG

Signed-off-by: dannosaur <[email protected]>

* Linter fixes. Add license text to new file.

Signed-off-by: dannosaur <[email protected]>

* Move AsyncContextManagerMock to utils package for future re-use

Signed-off-by: dannosaur <[email protected]>

* Lint

Signed-off-by: dannosaur <[email protected]>

* Refactor async tests - remove asynctest package

Signed-off-by: dannosaur <[email protected]>

* Switch out to using aiounittest for async testing prior to py3.8

Signed-off-by: dannosaur <[email protected]>

* Use RequestContextManager from opensearchpy._asycn._extra_imports

Signed-off-by: dannosaur <[email protected]>

* Simplify test somewhat, move to `test_async` since all other async tests are ignored on runners <3.6

Signed-off-by: dannosaur <[email protected]>

* Lint

Signed-off-by: dannosaur <[email protected]>

---------

Signed-off-by: dannosaur <[email protected]>
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
2023-07-06 18:01:52 -04:00
florianvazelleandGitHub 2e8d5ce1a5 Index State Management support (#398)
* feat(plugins): add index management client plugin

Signed-off-by: florian <[email protected]>

* chore(CHANGELOG): added entry for ISM api support in changelog

Signed-off-by: florian <[email protected]>

* test(plugins): use assertEqual to compare call parameters

Signed-off-by: florian <[email protected]>

* test(plugins): edit policy to support older versions of opensearch

Signed-off-by: florian <[email protected]>

* test(plugins): ignore plugin tests when opensearch is unreleased

Signed-off-by: florian <[email protected]>

* test(plugins): move plugin tests into separate files

Signed-off-by: florian <[email protected]>

* test(plugins): fix import of OpenSearchTestCase

Signed-off-by: florian <[email protected]>

* chore(USER_GUIDE): add a index management plugin part

Signed-off-by: florian <[email protected]>

---------

Signed-off-by: florian <[email protected]>
2023-06-28 16:56:00 -04:00
florianvazelleandGitHub c60c259d96 Security plugin support (#399)
* feat(plugins): add security client plugin

Signed-off-by: florian <[email protected]>

* test(plugins): skip security plugin tests when disabled

Signed-off-by: florian <[email protected]>

* fix(security): remove non-ASCII character

Signed-off-by: florian <[email protected]>

* chore(CHANGELOG): added entry for security api support in changelog

Signed-off-by: florian <[email protected]>

* test(plugins): add asynchronous tests version

Signed-off-by: florian <[email protected]>

* test: remove some warnings

Signed-off-by: florian <[email protected]>

* chore(USER_GUIDE): add a security plugin part

Signed-off-by: florian <[email protected]>

* test(security): Split out security plugin tests in its own file

Signed-off-by: florian <[email protected]>

* chore: apply reviews

Signed-off-by: florian <[email protected]>

---------

Signed-off-by: florian <[email protected]>
2023-06-27 11:01:40 -04:00