Update ILM message for out of order phases error#75099
Update ILM message for out of order phases error#75099danhermann merged 10 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-core-features (Team:Core/Features) |
|
@elasticmachine ok to test |
|
I just realized I forgot to change a test in "org.elasticsearch.xpack.ilm.IndexLifecycleRestIT.test". Will correct it soon... |
|
@cjcenizal I am having a bit of trouble making the test case for the yml file To be honest i have no idea how to write yml test files. Would you help me out by giving a few hints or links? I am trying to write the correct catch element but i am not able to do so. Right now the statement looks like this:
|
|
@elasticmachine update branch |
|
@Esduard, you were close. That line needs to be:
It's a regex expression so the parentheses also need to be escaped. |
|
@elasticmachine ok to test |
| " [min_age] of [1d] for the [hot] phase, configuration: {cold=12h}")); | ||
| containsString("Your policy is configured to run the cold phase "+ | ||
| "(min_age: 12h) before the hot phase (min_age: 1d). You should change "+ | ||
| "the phase timing so that the phases will execute in the order of hot, warm then cold.")); |
There was a problem hiding this comment.
Minor nit: Can we add another comma after warm?
hot, warm, then cold
There was a problem hiding this comment.
Of course. It's a simple replace
|
Thanks @danhermann and @cjcenizal for the feedback! I managed to update the test with the correct regex. I also put the comma at the end of the error message. |
|
@elasticmachine update branch |
|
@danhermann I'm puzzled by this new error. Is it happening because the test executes code from another branch? |
Close, it's running with some nodes that are from a previous version. You'll need to temporarily disable that test by adding: to the bottom of the |
|
@elasticmachine update branch |
danhermann
left a comment
There was a problem hiding this comment.
@Esduard, this change looks pretty good. One thing I would suggest is a test case that has 3 or more phases with bad ages since it appears that all the current test cases have only 0, 1, or 2 phases with bad ages and there's different handling for the error message in the case of 3+.
|
@danhermann, that is a good idea. I will add this case test with 3+ bad ages as soon as I can. |
|
@danhermann I decided to add 2 test cases: One for 3 bad phases and another for 4. That way we have test cases for every possible ammount of bad phases. Maybe Its overkill. Feel free to remove one If you like. |
|
Thanks, @Esduard! This looks good. I'll get it merged and backported to the appropriate branches. |
Closes #70336. This new message is much more readable. One small inconvenience is that the frozen and delete phases are not metioned even though they are present in the tests. I mentioned only hot, warm and cold because they are the main page names for the "Hot-warm-cold" architecture.