[ILM] Add "wait for snapshot" policy field to Delete phase#68505
[ILM] Add "wait for snapshot" policy field to Delete phase#68505yuliacech merged 4 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
|
As suggested by Alison, I'll be adding some tests to verify payload data. |
cjcenizal
left a comment
There was a problem hiding this comment.
Tested locally, code LGTM! Great work Yulia. I'll review again after you've added tests.
I tested this by creating an ILM policy via the UI that resulted in this configuration:
{
"policy": {
"phases": {
"hot": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_age": "100s",
"max_size": "50gb",
"max_docs": 1
},
"set_priority": {
"priority": 100
}
}
},
"delete": {
"min_age": "0d",
"actions": {
"wait_for_snapshot": {
"policy": "test"
},
"delete": {
"delete_searchable_snapshot": true
}
}
}
}
}
}Then I created a policy that would snapshot everything and set it to execute in a couple of minutes (a little tricky because it shows timing according to GMT instead of my local timezone).
Then I followed the other quick-test steps from the ILM README to associate my policy with an index.
In a couple minutes, the snapshot was taken and then index was deleted as expected.
|
@elasticmachine merge upstream |
|
Hey team, |
cjcenizal
left a comment
There was a problem hiding this comment.
Tests LGTM! Thanks for adding those!
|
The failing tests look unrelated to these changes. I don't see master failing CI so I'd try merging in the last version of |
|
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* master: (38 commits) Support migrating from reserved feature privileges (elastic#68504) add `preference` field to SavedObjectsFindOptions (elastic#68620) [ILM] Add "wait for snapshot" policy field to Delete phase (elastic#68505) Cleanup old license overwrites (elastic#68744) Bump TypeScript to v3.9 (elastic#67666) [APM] Service maps - adds new storybook stories to test out various data sets (elastic#68727) Fix vega specification parsing (elastic#67963) docs: add more api information (elastic#68717) [APM] Don't show annotations on charts with no data (elastic#68829) [Metrics UI] Fix Inventory View sorting by handling null values (elastic#67889) skip flaky suite (elastic#68836) [SIEM][Detections Engine] - Fix reference rule url overflow (elastic#68640) Index pattern public api => common (elastic#68289) [APM] Lazy-load alert triggers (elastic#68806) [DOCS] Fix table formatting in ingest manager settings (elastic#68824) [Endpoint] Functional Tests cleanup (elastic#68756) revert previous commit which was unintentional Use Github token instead for project assignments [SIEM][Exceptions] - ExceptionsViewer cleanup (elastic#68739) move @kbn/storybook to devDeps (elastic#68791) ...
…8505) * [ILM] Add "wait for snapshot" text field to edit policy form (Delete phase) * [ILM] Add jest client integration tests for delete phase Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…68892) * [ILM] Add "wait for snapshot" text field to edit policy form (Delete phase) * [ILM] Add jest client integration tests for delete phase Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
This PR adds a text field for "wait for snapshot policy" in Delete phase of an index lifecycle policy.

How to test
max_docs: 1).Expand for console commands
(when running
yarn esyou need to add-E path.repo=./my_repo_testto be able to create a repository)(index to be backed up
test-*, snapshots created once a year and deleted after 10 min)(rollover after 1 doc, delete after
my_snapshot_policycreated a snapshot).(update lifecycle poll interval)
Release Note
We added a snapshot policy name field to Delete phase of index lifecycle policy. This option ensures that the snapshot policy is executed before the managed index is deleted.