Skip to content
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] Change default reindex flyout action based on index size #215302

Merged

Conversation

sabarasaba
Copy link
Member

@sabarasaba sabarasaba commented Mar 20, 2025

Closes: #211730

Summary

This PR changes the default action for reindexing (mark as read only and reindex) based on the size of the index. When it's larger than 1gb we recommend marking as read only, otherwise reindex.

NOTE: I've also added a recommended badge that is shown on either reindex or mark as read only based on the index size.

NOTE: This PR also changes the color of secondary action for the reindexing flyout. Where it used to be red (signaling some sort of danger) and now its been made into a lighter blue:

// before
Screenshot 2025-03-20 at 11 36 44
// after
Screenshot 2025-03-20 at 11 37 49

Screenshots

Screenshot 2025-03-20 at 11 59 43
Screenshot 2025-03-20 at 11 58 15
Screenshot 2025-03-20 at 12 00 26

// Also for datastreams actions we change the CTA color from red to light blue
Screenshot 2025-03-20 at 14 31 33

@sabarasaba sabarasaba added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes Feature:Upgrade Assistant backport:version Backport to applied version labels v8.19.0 v8.18.1 labels Mar 20, 2025
@sabarasaba sabarasaba self-assigned this Mar 20, 2025
@elasticmachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps

History

cc @sabarasaba

@sabarasaba sabarasaba requested a review from a team March 20, 2025 13:47
@sabarasaba sabarasaba marked this pull request as ready for review March 20, 2025 13:52
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-management (Team:Kibana Management)

@sabarasaba
Copy link
Member Author

@elasticmachine merge upstream

@sabarasaba sabarasaba removed the request for review from kibanamachine March 20, 2025 13:55
Copy link
Contributor

@SoniaSanzV SoniaSanzV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm :), thank you @sabarasaba
(just a nit)

@@ -96,6 +97,13 @@ export const ReindexDetailsFlyoutStep: React.FunctionComponent<{
showDefaultGuidance = true;
}

// Determine if the index is larger than 1GB
const isLargeIndex = indexSizeInBytes > 1073741824;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: for readability reasons, I would add 1073741824 to a constant to be able to compare const isLargeIndex = indexSizeInBytes > ONE_GB;
In any case, with the comment it is also clear.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The thing is that if that value changes later we also need to rename the const. I think I'll leave as is for now 😅

@sabarasaba sabarasaba merged commit fcf3a3e into elastic:8.x Mar 21, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Upgrade Assistant release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v8.18.1 v8.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants