-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#101193 Preserve Step Info Across ILM Auto Retries #113187
#101193 Preserve Step Info Across ILM Auto Retries #113187
Conversation
for any time based testing, this is the recommended method
Also refactor tests to newer style
Across auto retries
Documentation preview: |
Pinging @elastic/es-data-management (Team:Data Management) |
dca5328
to
940cee7
Compare
Hi @lukewhiting, I've created a changelog YAML for you. |
940cee7
to
14e3a7a
Compare
Hi @lukewhiting, I've updated the changelog YAML for you. |
This reverts commit 241074c.
…tep-info-missing-exception-info
…tep-info-missing-exception-info
Yep :-) I have linked it to this PR so GitHub should auto close it once it's merged but I'll make a note to double check |
…tep-info-missing-exception-info
Local functional testing complete. Method:
Test Output: {
"indices": {
"ilm-error-test-000001": {
"index": "ilm-error-test-000001",
"managed": true,
"policy": "365-days-default",
"index_creation_date_millis": 1727179631766,
"time_since_index_creation": "19.92m",
"lifecycle_date_millis": 1727179631766,
"age": "19.92m",
"phase": "hot",
"phase_time_millis": 1727180790334,
"action": "rollover",
"action_time_millis": 1727179631820,
"step": "check-rollover-ready",
"step_time_millis": 1727180790334,
"is_auto_retryable_error": true,
"failed_step_retry_count": 1,
"previous_step_info": {
"type": "illegal_argument_exception",
"reason": "index.lifecycle.rollover_alias [ilm-error-test] does not point to index [ilm-error-test-000001]"
},
"phase_execution": {
"policy": "365-days-default",
"phase_definition": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_age": "30d",
"max_primary_shard_docs": 200000000,
"min_docs": 1,
"max_primary_shard_size": "50gb"
}
}
},
"version": 1,
"modified_date_in_millis": 1727179591769
}
}
}
} |
…tep-info-missing-exception-info
@lukewhiting That functional test looks great! Well done! I think it would also be worthwhile to ensure the |
@lukewhiting nice work coming up with the test scenario!
I think this could be simplified in an java rest test for example:
It's very similar with what you have just a few less steps. Let me know if you want to work on it together. Nit: I think the |
…tep-info-missing-exception-info
@nielsbauman @gmarouli Integration test for new field added based on the above manual testing: 91dac7e |
…tep-info-missing-exception-info
.../ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/ExplainLifecycleIT.java
Outdated
Show resolved
Hide resolved
.../ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/ilm/ExplainLifecycleIT.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a minor comment but LGTM :)
…tep-info-missing-exception-info
💚 Backport successful
|
…3187) * Add new Previous Step Info field to LifecycleExecutionState * Add new field to IndexLifecycleExplainResponse * Add new field to TransportExplainLifecycleAction * Add logic to IndexLifecycleTransition to keep previous setp info * Switch tests to use Java standard Clock class for any time based testing, this is the recommended method * Fix tests for new field Also refactor tests to newer style * Add test to ensure step info is preserved Across auto retries * Add docs for new field * Changelog Entry * Update docs/changelog/113187.yaml * Revert "Switch tests to use Java standard Clock class" This reverts commit 241074c. * PR Changes * PR Changes - Improve docs wording Co-authored-by: Mary Gouseti <[email protected]> * Integration test for new ILM explain field * Use ROOT locale instead of default toLowerCase * PR Changes - Switch to block strings * Remove forbidden API usage --------- Co-authored-by: Mary Gouseti <[email protected]>
* Add new Previous Step Info field to LifecycleExecutionState * Add new field to IndexLifecycleExplainResponse * Add new field to TransportExplainLifecycleAction * Add logic to IndexLifecycleTransition to keep previous setp info * Switch tests to use Java standard Clock class for any time based testing, this is the recommended method * Fix tests for new field Also refactor tests to newer style * Add test to ensure step info is preserved Across auto retries * Add docs for new field * Changelog Entry * Update docs/changelog/113187.yaml * Revert "Switch tests to use Java standard Clock class" This reverts commit 241074c. * PR Changes * PR Changes - Improve docs wording * Integration test for new ILM explain field * Use ROOT locale instead of default toLowerCase * PR Changes - Switch to block strings * Remove forbidden API usage --------- Co-authored-by: Mary Gouseti <[email protected]>
…3187) * Add new Previous Step Info field to LifecycleExecutionState * Add new field to IndexLifecycleExplainResponse * Add new field to TransportExplainLifecycleAction * Add logic to IndexLifecycleTransition to keep previous setp info * Switch tests to use Java standard Clock class for any time based testing, this is the recommended method * Fix tests for new field Also refactor tests to newer style * Add test to ensure step info is preserved Across auto retries * Add docs for new field * Changelog Entry * Update docs/changelog/113187.yaml * Revert "Switch tests to use Java standard Clock class" This reverts commit 241074c. * PR Changes * PR Changes - Improve docs wording Co-authored-by: Mary Gouseti <[email protected]> * Integration test for new ILM explain field * Use ROOT locale instead of default toLowerCase * PR Changes - Switch to block strings * Remove forbidden API usage --------- Co-authored-by: Mary Gouseti <[email protected]>
This PR does a few things:
<target>/_ilm/explain
) calledprevious_step_info
that contains the previous step runsstep_info
field contentsBonus content includes:
Refactored test's to use recommendedReverted this as it's too risky / unrelated to PRClock
interface for time dependent tests rather than custom supplierCommits are atomic so feel free to review commit by commit if you prefer reviewing smaller chunks