Releases: untergeek/es_client
Releases · untergeek/es_client
[8.18.2] - 2025-04-21
Changes
- Updated
tiered-debug
dependency to>=1.3.0
to allow newer patch releases while maintaining compatibility. - Added
pint>=0.19.2
to documentation dependencies for enhanced unit handling in documentation. - Released version
8.18.2
as a stable update.
[8.18.1] - 2025-04-17
Added
SecretStore
class tobuilder.py
for secure storage of sensitive data,
includingpassword
,bearer_auth
,api_key
, andopaque_id
. This
class is integrated into theBuilder
class, ensuring sensitive data is not
exposed in logs or exceptions, and is redacted in__repr__
outputs, and are
removed from the in-memory DotMap representations of the config.- Adding
SecretStore
required the additional dependency of"cryptography>=44.0.2"
- Comprehensive reStructuredText (reST) docstrings for all modules, classes, and
functions inbuilder.py
,logging.py
,config.py
,schemacheck.py
,
utils.py
,exceptions.py
, andcommands.py
, detailing inputs, outputs,
raises, and examples. - Doctests for testable functions and classes across all modules, ensuring
functionality verification without external dependencies (e.g., mocked
click.Context
,Elasticsearch
client). - Custom
__repr__
methods for classes inbuilder.py
(Builder
,
SecretStore
),logging.py
(Whitelist
,Blacklist
,JSONFormatter
),
schemacheck.py
(SchemaCheck
), andexceptions.py
(all exception classes),
enhancing debugging with secure, redacted outputs. - Cloned the
password_filter
function fromschemacheck.py
into
exceptions.py
to avoid circular import, maintaining redaction for sensitive data
in exception messages.
Changed
- Enhanced security by ensuring no sensitive data (e.g., passwords, API keys)
appears in docstrings, doctests, or__repr__
outputs, leveraging
password_filter
for redaction. - Updated
test_builder.py
to align withbuilder.py
’sSecretStore
integration, fixing failing tests (test_pass_but_no_user
,test_proper_api_key
,
test_proper_api_key_token
) by checking_secrets.get_secret
and verifying
sensitive data cleanup. - Preserved all existing functionality, imports, comments, and pylint directives
in all modules, adding only documentation and minor formatting for line length
compliance. - Adjusted
commands.py
to include all three commands (show_all_options
,
test_connection
,test_stderr
) with detailed docstrings and doctests,
retaining extensive comments onSHOW_EVERYTHING
usage. - Bumped version of
tiered-debug
to1.2.1
inpyproject.toml
and
requirements.txt
.
8.17.5 (31 March 2025)
Announcement
This release adds the new tiered-debug
Python module which enables you to have up to 5 levels of debug logging.
Changes
- Adapted to use the
tiered_debug
logging helper module.- Lots of replacements added to use tiered debug logging instead of logger.debug
- With the tiered debug logging options, more verbose logging was added that
will not be seen unless set to show more. See thetiered_debug
module
for more information.
- Version bumped to
8.17.5
. - Updated tests to catch the new tiered debug logging.
- All tests passing.
8.17.4 (18 March 2025)
Bugfix
- Fixed a logging configuration bug to only assign a file handler if a log file
is specified. Also fixed to ensure configuration goes to the root logger.
Changes
- Dependency version bumps in this release:
elasticsearch8==8.17.2
certifi>=2025.3.31
8.17.3 (6 March 2025)
Announcement
Logging changes
If you specify a log file in your configuration, it will now be used, and nothing
should appear different for you. If, however, you do not specify a log file, the
default behavior is to log to both STDOUT and STDERR, with the streams split.
This is the new behavior. If you do not want this, you must specify a log file
in your configuration.
$ python run_script.py --loglevel DEBUG test-stderr 1>stdout.log 2>stderr.log
This will log all output to stdout.log
and all errors to stderr.log
.
$ cat stdout.log
DEBUG: Overriding configuration file setting loglevel=INFO with command-line option loglevel=DEBUG
2025-03-06 17:53:01,038 DEBUG es_client.commands test_stderr:131 This is a debug message
2025-03-06 17:53:01,038 INFO es_client.commands test_stderr:132 This is an info message
Logging test complete.
$ cat stderr.log
2025-03-06 17:53:01,038 WARNING es_client.commands test_stderr:133 This is a warning message
2025-03-06 17:53:01,038 ERROR es_client.commands test_stderr:134 This is an error message
2025-03-06 17:53:01,038 CRITICAL es_client.commands test_stderr:135 This is a critical message
Changes
- Changes in the
logging.py
file to handle the new logging behavior. Also added
test-stderr
tocommands.py
andcli_example.py
to demonstrate the new
behavior. - Updated
defaults.py
to have a defaultLOGFORMAT
ofdefault
.
8.17.2 (26 February 2025)
Announcement
- Attempting to allow the 8.x client to work with 7.x Elasticsearch servers by
makingmin_version
andmax_version
configurable at the time of
Builder
instantiation.
The default values are still limited to 8.x versions, but preliminary testing
shows that the 8.x client works just fine for Curator against 7.14.x through
7.17.x servers with these changes.
Changes
- The
Builder
class can now override the default minimum and/or maximum version:
Builder(config, min_version=7.0.0, max_version=8.99.99)
. - The
helpers.config.get_client()
function can also take these arguments:
helpers.config.get_client(config, min_version=7.0.0, max_version=8.99.99)
. - Updated the date and copyright holder in
LICENSE
.
8.17.1 (24 January 2025)
Announcements
- Python 3.13 support...but with a caveat.
- HUGE (potential) caveat, though. The Python 3.13 SSL implementation now has
X509_V_FLAG_X509_STRICT
set by default. This unfortunately means that
self-signed certificates created by Elasticsearch'scertutil
will not
work with Python 3.13 as they do not yet include the key usage extension.
If you are usinges_client
in any way with one of these certificates,
I highly recommend that you not use Python 3.13 until this is resolved. - 3.13 is excluded from the Hatch test matrix for this reason.
- 3.13 will still be tested manually with each release.
- HUGE (potential) caveat, though. The Python 3.13 SSL implementation now has
Changes
- Python module version bumps:
elasticsearch8==8.17.1
click==8.1.8
certifi>=2024.12.14
- Refactored
master_only
functions and tests. I discovered some loopholes
in my code when I was testing Python 3.13 against an Elastic Cloud instance,
so I fixed them. This also necessitated a change in the integration tests.
8.15.2 (30 September 2024)
Changes
- Python module version bumps:
elasticsearch8==8.15.1
pyyaml==6.0.2
certifi>=2024.8.30
8.15.1 (23 August 2024)
Changes
- Added
commands.py
as both a cleaner location for theshow_all_options
function, as well as a place it could be imported and re-used. - Updated
docs/example.rst
anddocs/tutorial.rst
to reflect these
location changes. - Updated
pytest.ini
to automatically look for and use.env
for
environment variables for testing. - Using versioned
docker_test
scripts now from
https://github.com/untergeek/es-docker-test-scripts
8.15.0 (13 August 2024)
Changes
- Python module version bumps:
elasticsearch8==8.15.0
- Make execution scripts more consistent and PEP compliant.