[Index Management] Fix error on index lifecycle summary tab#246606
Conversation
|
Pinging @elastic/kibana-management (Team:Kibana Management) |
|
Thanks for working on this @damian-polewski! I noticed the card doesn't seem to load properly unless the page is reloaded: Screen.Recording.2025-12-16.at.17.22.18.movHere is how it was in 9.2: 9.2.mov |
|
/ci |
ElenaStoeva
left a comment
There was a problem hiding this comment.
Approving so that at least we fix the broken page. I also tested in the cloud deployment and it works perfectly fine there (no delays in loading the tab), so it seems the delay problem is on prem only.
|
@elasticmachine run docs-build |
…ecycle_summary_tab
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Public APIs missing comments
Page load bundle
History
|
|
Starting backport for target branches: 8.19, 9.1, 9.2, 9.3 https://github.com/elastic/kibana/actions/runs/20336732642 |
…246606) ## Summary Closes elastic#246573 This PR fixes an issue where the IndexLifecycleSummary component was passed directly to renderTabContent instead of being wrapped in an arrow function. When PR elastic#240978 introduced the `usePhaseColors()` hook, this broke the Index Lifecycle tab because `renderTabContent` is called as a plain function in `details_page_tab.tsx`: ``` selectedTab.renderTabContent({ index, getUrlForApp, euiTheme })> ``` Because of this hook wasn't getting called during proper React rendering causing "Invalid hook call" errors. (cherry picked from commit df6ae8b)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
…46606) (#246869) # Backport This will backport the following commits from `main` to `9.3`: - [[Index Management] Fix error on index lifecycle summary tab (#246606)](#246606) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Damian Polewski","email":"125268832+damian-polewski@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-12-18T12:19:51Z","message":"[Index Management] Fix error on index lifecycle summary tab (#246606)\n\n## Summary\n\nCloses #246573\n\nThis PR fixes an issue where the IndexLifecycleSummary component was\npassed directly to renderTabContent instead of being wrapped in an arrow\nfunction.\n\nWhen PR #240978 introduced the `usePhaseColors()` hook, this broke the\nIndex Lifecycle tab because `renderTabContent` is called as a plain\nfunction in `details_page_tab.tsx`:\n\n```\nselectedTab.renderTabContent({ index, getUrlForApp, euiTheme })>\n```\n\nBecause of this hook wasn't getting called during proper React rendering\ncausing \"Invalid hook call\" errors.","sha":"df6ae8bdb176a8d3529f7437820edd4d0f50a07a","branchLabelMapping":{"^v9.4.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Index Management","Team:Kibana Management","release_note:skip","backport:all-open","ci:cloud-deploy","v9.4.0"],"title":"[Index Management] Fix error on index lifecycle summary tab","number":246606,"url":"https://github.com/elastic/kibana/pull/246606","mergeCommit":{"message":"[Index Management] Fix error on index lifecycle summary tab (#246606)\n\n## Summary\n\nCloses #246573\n\nThis PR fixes an issue where the IndexLifecycleSummary component was\npassed directly to renderTabContent instead of being wrapped in an arrow\nfunction.\n\nWhen PR #240978 introduced the `usePhaseColors()` hook, this broke the\nIndex Lifecycle tab because `renderTabContent` is called as a plain\nfunction in `details_page_tab.tsx`:\n\n```\nselectedTab.renderTabContent({ index, getUrlForApp, euiTheme })>\n```\n\nBecause of this hook wasn't getting called during proper React rendering\ncausing \"Invalid hook call\" errors.","sha":"df6ae8bdb176a8d3529f7437820edd4d0f50a07a"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.4.0","branchLabelMappingKey":"^v9.4.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/246606","number":246606,"mergeCommit":{"message":"[Index Management] Fix error on index lifecycle summary tab (#246606)\n\n## Summary\n\nCloses #246573\n\nThis PR fixes an issue where the IndexLifecycleSummary component was\npassed directly to renderTabContent instead of being wrapped in an arrow\nfunction.\n\nWhen PR #240978 introduced the `usePhaseColors()` hook, this broke the\nIndex Lifecycle tab because `renderTabContent` is called as a plain\nfunction in `details_page_tab.tsx`:\n\n```\nselectedTab.renderTabContent({ index, getUrlForApp, euiTheme })>\n```\n\nBecause of this hook wasn't getting called during proper React rendering\ncausing \"Invalid hook call\" errors.","sha":"df6ae8bdb176a8d3529f7437820edd4d0f50a07a"}}]}] BACKPORT--> Co-authored-by: Damian Polewski <125268832+damian-polewski@users.noreply.github.com>
Summary
Closes #246573
This PR fixes an issue where the IndexLifecycleSummary component was passed directly to renderTabContent instead of being wrapped in an arrow function.
When PR #240978 introduced the
usePhaseColors()hook, this broke the Index Lifecycle tab becauserenderTabContentis called as a plain function indetails_page_tab.tsx:Because of this hook wasn't getting called during proper React rendering causing "Invalid hook call" errors.
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.