Releases: untergeek/es-wait
[0.15.1] - 2025-04-21
Changed
- Dependency version bumps:
tiered_debug==1.3.0es_client>=8.18.2for tests onlyfuro>=2024.1.0for documentation only
- Updated all files to use double quotes for strings, as per PEP 8 style guide, using Black formatter.
- Updated
__init__.pyto include additional metadata (__author__,__copyright__,__license__,__status__,__description__,__url__,__email__,__maintainer__,__maintainer_email__,__keywords__,__classifiers__) and dynamic copyright year handling. - Updated
docs/conf.pyto use the Furo theme, add GitHub integration for "Edit Source" links, and enhance autodoc configuration with separated class signatures and typehint descriptions. - Updated
docs/requirements.txtto includefuro>=2024.1.0for documentation generation. - Split out the classes and modules from
docs/api.rstinto separate files for better organization and readability.
Impact
- Improved project metadata consistency with comprehensive package information.
- Enhanced documentation with modern theme, better navigation, and GitHub integration.
- Ensured compatibility with updated dependencies.
- Improve documentation generation with Furo theme (I like the look better).
[0.15.0] - 2025-04-17
Added
- Switched to Google-style docstrings to all classes and methods in all modules.
- Included ``Example`` sections for methods with >2 lines, with doctests where feasible.
- Added ``__repr__`` methods to waiter classes (``Relocate``, ``Snapshot``, ``Health``,
``Exists``, ``IndexLifecycle``, ``IlmPhase``, ``IlmStep``, ``Restore``, ``Task``) for
better debugging.
- Updated, replaced or added Sphinx RST files (``index.rst``, ``installation.rst``,
``usage.rst``, ``api.rst``) for ReadTheDocs.
Changed
- Ensured all docstring lines are under 80 characters for linter compliance.
- Improved documentation clarity with consistent formatting and cross-references.
- Dependency version bumps:
tiered-debug==1.2.1es_client>=8.18.1for tests only.
Impact
- Enhanced code maintainability with comprehensive, Sphinx-compatible docstrings.
- Improved debugging via ``__repr__`` methods showing key waiter attributes.
- Enabled professional ReadTheDocs documentation with API reference and examples.
0.14.0 (16 April 2025)
No functionality changes per se, but updated the tiered-debug module, added the debug.py module to allow unified debug level config throughout. Also bumped the package version to 0.14.0
0.12.0 (31 March 2025)
Announcement
No functionality changes here, but with the inclusion of the tiered-debug Python module, it is much easier to dial back super verbose debug logging, as well as dial it up again when you need it.
All tests pass.
0.11.0 (18 March 2025)
Considerable effort went in to adding unit tests for everything, as well as real-life testing in es-testbed and the es-pii-tool modules.
Found and patched a few anomalies.
0.10.0 12 March 2025
Lots of changed files for this. First experiment using AI-assisted coding.
Lots of good recommendations came from that. Really, really like having AI write my unit tests for me.
Most of the generated tests needed very little tweaking.
Changes
- Added
defaults.pyto store default values in a centralized location. - Used values from
defaults.pyin each Class init, both for typing and for value - As a way to prevent eternal loops, I added exception count tracking, with
max_exceptionsconfigurable at Class instantiation time. The default is10. Also, while-1is still supported as a way to keep trying forever, no class defaults to a-1any longer. - Added methods to report (
exception_count_msg()) and check (too_many_exceptions()) when the total count of exceptions is exceeded. Raises new exceptionExceptionCountwhen the count is exceeded. - Added more exceptions and improved their utility.
- Added
EsWaitFatalwhich is only raised whenExceptionCountis raised. - Added discrete
EsWaitTimeoutinstead of using the builtinTimeoutError.
- Added
- Removed the
Index(health) class as it was basically doing the same thing theHealthclass was doing. - Moved health report logging functions to
utils.pyas they didn't need to be in the Class - Moved function
prettystrtoutils.pyas it is a utility function that didn't need to be in the base Class - Added a bunch of new unit tests and improved existing ones. First time I think I've ever had full code coverage (only skipping
__repr__and anytypinglines) in one of my modules with just unit tests. - Updated just about every docstring there was, and added more.
- Updated docs to include new methods and functions.
- Bumped
elasticsearch8version dependency to8.17.1 - Moved
tests/conftest.pytotests/integration/conftest.pyand commented every line out (it's unused, as yet) - Switched to using f-string formatting in logging.
- If you want to follow suit, you'll need to update your pylint args accordingly (to prevent warnings).
--disable=E1205,W1203
- If you want to follow suit, you'll need to update your pylint args accordingly (to prevent warnings).
- Added Python 3.13 support and
hatchmatrix tests.
I think that's just about it. Hopefully refactoring the other projects that use this module will go smoothly
0.9.4 (27 January 2025)
Changes
The extremely rapid retry interval used when running PII tool integration tests sometimes resulted in no ILM phase data returned by the client.ilm.explain_lifecycle() API call, which would cause tests to fail.
This has been addressed.
Tests are passing in the PII tool with Docker again.
And there was much rejoicing.
0.9.3 (27 January 2025)
Patch release addresses that the Task API is not yet GA and suppresses the warning that blocks execution.
--- a/src/es_wait/task.py
+++ b/src/es_wait/task.py
@@ -2,8 +2,10 @@
import typing as t
import logging
+import warnings
from time import localtime, strftime
from dotmap import DotMap # type: ignore
+from elasticsearch8.exceptions import GeneralAvailabilityWarning
from ._base import Waiter
if t.TYPE_CHECKING:
@@ -72,6 +74,10 @@ class Task(Waiter):
response = {}
try:
+ # The Tasks API is not yet GA. We need to suppress the warning for now.
+ # This is required after elasticsearch8>=8.16.0 as the warning is raised
+ # from that release onward.
+ warnings.filterwarnings("ignore", category=GeneralAvailabilityWarning)
response = dict(self.client.tasks.get(task_id=self.task_id))
except Exception as err:
msg = (0.9.2 (24 January 2025)
Patch release. A lot of typing corrections.
Allow ILM phase waiting to catch any phase "above" or beyond new if you specify new as the phase to watch for.
0.9.1 (30 September 2024)
Patch release. Removed 1 superfluous line of debug output.
Version bump elasticsearch8 to 8.15.1
Set optional es_client versions to same release
Added docker_tests/.kurl and http_ca.crt to .gitignore
All tests pass