Skip to content

Commit

Permalink
Release prep for 8.0.17 (#1729)
Browse files Browse the repository at this point in the history
Update Changelog
Fix #1727
Add tests to confirm fix
Update some code formatting issues brought up by Black and Pylint
Version bumps everywhere needed for Docs
  • Loading branch information
untergeek authored Oct 26, 2024
1 parent 265ac48 commit d80a7a5
Show file tree
Hide file tree
Showing 9 changed files with 1,440 additions and 563 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG PYVER=3.11.9
ARG ALPTAG=3.20@sha256:0a4eaa0eecf5f8c050e5bba433f58c052be7587ee8af3e8b3910ef9ab5fbe9f5
ARG ALPTAG=3.20
FROM python:${PYVER}-alpine${ALPTAG} as builder

# Add the community repo for access to patchelf binary package
Expand Down
6 changes: 5 additions & 1 deletion curator/helpers/date_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ def get_epoch(self, searchme):
:returns: The epoch timestamp extracted from ``searchme`` by regex matching
against :py:attr:`pattern`
:rtype: int
:rtype: int or None
"""
match = self.pattern.search(searchme)
if match:
if match.group("date"):
timestamp = match.group("date")
return datetime_to_epoch(get_datetime(timestamp, self.timestring))
return None
return None


def absolute_date_range(
Expand Down Expand Up @@ -161,6 +163,8 @@ def date_range(unit, range_from, range_to, epoch=None, week_starts_on='sunday'):
:rtype: tuple
"""
logger = logging.getLogger(__name__)
start_date = None
start_delta = None
acceptable_units = ['hours', 'days', 'weeks', 'months', 'years']
if unit not in acceptable_units:
raise ConfigurationError(f'"unit" must be one of: {acceptable_units}')
Expand Down
881 changes: 563 additions & 318 deletions curator/indexlist.py

Large diffs are not rendered by default.

18 changes: 16 additions & 2 deletions docs/Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,25 @@
Changelog
=========

8.0.17 (? ? ?)
--------------
8.0.17 (25 October 2024)
------------------------

**Bugfix**

* Reported in #1727 (and I'm relieved that nobody got bit by this sooner), A
serious bug was found where if using the ``age`` filter while deriving the
age from the index name, it was erroneously ignoring any index that did not
have a matching ``timestring`` pattern, which would leave a default epoch
time of ``0``, which would definitely be older than your cutoff date! As a
result, indices were matched and deleted that should not have been.

The fix is to remove indices that do not match the pattern in the
``_get_name_based_ages`` method. The patch is in this release, as are updated
tests to replicate the failure scenario. Hat tip to @giom-l for reporting this.

**Changes**

* Update to use ``es_client==8.15.2``.
* Update data node detection to include ``data``, ``data_content``, ``data_hot``,
and ``data_warm`` for ``shrink`` action. This was first raised in #1621, but
needed to go further than just adding ``data_hot``. Hat tip to @gnobironts for
Expand Down
2 changes: 1 addition & 1 deletion docs/asciidoc/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:curator_version: 8.0.17
:curator_major: 8
:curator_doc_tree: 8.0
:es_py_version: 8.15.0
:es_py_version: 8.15.1
:es_doc_tree: 8.15
:stack_doc_tree: 8.15
:pybuild_ver: 3.11.9
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@

intersphinx_mapping = {
'python': ('https://docs.python.org/3.11', None),
'es_client': ('https://es-client.readthedocs.io/en/v8.15.0', None),
'elasticsearch8': ('https://elasticsearch-py.readthedocs.io/en/v8.15.0', None),
'es_client': ('https://es-client.readthedocs.io/en/v8.15.2', None),
'elasticsearch8': ('https://elasticsearch-py.readthedocs.io/en/v8.15.1', None),
'voluptuous': ('http://alecthomas.github.io/voluptuous/docs/_build/html', None),
'click': ('https://click.palletsprojects.com/en/8.1.x', None),
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ keywords = [
'index-expiry'
]
dependencies = [
"es_client==8.15.0"
"es_client==8.15.2"
]

[project.optional-dependencies]
Expand Down
Loading

0 comments on commit d80a7a5

Please sign in to comment.