Skip to content

[Lens][Embeddable] Make sure to not serialize searchSessionId#210765

Merged
dej611 merged 2 commits intoelastic:mainfrom
dej611:fix/sessionid-serialized
Feb 12, 2025
Merged

[Lens][Embeddable] Make sure to not serialize searchSessionId#210765
dej611 merged 2 commits intoelastic:mainfrom
dej611:fix/sessionid-serialized

Conversation

@dej611
Copy link
Copy Markdown
Contributor

@dej611 dej611 commented Feb 12, 2025

Summary

This PR fixes a regression in the serializeState function used to pass the embeddable attributes to the dashboard to save the panel. In the refactor this function started to leak the searchSessionId in the serialized state and even if not used after worse it could lead to issues and in general it's a waste of disk space.

Checklist

Release notes

It fixes a regression for the serialized state for the Lens embeddable saving attributes who should not be in the serialized state.

@dej611 dej611 added release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// Feature:Lens backport:prev-major labels Feb 12, 2025
@dej611 dej611 requested a review from a team as a code owner February 12, 2025 10:02
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

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
lens 1.6MB 1.6MB +104.0B
Unknown metric groups

References to deprecated APIs

id before after diff
lens 88 90 +2

@dej611 dej611 self-assigned this Feb 12, 2025
@dej611 dej611 merged commit ab414b4 into elastic:main Feb 12, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 8.16, 8.17, 8.18, 8.x

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

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 12, 2025
…c#210765)

## Summary

This PR fixes a regression in the `serializeState` function used to pass
the embeddable attributes to the dashboard to save the panel. In the
refactor this function started to leak the `searchSessionId` in the
serialized state and even if not used after worse it could lead to
issues and in general it's a waste of disk space.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

## Release notes
It fixes a regression for the serialized state for the Lens embeddable
saving attributes who should not be in the serialized state.

(cherry picked from commit ab414b4)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 12, 2025
…c#210765)

## Summary

This PR fixes a regression in the `serializeState` function used to pass
the embeddable attributes to the dashboard to save the panel. In the
refactor this function started to leak the `searchSessionId` in the
serialized state and even if not used after worse it could lead to
issues and in general it's a waste of disk space.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

## Release notes
It fixes a regression for the serialized state for the Lens embeddable
saving attributes who should not be in the serialized state.

(cherry picked from commit ab414b4)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
8.16 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.16:
- [Response Ops][Cases] Cases with empty string assignees throwing error (#209973)
8.17 Backport failed because of merge conflicts

You might need to backport the following PRs to 8.17:
- [EDR Workflows] Unskip uninstall_agent_from_host.cy.ts (#210348)
- [Automatic Import] Fix package name validation (#210770)
- Update Logs Explorer deprecation messages (#201307)
8.18
8.x

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

Manual backport

To create the backport manually run:

node scripts/backport --pr 210765

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 12, 2025
…210765) (#210873)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Lens][Embeddable] Make sure to not serialize searchSessionId
(#210765)](#210765)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-12T15:59:47Z","message":"[Lens][Embeddable]
Make sure to not serialize searchSessionId (#210765)\n\n##
Summary\n\nThis PR fixes a regression in the `serializeState` function
used to pass\nthe embeddable attributes to the dashboard to save the
panel. In the\nrefactor this function started to leak the
`searchSessionId` in the\nserialized state and even if not used after
worse it could lead to\nissues and in general it's a waste of disk
space.\n\n\n### Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n\n## Release
notes\nIt fixes a regression for the serialized state for the Lens
embeddable\nsaving attributes who should not be in the serialized
state.","sha":"ab414b4effbb5e6892bf09bf9f22ccbae37d9554","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:prev-major","v9.1.0"],"title":"[Lens][Embeddable]
Make sure to not serialize
searchSessionId","number":210765,"url":"https://github.com/elastic/kibana/pull/210765","mergeCommit":{"message":"[Lens][Embeddable]
Make sure to not serialize searchSessionId (#210765)\n\n##
Summary\n\nThis PR fixes a regression in the `serializeState` function
used to pass\nthe embeddable attributes to the dashboard to save the
panel. In the\nrefactor this function started to leak the
`searchSessionId` in the\nserialized state and even if not used after
worse it could lead to\nissues and in general it's a waste of disk
space.\n\n\n### Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n\n## Release
notes\nIt fixes a regression for the serialized state for the Lens
embeddable\nsaving attributes who should not be in the serialized
state.","sha":"ab414b4effbb5e6892bf09bf9f22ccbae37d9554"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210765","number":210765,"mergeCommit":{"message":"[Lens][Embeddable]
Make sure to not serialize searchSessionId (#210765)\n\n##
Summary\n\nThis PR fixes a regression in the `serializeState` function
used to pass\nthe embeddable attributes to the dashboard to save the
panel. In the\nrefactor this function started to leak the
`searchSessionId` in the\nserialized state and even if not used after
worse it could lead to\nissues and in general it's a waste of disk
space.\n\n\n### Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n\n## Release
notes\nIt fixes a regression for the serialized state for the Lens
embeddable\nsaving attributes who should not be in the serialized
state.","sha":"ab414b4effbb5e6892bf09bf9f22ccbae37d9554"}}]}]
BACKPORT-->

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
kibanamachine added a commit that referenced this pull request Feb 12, 2025
…210765) (#210872)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Lens][Embeddable] Make sure to not serialize searchSessionId
(#210765)](#210765)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-12T15:59:47Z","message":"[Lens][Embeddable]
Make sure to not serialize searchSessionId (#210765)\n\n##
Summary\n\nThis PR fixes a regression in the `serializeState` function
used to pass\nthe embeddable attributes to the dashboard to save the
panel. In the\nrefactor this function started to leak the
`searchSessionId` in the\nserialized state and even if not used after
worse it could lead to\nissues and in general it's a waste of disk
space.\n\n\n### Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n\n## Release
notes\nIt fixes a regression for the serialized state for the Lens
embeddable\nsaving attributes who should not be in the serialized
state.","sha":"ab414b4effbb5e6892bf09bf9f22ccbae37d9554","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","Feature:Lens","backport:prev-major","v9.1.0"],"title":"[Lens][Embeddable]
Make sure to not serialize
searchSessionId","number":210765,"url":"https://github.com/elastic/kibana/pull/210765","mergeCommit":{"message":"[Lens][Embeddable]
Make sure to not serialize searchSessionId (#210765)\n\n##
Summary\n\nThis PR fixes a regression in the `serializeState` function
used to pass\nthe embeddable attributes to the dashboard to save the
panel. In the\nrefactor this function started to leak the
`searchSessionId` in the\nserialized state and even if not used after
worse it could lead to\nissues and in general it's a waste of disk
space.\n\n\n### Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n\n## Release
notes\nIt fixes a regression for the serialized state for the Lens
embeddable\nsaving attributes who should not be in the serialized
state.","sha":"ab414b4effbb5e6892bf09bf9f22ccbae37d9554"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210765","number":210765,"mergeCommit":{"message":"[Lens][Embeddable]
Make sure to not serialize searchSessionId (#210765)\n\n##
Summary\n\nThis PR fixes a regression in the `serializeState` function
used to pass\nthe embeddable attributes to the dashboard to save the
panel. In the\nrefactor this function started to leak the
`searchSessionId` in the\nserialized state and even if not used after
worse it could lead to\nissues and in general it's a waste of disk
space.\n\n\n### Checklist\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common scenarios\n\n## Release
notes\nIt fixes a regression for the serialized state for the Lens
embeddable\nsaving attributes who should not be in the serialized
state.","sha":"ab414b4effbb5e6892bf09bf9f22ccbae37d9554"}}]}]
BACKPORT-->

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Lens release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.18.0 v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants