[Background search] Restore unsaved dashboards#240067
[Background search] Restore unsaved dashboards#240067AlexGPlay merged 2 commits intoelastic:mainfrom
Conversation
02d209c to
322b77c
Compare
|
I don't have any context on why we weren't storing this panels/references when the dashboard wasn't saved so happy to get input here - if we are happy with this I can add a couple of functional tests for the scenarios in the videos |
|
Pinging @elastic/kibana-data-discovery (Team:DataDiscovery) |
|
dear @nreese it seems this code @AlexGPlay is now working on was changed in #224314, so would the given change be in conflict with this PR, could you provide some context, thx! |
Before #224314, see image below, search session state was also not containing panels when savedObjectId was not provided. So these changes do not conflict with changes from #224314. I am not sure why the savedObjectId check was originally added. Maybe @ThomThomson can provide more context?
|
|
I don't have any context on this. It seems to me that is incorrect behaviour - when there is no saved object ID, we require the panels information the most. |
thx for all your input. for me this sound like we can move forward, and adding a couple of functional tests sounds like a great plan to bring this over the finishing line |
75c5884 to
931bc30
Compare
lukasolson
left a comment
There was a problem hiding this comment.
Great find! Things seem to be working properly now. LGTM
931bc30 to
40a18aa
Compare
nreese
left a comment
There was a problem hiding this comment.
kibana-presentation changes LGTM
code review only
40a18aa to
5da8a32
Compare
💔 Build Failed
Failed CI StepsHistory
cc @AlexGPlay |
5da8a32 to
62efa3e
Compare
|
Starting backport for target branches: 9.2 https://github.com/elastic/kibana/actions/runs/18968566025 |
## Summary Closes elastic#227311 Right now if we create a background search of an unsaved dashboard it doesn't store the panels/references in the saved object, that menas that we can't really restore it. With this we store them even if the dashboard isn't saved but I don't have any context on why it wasn't done like this before so happy to get input on it. --- #### Background an unsaved dashboard and just open it again Before https://github.com/user-attachments/assets/fd282c28-53ea-49dc-b58b-1441e25dfbb1 After https://github.com/user-attachments/assets/d39fbef0-d9b2-4763-bd10-1db98b4fc667 --- #### Background an unsaved dashboard, remove it and open it again Before https://github.com/user-attachments/assets/9c1ba24d-a55f-4176-a409-5070d282110d After https://github.com/user-attachments/assets/7d0a4e3e-e213-40f4-9c41-50783a08b2df --- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] [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 - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. (cherry picked from commit 9686335)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `9.2`: - [[Background search] Restore unsaved dashboards (#240067)](#240067) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Alejandro García Parrondo","email":"31973472+AlexGPlay@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-10-31T09:35:46Z","message":"[Background search] Restore unsaved dashboards (#240067)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/227311\n\nRight now if we create a background search of an unsaved dashboard it\ndoesn't store the panels/references in the saved object, that menas that\nwe can't really restore it. With this we store them even if the\ndashboard isn't saved but I don't have any context on why it wasn't done\nlike this before so happy to get input on it.\n\n---\n\n#### Background an unsaved dashboard and just open it again\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/fd282c28-53ea-49dc-b58b-1441e25dfbb1\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/d39fbef0-d9b2-4763-bd10-1db98b4fc667\n\n---\n\n#### Background an unsaved dashboard, remove it and open it again\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/9c1ba24d-a55f-4176-a409-5070d282110d\n\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/7d0a4e3e-e213-40f4-9c41-50783a08b2df\n\n---\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] [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- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"968633561559bfb774bd6e38ffd4c56c859317b8","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Project:AsyncSearch","Team:DataDiscovery","Feature:Search Sessions","backport:version","v9.3.0","v9.2.1"],"title":"[Background search] Restore unsaved dashboards","number":240067,"url":"https://github.com/elastic/kibana/pull/240067","mergeCommit":{"message":"[Background search] Restore unsaved dashboards (#240067)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/227311\n\nRight now if we create a background search of an unsaved dashboard it\ndoesn't store the panels/references in the saved object, that menas that\nwe can't really restore it. With this we store them even if the\ndashboard isn't saved but I don't have any context on why it wasn't done\nlike this before so happy to get input on it.\n\n---\n\n#### Background an unsaved dashboard and just open it again\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/fd282c28-53ea-49dc-b58b-1441e25dfbb1\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/d39fbef0-d9b2-4763-bd10-1db98b4fc667\n\n---\n\n#### Background an unsaved dashboard, remove it and open it again\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/9c1ba24d-a55f-4176-a409-5070d282110d\n\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/7d0a4e3e-e213-40f4-9c41-50783a08b2df\n\n---\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] [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- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"968633561559bfb774bd6e38ffd4c56c859317b8"}},"sourceBranch":"main","suggestedTargetBranches":["9.2"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/240067","number":240067,"mergeCommit":{"message":"[Background search] Restore unsaved dashboards (#240067)\n\n## Summary\n\nCloses https://github.com/elastic/kibana/issues/227311\n\nRight now if we create a background search of an unsaved dashboard it\ndoesn't store the panels/references in the saved object, that menas that\nwe can't really restore it. With this we store them even if the\ndashboard isn't saved but I don't have any context on why it wasn't done\nlike this before so happy to get input on it.\n\n---\n\n#### Background an unsaved dashboard and just open it again\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/fd282c28-53ea-49dc-b58b-1441e25dfbb1\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/d39fbef0-d9b2-4763-bd10-1db98b4fc667\n\n---\n\n#### Background an unsaved dashboard, remove it and open it again\n\nBefore\n\n\nhttps://github.com/user-attachments/assets/9c1ba24d-a55f-4176-a409-5070d282110d\n\n\nAfter\n\n\nhttps://github.com/user-attachments/assets/7d0a4e3e-e213-40f4-9c41-50783a08b2df\n\n---\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] [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- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.","sha":"968633561559bfb774bd6e38ffd4c56c859317b8"}},{"branch":"9.2","label":"v9.2.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Alejandro García Parrondo <31973472+AlexGPlay@users.noreply.github.com>
## Summary Closes elastic#227311 Right now if we create a background search of an unsaved dashboard it doesn't store the panels/references in the saved object, that menas that we can't really restore it. With this we store them even if the dashboard isn't saved but I don't have any context on why it wasn't done like this before so happy to get input on it. --- #### Background an unsaved dashboard and just open it again Before https://github.com/user-attachments/assets/fd282c28-53ea-49dc-b58b-1441e25dfbb1 After https://github.com/user-attachments/assets/d39fbef0-d9b2-4763-bd10-1db98b4fc667 --- #### Background an unsaved dashboard, remove it and open it again Before https://github.com/user-attachments/assets/9c1ba24d-a55f-4176-a409-5070d282110d After https://github.com/user-attachments/assets/7d0a4e3e-e213-40f4-9c41-50783a08b2df --- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] [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 - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
## Summary Closes elastic#227311 Right now if we create a background search of an unsaved dashboard it doesn't store the panels/references in the saved object, that menas that we can't really restore it. With this we store them even if the dashboard isn't saved but I don't have any context on why it wasn't done like this before so happy to get input on it. --- #### Background an unsaved dashboard and just open it again Before https://github.com/user-attachments/assets/fd282c28-53ea-49dc-b58b-1441e25dfbb1 After https://github.com/user-attachments/assets/d39fbef0-d9b2-4763-bd10-1db98b4fc667 --- #### Background an unsaved dashboard, remove it and open it again Before https://github.com/user-attachments/assets/9c1ba24d-a55f-4176-a409-5070d282110d After https://github.com/user-attachments/assets/7d0a4e3e-e213-40f4-9c41-50783a08b2df --- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] [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 - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.

Summary
Closes #227311
Right now if we create a background search of an unsaved dashboard it doesn't store the panels/references in the saved object, that menas that we can't really restore it. With this we store them even if the dashboard isn't saved but I don't have any context on why it wasn't done like this before so happy to get input on it.
Background an unsaved dashboard and just open it again
Before
unsaved_before_1.mov
After
unsaved_after_1.mov
Background an unsaved dashboard, remove it and open it again
Before
unsaved_before_2.mov
After
unsaved_after_2.mov
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:*label is applied per the guidelinesbackport:*labels.