Skip to content

[Upgrade Assistant] Fix uniq keys bug in ES deprecations table#227416

Merged
sabarasaba merged 4 commits intoelastic:mainfrom
sabarasaba:ua-fix_uniq_keys_bug
Jul 14, 2025
Merged

[Upgrade Assistant] Fix uniq keys bug in ES deprecations table#227416
sabarasaba merged 4 commits intoelastic:mainfrom
sabarasaba:ua-fix_uniq_keys_bug

Conversation

@sabarasaba
Copy link
Copy Markdown
Member

@sabarasaba sabarasaba commented Jul 10, 2025

Fixes: #227291

Summary

The issue was that the row keys are being generated using the visible array index (0-based for each page), resulting in duplicate keys like deprecation-row-0 appearing on every page. This caused React to incorrectly reuse component instances when navigating between pages.

The fix calculates an absolute index by adding the pager's firstItemIndex to the current row index, ensuring unique keys across all pages (e.g., page 1 has keys 0-49, page 2 has keys 50-99). This prevents React from confusing components between pages and ensures that actions like reindexing only affect the correct deprecation item.

@sabarasaba sabarasaba self-assigned this Jul 10, 2025
@sabarasaba sabarasaba added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t// 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.4 labels Jul 10, 2025
@sabarasaba sabarasaba marked this pull request as ready for review July 10, 2025 13:19
@sabarasaba sabarasaba requested a review from a team as a code owner July 10, 2025 13:19
@elasticmachine
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

@damian-polewski damian-polewski left a comment

Choose a reason for hiding this comment

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

Tested locally and everything works as expected, LGTM!

@sabarasaba
Copy link
Copy Markdown
Member Author

@elasticmachine merge upstream

@sabarasaba sabarasaba enabled auto-merge (squash) July 14, 2025 09:33
@sabarasaba sabarasaba merged commit 769404b into elastic:main Jul 14, 2025
12 of 13 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.18, 8.19

https://github.com/elastic/kibana/actions/runs/16265803358

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #78 / ESQL execution logic API @ess @serverless ES|QL rule type should generate 1 alert with during actual rule execution

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
upgradeAssistant 203.7KB 203.7KB +35.0B

History

cc @sabarasaba

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
8.18 Backport failed because of merge conflicts
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 227416

Questions ?

Please refer to the Backport tool documentation

@sabarasaba
Copy link
Copy Markdown
Member Author

💚 All backports created successfully

Status Branch Result
8.18

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

sabarasaba added a commit to sabarasaba/kibana that referenced this pull request Jul 14, 2025
…ic#227416)

(cherry picked from commit 769404b)

# Conflicts:
#	x-pack/platform/plugins/private/upgrade_assistant/public/application/components/es_deprecations/es_deprecations_table.tsx
kibanamachine added a commit that referenced this pull request Jul 14, 2025
…#227416) (#227802)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Upgrade Assistant] Fix uniq keys bug in ES deprecations table
(#227416)](#227416)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Ignacio
Rivas","email":"rivasign@gmail.com"},"sourceCommit":{"committedDate":"2025-07-14T11:37:22Z","message":"[Upgrade
Assistant] Fix uniq keys bug in ES deprecations table
(#227416)","sha":"769404bd4ac35f1d38b6b2bf8dc0f56a43cb4533","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana
Management","release_note:skip","Feature:Upgrade
Assistant","backport:version","v8.19.0","v9.2.0","v8.18.4"],"title":"[Upgrade
Assistant] Fix uniq keys bug in ES deprecations
table","number":227416,"url":"https://github.com/elastic/kibana/pull/227416","mergeCommit":{"message":"[Upgrade
Assistant] Fix uniq keys bug in ES deprecations table
(#227416)","sha":"769404bd4ac35f1d38b6b2bf8dc0f56a43cb4533"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18"],"targetPullRequestStates":[{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227416","number":227416,"mergeCommit":{"message":"[Upgrade
Assistant] Fix uniq keys bug in ES deprecations table
(#227416)","sha":"769404bd4ac35f1d38b6b2bf8dc0f56a43cb4533"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Ignacio Rivas <rivasign@gmail.com>
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jul 15, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @sabarasaba

@kibanamachine
Copy link
Copy Markdown
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @sabarasaba

sabarasaba added a commit that referenced this pull request Jul 16, 2025
…#227416) (#227806)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Upgrade Assistant] Fix uniq keys bug in ES deprecations table
(#227416)](#227416)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Ignacio
Rivas","email":"rivasign@gmail.com"},"sourceCommit":{"committedDate":"2025-07-14T11:37:22Z","message":"[Upgrade
Assistant] Fix uniq keys bug in ES deprecations table
(#227416)","sha":"769404bd4ac35f1d38b6b2bf8dc0f56a43cb4533","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana
Management","release_note:skip","Feature:Upgrade
Assistant","backport:version","v8.19.0","v9.2.0","v8.18.4"],"title":"[Upgrade
Assistant] Fix uniq keys bug in ES deprecations
table","number":227416,"url":"https://github.com/elastic/kibana/pull/227416","mergeCommit":{"message":"[Upgrade
Assistant] Fix uniq keys bug in ES deprecations table
(#227416)","sha":"769404bd4ac35f1d38b6b2bf8dc0f56a43cb4533"}},"sourceBranch":"main","suggestedTargetBranches":["8.18"],"targetPullRequestStates":[{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/227802","number":227802,"state":"OPEN"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/227416","number":227416,"mergeCommit":{"message":"[Upgrade
Assistant] Fix uniq keys bug in ES deprecations table
(#227416)","sha":"769404bd4ac35f1d38b6b2bf8dc0f56a43cb4533"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jul 16, 2025
@sabarasaba sabarasaba added backport:skip This PR does not require backporting and removed backport:version Backport to applied version labels labels Jul 22, 2025
Bluefinger pushed a commit to Bluefinger/kibana that referenced this pull request Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting 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 t// v8.18.4 v8.19.0 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Upgrade Assistant] Incorrectly updating issues that don't exist on the page.

4 participants