elastic / elastic/curator

Curator failing silently with invalid yaml

Open
#1,504 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
3.1k
Forks
627
PR merge metrics
No merged PRs in 30d

Description

I'm using curator 5.8.1.

I tried using the following yaml file:
```
---
actions:

1:
action: delete_indices
description: >-
Delete indices older than 180 days.
options:
disable_action: False
ignore_empty_list: True
timeout_override:
continue_if_exception: False,
filters:
- filtertype: age
source: creation_date
direction: older
unit: days
unit_count: 180
exclude: False
```

It's wrong, look at the comma after the 'continue_if_exception'.
But curator fails silently on it:

```
2020-01-24 11:08:02,962 DEBUG curator.cli run:110 Client and logging options validated.
2020-01-24 11:08:02,962 DEBUG curator.cli run:114 default_timeout = 30
2020-01-24 11:08:02,962 DEBUG curator.cli run:118 action_file: /tmp/infsec.yaml
```

A error message should be returned.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the YAML shown in the issue and start from the curator.cli run path, where the logs stop after the action_file is reported. Trace how the action file is parsed and validated, then verify that malformed YAML produces a visible error instead of ending silently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.