Commit Graph
134 Commits
Author SHA1 Message Date
Étienne BeauléandGitHub 1b0440a33f Ignore name of index when fetching settings (#823)
This commit fixes a situation where an index cannot be updated through this client as the index is aliased, with the client pointing to the alias.

As the `GET /<index>/_settings` request will only ever return the settings for the specified index (through the alias), it would only have one key, so the name of the key would not matter. We can pop the key to get the settings object for the index through the alias.

Signed-off-by: Étienne Beaulé <[email protected]>
2024-09-26 14:02:13 -04:00
CorneeSeanandGitHub 3087686fff Collapse support added to AsyncSearch helper (#769) (#827)
Signed-off-by: Radoslaw Kuczynski <[email protected]>
2024-09-26 08:20:25 -04:00
Daniel (dB.) DoubrovkineandGitHub a24b9f3f3c Fix: generator adds new namespace. (#813)
Signed-off-by: dblock <[email protected]>
2024-08-28 10:07:50 -07:00
borisevich-a-vandGitHub cd68b03157 Fixed timeout argument in Transport (#810)
* Fixed timeout argument in Transport

Signed-off-by: borisevich-a-v <[email protected]>

* Fixed ignore argument in perform request in Transport and AsyncTransport

Signed-off-by: borisevich-a-v <[email protected]>

* Apply black and isort

Signed-off-by: borisevich-a-v <[email protected]>

* Add info into CHANGELOG.md

Signed-off-by: borisevich-a-v <[email protected]>

---------

Signed-off-by: borisevich-a-v <[email protected]>
2024-08-27 06:20:52 -04:00
Daniel (dB.) DoubrovkineandGitHub 717122455b Preparing for next developer iteration, 2.7.2. (#807)
Signed-off-by: dblock <[email protected]>
2024-08-22 09:12:37 -07:00
Jeppe Fihl-PearsonandGitHub e26f3fc28c Add override for code generator to change indices.put_alias argument order (#804)
* Add currently-failing test to validate the original argument order

Signed-off-by: Jeppe Fihl-Pearson <[email protected]>

* Add workaround for breaking API change inadvertently added in v2.7.0

Signed-off-by: Jeppe Fihl-Pearson <[email protected]>

* Generate new version of the client code with the correct argument order

Signed-off-by: Jeppe Fihl-Pearson <[email protected]>

---------

Signed-off-by: Jeppe Fihl-Pearson <[email protected]>
2024-08-22 08:33:55 -04:00
Daniel (dB.) DoubrovkineandGitHub b994dc4063 Preparing for next developer iteration, 2.7.1. (#802)
Signed-off-by: dblock <[email protected]>
2024-08-20 09:47:02 -07:00
Daniel (dB.) DoubrovkineandGitHub dbc11371db Prepare for release, 2.7.0. (#799)
* Prepare for release, 2.7.0.

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

* Remove references to Jenkins.

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

* Update compatibility matrix.

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

---------

Signed-off-by: dblock <[email protected]>
2024-08-20 08:33:35 -07:00
def00facfb Added support for the bucket aggregation. (#797)
Signed-off-by: dblock <[email protected]>
Co-authored-by: mckirk <[email protected]>
2024-08-15 07:49:58 -07:00
be56ae82b8 fix: retry_on_conflicts is not bool (#795)
Signed-off-by: dblock <[email protected]>
Co-authored-by: Patrick Rice <[email protected]>
2024-08-15 10:34:37 -04:00
55f9940d51 Remove HEAD-handling hack. (#794)
* remove HEAD -> GET workaround

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

* Removed remaining HEAD-handling code.

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

* Fixed remaining references to admin:admin.

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

---------

Signed-off-by: dblock <[email protected]>
Co-authored-by: Vincent Castaneda <[email protected]>
2024-08-15 10:15:13 -04:00
Daniel (dB.) DoubrovkineandGitHub 2d6ae74211 Updated dependencies, generated API. (#793)
* Updated dependencies.

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

* Lock setuptools at 71.1.0.

Newer version seems to cause UserWarning: Unknown distribution option: 'test_suite'.

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

* Updated opensearch-py APIs to reflect opensearch-api-specification@9d3bc34.

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

* Do not test against flaky 2.0.

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

* Reduce test matrix and add 2.16.

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

* Fix missing spaces in generated descriptions.

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

* Removed 2.2.1.

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

---------

Signed-off-by: dblock <[email protected]>
2024-08-14 15:25:01 -07:00
RaphaelandGitHub 581cbbaf10 Fix spell typos and missing whitespace (#789) 2024-07-31 22:23:35 -04:00
Godefroy Amaury de MalefèteandGitHub a68e8b7daf Allow the use of percent string in Bool.__and__ method (#780)
Signed-off-by: Godefroy Amaury de Malefète <[email protected]>
2024-07-25 13:46:50 -04:00
Hugo van KemenadeandGitHub 6e3f1a1194 Remove redundant mock backport dependency and upgrade syntax for Python 3.8+ (#785)
* Upgrade syntax with pyupgrade --py38-plus

Signed-off-by: Hugo van Kemenade <[email protected]>

* Convert to f-strings with flynt

Signed-off-by: Hugo van Kemenade <[email protected]>

* Format with Black

Signed-off-by: Hugo van Kemenade <[email protected]>

* Remove redundant mock backport dependency

Signed-off-by: Hugo van Kemenade <[email protected]>

* isort imports

Signed-off-by: Hugo van Kemenade <[email protected]>

* Add changelog entry

Signed-off-by: Hugo van Kemenade <[email protected]>

---------

Signed-off-by: Hugo van Kemenade <[email protected]>
2024-07-20 16:19:20 -04:00
Hugo van KemenadeandGitHub de96d28e45 Remove redundant six dependency (#781)
* Don't create universal wheel for Python 3 only

Signed-off-by: Hugo van Kemenade <[email protected]>

* Update Black target version to match min Python supported

Signed-off-by: Hugo van Kemenade <[email protected]>

* Upgrade files using six to Python 3 syntax

Signed-off-by: Hugo van Kemenade <[email protected]>

* Remove redundant six dependency

Signed-off-by: Hugo van Kemenade <[email protected]>

* Format with Black

Signed-off-by: Hugo van Kemenade <[email protected]>

* Add changelog entry

Signed-off-by: Hugo van Kemenade <[email protected]>

---------

Signed-off-by: Hugo van Kemenade <[email protected]>
2024-07-20 12:30:37 -04:00
Daniel (dB.) DoubrovkineandGitHub 1ef788a55a Skip elements with titles. (#777)
* Skip elements with titles.

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

* Simplify and just skip by ref.

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

* Re-generate API spec.

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

* Do not skip alias tests.

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

* Actually skip node_id_or_metric.

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

---------

Signed-off-by: dblock <[email protected]>
2024-07-18 13:24:38 -07:00
ea0a718754 Updated opensearch-py to reflect the latest OpenSearch API spec (2024-07-15) (#775)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-07-15 08:30:16 -04:00
04a2350ba0 Updated opensearch-py to reflect the latest OpenSearch API spec (2024-07-12) (#773)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-07-11 22:33:22 -07:00
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
cef3cd5b1c Updated opensearch-py to reflect the latest OpenSearch API spec (2024-06-24) (#767)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-06-24 09:18:43 -07:00
d39280759b Updated opensearch-py to reflect the latest OpenSearch API spec (2024-06-20) (#766)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-06-19 22:10:00 -07:00
f7cac3033d Updated opensearch-py to reflect the latest OpenSearch API spec (2024-06-17) (#763)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-06-17 15:33:14 -07: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
Sai Medhini Reddy MaryadaandGitHub 188b6561e7 Bump version to 2.6.0 (#752)
Signed-off-by: saimedhi <[email protected]>
2024-05-24 09:16:19 -07:00
ee21471c13 Updated opensearch-py to reflect the latest OpenSearch API spec (2024-05-22) (#749)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-05-22 08:30:08 -07:00
5b40a85f9a Updated opensearch-py to reflect the latest OpenSearch API spec (2024-05-21) (#747)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-05-20 20:53:47 -07:00
72173c3fb0 Updated opensearch-py to reflect the latest OpenSearch API spec (2024-05-15) (#742)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-05-15 09:55:45 -07:00
1bf403c0f2 Updated opensearch-py to reflect the latest OpenSearch API spec (2024-05-10) (#741)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-05-10 10:44:19 -07:00
Sai Medhini Reddy MaryadaandGitHub 9a67bbfd16 fixed generator (#738)
Signed-off-by: saimedhi <[email protected]>
2024-05-01 16:59:17 -04:00
303b6c6f64 Updated opensearch-py to reflect the latest OpenSearch API spec (2024-04-24) (#734)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-04-23 22:35:59 -07:00
26a7b12756 Updated opensearch-py to reflect the latest OpenSearch API spec (2024-04-23) (#732)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-04-23 00:02:15 -07:00
d0aee06e41 Updated opensearch-py to reflect the latest OpenSearch API spec (2024-04-20) (#727)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-04-22 08:52:16 -04:00
3082d92f7d Updated opensearch-py to reflect the latest OpenSearch API spec (2024-04-19) (#725)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-04-18 21:40:53 -07:00
Sai Medhini Reddy MaryadaandGitHub b47edf906e Code generated using native OpenAPI specification (#724)
* Code generated using native OpenAPI specification

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

* Code generated using native OpenAPI specification

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

* Code generated using native OpenAPI specification

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

---------

Signed-off-by: saimedhi <[email protected]>
2024-04-17 16:22:14 -07: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 f2265701a4 Bump version to 2.5.0 (#703)
* Bump version to 2.5.0

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

* Bump version to 2.5.0

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

---------

Signed-off-by: saimedhi <[email protected]>
2024-03-22 15:44:39 -07:00
c770d88dc9 Updated opensearch-py to reflect the latest OpenSearch API spec (2024-03-22) (#702)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-03-22 16:40:18 -04:00
Sai Medhini Reddy MaryadaandGitHub 25db5d5c8a Modified generator to generate plugins (#700)
Signed-off-by: saimedhi <[email protected]>
2024-03-22 07:53:28 -04:00
8b91bb4ddb Updated opensearch-py to reflect the latest OpenSearch API spec (2024-02-07) (#671)
Signed-off-by: GitHub <[email protected]>
Co-authored-by: saimedhi <[email protected]>
2024-02-08 11:41:26 -05: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
Sai Medhini Reddy MaryadaandGitHub 900ea94ec8 Incorporated API generation into CI workflow and fixed 'generate' nox session (#660)
Signed-off-by: saimedhi <[email protected]>
2024-01-24 17:46:18 -05: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
Sai Medhini Reddy MaryadaandGitHub 2ab3a40307 Updated the get_policy API in the index_management plugin to allow the policy_id argument as optional (#633)
Signed-off-by: saimedhi <[email protected]>
2024-01-10 23:08:41 -08: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