-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[UA] Use new _create_from
ES API
#207114
[UA] Use new _create_from
ES API
#207114
Conversation
@jloleysens, we can't use this API because it copies settings such as write blocks and frozen flags.
Nvm! I found out that ES sets a few known settings to I've applied the same approach here. |
I think we should check with the ES team, I would have expected their API to take care of removing these settings |
Pinging @elastic/kibana-core (Team:Core) |
💚 Build Succeeded
Metrics [docs]
History
cc @afharo |
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.
Did not test locally, but the code changes LGTM. Approving to unblock progress.
We are still awaiting confirmation from ES (whether they will default remove write block settings), but, my 2c, I don't think we need to block this PR. We can remove our overrides/comments in a follow up if they turn out to be the defaults, otherwise we got confirmation that this is the right approach. In the meantime we can exercise the _create_from
flow. Up to you though @afharo !
body: { | ||
// Settings overrides copied from ES datastream reindex logic | ||
// https://github.com/elastic/elasticsearch/blob/9c0709f386fee4154e930cb61a02868adebe8572/x-pack/plugin/migrate/src/main/java/org/elasticsearch/xpack/migrate/action/ReindexDataStreamIndexTransportAction.java#L195-L210 | ||
settings_override: { |
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.
I know this is a little less than ideal, the current design of this API does not allow another option. Thanks for making the link explicit in code!
@@ -125,63 +113,3 @@ export const getReindexWarnings = (flatSettings: FlatSettings): ReindexWarning[] | |||
|
|||
return warnings; |
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.
Not necessarily related to this PR, but I thought the above "deprecated setting detection" logic could also be avoided. Perhaps it's a holdover from 7 🤷🏻 ?
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.
good point! I'll remove it as well.
EDIT: Actually... I was reading the logic wrong... in line 1118, we apply the filter of the current version being 8. If we backport this PR (which we should( and remove that piece of logic, we're removing a check in the current version.
I'd err on the conservative side here and keep it for now until we confirm that all the deprecated settings addressed in getDeprecatedSettingWarning
are actually v7-specific.
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/12883953447 |
(cherry picked from commit fb8a17b)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[UA] Use new `_create_from` ES API (#207114)](#207114) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alejandro Fernández Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2025-01-21T09:29:51Z","message":"[UA] Use new `_create_from` ES API (#207114)","sha":"fb8a17ba04f493cd5a0d0ba33c002750150fd0af","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:prev-minor"],"title":"[UA] Use new `_create_from` ES API","number":207114,"url":"https://github.com/elastic/kibana/pull/207114","mergeCommit":{"message":"[UA] Use new `_create_from` ES API (#207114)","sha":"fb8a17ba04f493cd5a0d0ba33c002750150fd0af"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207114","number":207114,"mergeCommit":{"message":"[UA] Use new `_create_from` ES API (#207114)","sha":"fb8a17ba04f493cd5a0d0ba33c002750150fd0af"}}]}] BACKPORT--> Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Summary
Resolves #205941.
Checklist