Skip to content

Commit 31148f0

Browse files
committed
Merge branch '8.x' into 8.0
2 parents a127638 + dd234c7 commit 31148f0

File tree

16 files changed

+122
-521
lines changed

16 files changed

+122
-521
lines changed

.github/workflows/docs-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: docs-build
22

33
on:
4+
workflow_dispatch: ~
45
push:
56
branches:
6-
- main
7+
- master
78
pull_request_target: ~
89
merge_group: ~
910

curator/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Curator Version"""
22

3-
__version__ = '8.0.20'
3+
__version__ = '8.0.21'

curator/cli_singletons/alias.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Alias Singleton"""
22

3+
# pylint: disable=R0913,R0917
34
import logging
45
import click
56
from curator.cli_singletons.object_class import CLIAction

curator/cli_singletons/delete.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
"""Delete Index and Delete Snapshot Singletons"""
22

3+
# pylint: disable=R0913,R0917
34
import click
45
from curator.cli_singletons.object_class import CLIAction
56
from curator.cli_singletons.utils import validate_filter_json
67

7-
# pylint: disable=R0913
8-
98

109
# Indices
1110
@click.command()

curator/cli_singletons/forcemerge.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""ForceMerge Singleton"""
22

3+
# pylint: disable=R0913,R0917
34
import click
45
from curator.cli_singletons.object_class import CLIAction
56
from curator.cli_singletons.utils import validate_filter_json

curator/cli_singletons/object_class.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Object builder"""
22

3+
# pylint: disable=W0718,R0902,R0912,R0913,R0914,R0917
34
import logging
45
import sys
56
from voluptuous import Schema
@@ -261,10 +262,15 @@ def do_singleton_action(self, dry_run=False):
261262
action_obj.do_dry_run()
262263
else:
263264
action_obj.do_action()
264-
# pylint: disable=broad-except
265+
except NoIndices: # Speficically to address #1704
266+
if not self.ignore:
267+
self.logger.critical('No indices in list after filtering. Exiting.')
268+
sys.exit(1)
269+
self.logger.info('No indices in list after filtering. Skipping action.')
265270
except Exception as exc:
266271
self.logger.critical(
267-
'Failed to complete action: %s. %s: %s', self.action, type(exc), exc
272+
'Failed to complete action: %s. Exception: %s', self.action, exc
268273
)
269274
sys.exit(1)
270275
self.logger.info('"%s" action completed.', self.action)
276+
sys.exit(0)

curator/indexlist.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Index List Class"""
22

3+
# pylint: disable=R0904,R0913,R0917
34
import re
45
import itertools
56
import logging
@@ -449,7 +450,9 @@ def empty_list_check(self):
449450
"""Raise :py:exc:`~.curator.exceptions.NoIndices` if ``indices`` is empty"""
450451
self.loggit.debug('Checking for empty list')
451452
if not self.indices:
452-
raise NoIndices('index_list object is empty.')
453+
msg = 'IndexList object is empty. No indices to act on.'
454+
self.loggit.debug(msg)
455+
raise NoIndices(msg)
453456

454457
def working_list(self):
455458
"""

docs/Changelog.rst

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,24 @@
33
Changelog
44
=========
55

6-
(8.0.20) (21 March 2025)
7-
------------------------
6+
8.0.21 (1 April 2025)
7+
---------------------
8+
9+
**Bugfix Release**
10+
11+
As was reported in #1704, the ``--ignore_empty_list`` option was not being respected.
12+
Code changes were made to each singleton that uses the ``--ignore_empty_list`` option
13+
to ensure that the option is respected.
14+
15+
**Changes**
16+
17+
* Fix ``--ignore_empty_list`` option to be respected in all singletons.
18+
* Add debug message to IndexList class when an empty list condition is encountered.
19+
* Dependency version bump: ``es_client`` to ``8.17.5``
20+
21+
22+
8.0.20 (21 March 2025)
23+
----------------------
824

925
**Patch Release**
1026

@@ -29,8 +45,8 @@ as expected before this release.
2945
* Update asciidoc files to reflect the new version numbers.
3046

3147

32-
(8.0.19) (5 March 2025)
33-
-----------------------
48+
8.0.19 (5 March 2025)
49+
---------------------
3450

3551
**Announcement**
3652

docs/asciidoc/ilm.asciidoc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,15 @@ Read more about Filebeat and ILM {fbref}/ilm.html[here].
5959
NOTE: The Index Lifecycle Management feature requires version 9.3.1 or higher of the
6060
`logstash-output-elasticsearch` plugin.
6161

62-
Logstash can use {esref}/index-lifecycle-management.html[Index Lifecycle Management]
62+
Logstash can use [Index Lifecycle Management](docs-content://manage-data/lifecycle/index-lifecycle-management/index-lifecycle.md)
6363
to automate the management of indices over time.
6464

6565
The use of Index Lifecycle Management is controlled by the `ilm_enabled` setting. By
6666
default, this will automatically detect whether the Elasticsearch instance
6767
supports ILM, and will use it if it is available. `ilm_enabled` can also be set to
6868
`true` or `false` to override the automatic detection, or disable ILM.
6969

70-
Read more about Logstash and ILM
71-
{lsref}/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-ilm[here].
70+
Read more about [Logstash and ILM](logstash-docs-md://lsr/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-ilm).
7271

7372

7473
[[ilm-and-curator]]

0 commit comments

Comments
 (0)