-
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
[Event Log] Fixing call to update index alias to hidden #122882
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
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.
Changes LGTM! I was able to reproduce the bug on main
and confirmed it going away with this PR 👍
@elasticmachine merge upstream |
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.
LGTM; this was more complicated than I expected - I thought we just needed an await
before all the asyncForEach()
that got added a while back! This is probably a better approach though, get them all done in one call.
💚 Build Succeeded
Metrics [docs]Public APIs missing exports
History
To update your PR or re-run it, just comment with: cc @ymao1 |
💔 All backports failed
How to fixRe-run the backport manually:
Questions ?Please refer to the Backport tool documentation |
* Adding await * Changing the way alias updates are made * Updating unit tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit bd57aa5) # Conflicts: # x-pack/plugins/event_log/server/es/init.ts
* Adding await * Changing the way alias updates are made * Updating unit tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit bd57aa5) # Conflicts: # x-pack/plugins/event_log/server/es/init.ts
… (#123237) * [Event Log] Fixing call to update index alias to hidden (#122882) * Adding await * Changing the way alias updates are made * Updating unit tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit bd57aa5) # Conflicts: # x-pack/plugins/event_log/server/es/init.ts * Fixing types check
Resolves #121298
Summary
When upgrading from <= 7.15 versions of Kibana, the event log will try to update existing event log indices to
hidden
. Part of this process involves setting existing index aliases tois_hidden
. It turns out if you have one alias pointing to multiple indices, we need to update the alias settings in a single command instead of consecutive commands as we were doing previously.For example, if our 7.15 event log aliases look like this:
Previously, we were issuing 3 calls to the update alias API, each one looking like this:
We actually need to be issuing 1 call to the update alias API that looks like this:
This PR updates to do this correctly.
To Verify
main
using the previous data and notice that there is an error in the logs when updating the index aliases that cause the aliases not to get updated tohidden
.Checklist