-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[visualize] fix unsaved state when adding by-value visualize embeddable to dashboard #211264
Conversation
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested that this change doesn't introduce any regression on the current branch.
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
|
Starting backport for target branches: 8.18, 8.x, 9.0 |
…le to dashboard (elastic#211264) Follow up to elastic#210125 [8.16](elastic#211057) and [8.17](elastic#211054) backports for elastic#210125 were failing functional test https://github.com/elastic/kibana/blob/8.17/test/functional/apps/dashboard/group1/dashboard_unsaved_listing.ts#L142. The functional test adds a by-value and by-reference legacy visualization to a new dashboard. Upon saving the dashboard, the dashboard still showed unsaved changes. The reason this test did not fail main and other branches is that elastic#208116 removed the "by-value" part of the test (since its no longer possible to add a by-value legacy visualization from within a dashboard). It is still possible to recreate the issue in main with the following steps 1) Click "Visualize Library" in left nav 2) Click "Create visualization" button. 3) Click "Legacy" tab 4) Click "Aggregation based" 5) Click "Area" 6) Click web logs sample data view 7) Click "Save" 8) Set title 9) Under "Add to dashboard", click "New", click save 10) save dashboard. Notice how dashboard still has unsaved changes. 8.16 and 8.17 required a [new commit](elastic@1fd631c) to resolve the issue by updating the `linkedToLibrary` to ignore undefined values. This PR fixes the issue for the other branches that have already been merged. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit 6789c94)
…le to dashboard (elastic#211264) Follow up to elastic#210125 [8.16](elastic#211057) and [8.17](elastic#211054) backports for elastic#210125 were failing functional test https://github.com/elastic/kibana/blob/8.17/test/functional/apps/dashboard/group1/dashboard_unsaved_listing.ts#L142. The functional test adds a by-value and by-reference legacy visualization to a new dashboard. Upon saving the dashboard, the dashboard still showed unsaved changes. The reason this test did not fail main and other branches is that elastic#208116 removed the "by-value" part of the test (since its no longer possible to add a by-value legacy visualization from within a dashboard). It is still possible to recreate the issue in main with the following steps 1) Click "Visualize Library" in left nav 2) Click "Create visualization" button. 3) Click "Legacy" tab 4) Click "Aggregation based" 5) Click "Area" 6) Click web logs sample data view 7) Click "Save" 8) Set title 9) Under "Add to dashboard", click "New", click save 10) save dashboard. Notice how dashboard still has unsaved changes. 8.16 and 8.17 required a [new commit](elastic@1fd631c) to resolve the issue by updating the `linkedToLibrary` to ignore undefined values. This PR fixes the issue for the other branches that have already been merged. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit 6789c94)
…le to dashboard (elastic#211264) Follow up to elastic#210125 [8.16](elastic#211057) and [8.17](elastic#211054) backports for elastic#210125 were failing functional test https://github.com/elastic/kibana/blob/8.17/test/functional/apps/dashboard/group1/dashboard_unsaved_listing.ts#L142. The functional test adds a by-value and by-reference legacy visualization to a new dashboard. Upon saving the dashboard, the dashboard still showed unsaved changes. The reason this test did not fail main and other branches is that elastic#208116 removed the "by-value" part of the test (since its no longer possible to add a by-value legacy visualization from within a dashboard). It is still possible to recreate the issue in main with the following steps 1) Click "Visualize Library" in left nav 2) Click "Create visualization" button. 3) Click "Legacy" tab 4) Click "Aggregation based" 5) Click "Area" 6) Click web logs sample data view 7) Click "Save" 8) Set title 9) Under "Add to dashboard", click "New", click save 10) save dashboard. Notice how dashboard still has unsaved changes. 8.16 and 8.17 required a [new commit](elastic@1fd631c) to resolve the issue by updating the `linkedToLibrary` to ignore undefined values. This PR fixes the issue for the other branches that have already been merged. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit 6789c94)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…beddable to dashboard (#211264) (#211611) # Backport This will backport the following commits from `main` to `8.x`: - [[visualize] fix unsaved state when adding by-value visualize embeddable to dashboard (#211264)](#211264) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-18T16:17:42Z","message":"[visualize] fix unsaved state when adding by-value visualize embeddable to dashboard (#211264)\n\nFollow up to https://github.com/elastic/kibana/pull/210125\r\n\r\n[8.16](https://github.com/elastic/kibana/pull/211057) and\r\n[8.17](#211054) backports for\r\nhttps://github.com//pull/210125 were failing functional\r\ntest\r\nhttps://github.com/elastic/kibana/blob/8.17/test/functional/apps/dashboard/group1/dashboard_unsaved_listing.ts#L142.\r\nThe functional test adds a by-value and by-reference legacy\r\nvisualization to a new dashboard. Upon saving the dashboard, the\r\ndashboard still showed unsaved changes.\r\n\r\nThe reason this test did not fail main and other branches is that\r\nhttps://github.com//pull/208116 removed the \"by-value\"\r\npart of the test (since its no longer possible to add a by-value legacy\r\nvisualization from within a dashboard). It is still possible to recreate\r\nthe issue in main with the following steps\r\n1) Click \"Visualize Library\" in left nav\r\n2) Click \"Create visualization\" button. \r\n3) Click \"Legacy\" tab\r\n4) Click \"Aggregation based\"\r\n5) Click \"Area\"\r\n6) Click web logs sample data view\r\n7) Click \"Save\"\r\n8) Set title\r\n9) Under \"Add to dashboard\", click \"New\", click save\r\n10) save dashboard. Notice how dashboard still has unsaved changes.\r\n\r\n8.16 and 8.17 required a [new\r\ncommit](https://github.com/elastic/kibana/pull/211054/commits/1fd631c5a30046b5ab2f63948174ec29bac6fd84)\r\nto resolve the issue by updating the `linkedToLibrary` to ignore\r\nundefined values.\r\n\r\nThis PR fixes the issue for the other branches that have already been\r\nmerged.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"6789c946885fe0b6a2e57e056831f1ff25156f73","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","release_note:skip","v9.0.0","project:embeddableRebuild","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[visualize] fix unsaved state when adding by-value visualize embeddable to dashboard","number":211264,"url":"https://github.com/elastic/kibana/pull/211264","mergeCommit":{"message":"[visualize] fix unsaved state when adding by-value visualize embeddable to dashboard (#211264)\n\nFollow up to https://github.com/elastic/kibana/pull/210125\r\n\r\n[8.16](https://github.com/elastic/kibana/pull/211057) and\r\n[8.17](#211054) backports for\r\nhttps://github.com//pull/210125 were failing functional\r\ntest\r\nhttps://github.com/elastic/kibana/blob/8.17/test/functional/apps/dashboard/group1/dashboard_unsaved_listing.ts#L142.\r\nThe functional test adds a by-value and by-reference legacy\r\nvisualization to a new dashboard. Upon saving the dashboard, the\r\ndashboard still showed unsaved changes.\r\n\r\nThe reason this test did not fail main and other branches is that\r\nhttps://github.com//pull/208116 removed the \"by-value\"\r\npart of the test (since its no longer possible to add a by-value legacy\r\nvisualization from within a dashboard). It is still possible to recreate\r\nthe issue in main with the following steps\r\n1) Click \"Visualize Library\" in left nav\r\n2) Click \"Create visualization\" button. \r\n3) Click \"Legacy\" tab\r\n4) Click \"Aggregation based\"\r\n5) Click \"Area\"\r\n6) Click web logs sample data view\r\n7) Click \"Save\"\r\n8) Set title\r\n9) Under \"Add to dashboard\", click \"New\", click save\r\n10) save dashboard. Notice how dashboard still has unsaved changes.\r\n\r\n8.16 and 8.17 required a [new\r\ncommit](https://github.com/elastic/kibana/pull/211054/commits/1fd631c5a30046b5ab2f63948174ec29bac6fd84)\r\nto resolve the issue by updating the `linkedToLibrary` to ignore\r\nundefined values.\r\n\r\nThis PR fixes the issue for the other branches that have already been\r\nmerged.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"6789c946885fe0b6a2e57e056831f1ff25156f73"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211264","number":211264,"mergeCommit":{"message":"[visualize] fix unsaved state when adding by-value visualize embeddable to dashboard (#211264)\n\nFollow up to https://github.com/elastic/kibana/pull/210125\r\n\r\n[8.16](https://github.com/elastic/kibana/pull/211057) and\r\n[8.17](#211054) backports for\r\nhttps://github.com//pull/210125 were failing functional\r\ntest\r\nhttps://github.com/elastic/kibana/blob/8.17/test/functional/apps/dashboard/group1/dashboard_unsaved_listing.ts#L142.\r\nThe functional test adds a by-value and by-reference legacy\r\nvisualization to a new dashboard. Upon saving the dashboard, the\r\ndashboard still showed unsaved changes.\r\n\r\nThe reason this test did not fail main and other branches is that\r\nhttps://github.com//pull/208116 removed the \"by-value\"\r\npart of the test (since its no longer possible to add a by-value legacy\r\nvisualization from within a dashboard). It is still possible to recreate\r\nthe issue in main with the following steps\r\n1) Click \"Visualize Library\" in left nav\r\n2) Click \"Create visualization\" button. \r\n3) Click \"Legacy\" tab\r\n4) Click \"Aggregation based\"\r\n5) Click \"Area\"\r\n6) Click web logs sample data view\r\n7) Click \"Save\"\r\n8) Set title\r\n9) Under \"Add to dashboard\", click \"New\", click save\r\n10) save dashboard. Notice how dashboard still has unsaved changes.\r\n\r\n8.16 and 8.17 required a [new\r\ncommit](https://github.com/elastic/kibana/pull/211054/commits/1fd631c5a30046b5ab2f63948174ec29bac6fd84)\r\nto resolve the issue by updating the `linkedToLibrary` to ignore\r\nundefined values.\r\n\r\nThis PR fixes the issue for the other branches that have already been\r\nmerged.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"6789c946885fe0b6a2e57e056831f1ff25156f73"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nathan Reese <[email protected]>
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. |
…beddable to dashboard (#211264) (#211612) # Backport This will backport the following commits from `main` to `9.0`: - [[visualize] fix unsaved state when adding by-value visualize embeddable to dashboard (#211264)](#211264) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-02-18T16:17:42Z","message":"[visualize] fix unsaved state when adding by-value visualize embeddable to dashboard (#211264)\n\nFollow up to https://github.com/elastic/kibana/pull/210125\r\n\r\n[8.16](https://github.com/elastic/kibana/pull/211057) and\r\n[8.17](#211054) backports for\r\nhttps://github.com//pull/210125 were failing functional\r\ntest\r\nhttps://github.com/elastic/kibana/blob/8.17/test/functional/apps/dashboard/group1/dashboard_unsaved_listing.ts#L142.\r\nThe functional test adds a by-value and by-reference legacy\r\nvisualization to a new dashboard. Upon saving the dashboard, the\r\ndashboard still showed unsaved changes.\r\n\r\nThe reason this test did not fail main and other branches is that\r\nhttps://github.com//pull/208116 removed the \"by-value\"\r\npart of the test (since its no longer possible to add a by-value legacy\r\nvisualization from within a dashboard). It is still possible to recreate\r\nthe issue in main with the following steps\r\n1) Click \"Visualize Library\" in left nav\r\n2) Click \"Create visualization\" button. \r\n3) Click \"Legacy\" tab\r\n4) Click \"Aggregation based\"\r\n5) Click \"Area\"\r\n6) Click web logs sample data view\r\n7) Click \"Save\"\r\n8) Set title\r\n9) Under \"Add to dashboard\", click \"New\", click save\r\n10) save dashboard. Notice how dashboard still has unsaved changes.\r\n\r\n8.16 and 8.17 required a [new\r\ncommit](https://github.com/elastic/kibana/pull/211054/commits/1fd631c5a30046b5ab2f63948174ec29bac6fd84)\r\nto resolve the issue by updating the `linkedToLibrary` to ignore\r\nundefined values.\r\n\r\nThis PR fixes the issue for the other branches that have already been\r\nmerged.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"6789c946885fe0b6a2e57e056831f1ff25156f73","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Visualizations","release_note:skip","v9.0.0","project:embeddableRebuild","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[visualize] fix unsaved state when adding by-value visualize embeddable to dashboard","number":211264,"url":"https://github.com/elastic/kibana/pull/211264","mergeCommit":{"message":"[visualize] fix unsaved state when adding by-value visualize embeddable to dashboard (#211264)\n\nFollow up to https://github.com/elastic/kibana/pull/210125\r\n\r\n[8.16](https://github.com/elastic/kibana/pull/211057) and\r\n[8.17](#211054) backports for\r\nhttps://github.com//pull/210125 were failing functional\r\ntest\r\nhttps://github.com/elastic/kibana/blob/8.17/test/functional/apps/dashboard/group1/dashboard_unsaved_listing.ts#L142.\r\nThe functional test adds a by-value and by-reference legacy\r\nvisualization to a new dashboard. Upon saving the dashboard, the\r\ndashboard still showed unsaved changes.\r\n\r\nThe reason this test did not fail main and other branches is that\r\nhttps://github.com//pull/208116 removed the \"by-value\"\r\npart of the test (since its no longer possible to add a by-value legacy\r\nvisualization from within a dashboard). It is still possible to recreate\r\nthe issue in main with the following steps\r\n1) Click \"Visualize Library\" in left nav\r\n2) Click \"Create visualization\" button. \r\n3) Click \"Legacy\" tab\r\n4) Click \"Aggregation based\"\r\n5) Click \"Area\"\r\n6) Click web logs sample data view\r\n7) Click \"Save\"\r\n8) Set title\r\n9) Under \"Add to dashboard\", click \"New\", click save\r\n10) save dashboard. Notice how dashboard still has unsaved changes.\r\n\r\n8.16 and 8.17 required a [new\r\ncommit](https://github.com/elastic/kibana/pull/211054/commits/1fd631c5a30046b5ab2f63948174ec29bac6fd84)\r\nto resolve the issue by updating the `linkedToLibrary` to ignore\r\nundefined values.\r\n\r\nThis PR fixes the issue for the other branches that have already been\r\nmerged.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"6789c946885fe0b6a2e57e056831f1ff25156f73"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211264","number":211264,"mergeCommit":{"message":"[visualize] fix unsaved state when adding by-value visualize embeddable to dashboard (#211264)\n\nFollow up to https://github.com/elastic/kibana/pull/210125\r\n\r\n[8.16](https://github.com/elastic/kibana/pull/211057) and\r\n[8.17](#211054) backports for\r\nhttps://github.com//pull/210125 were failing functional\r\ntest\r\nhttps://github.com/elastic/kibana/blob/8.17/test/functional/apps/dashboard/group1/dashboard_unsaved_listing.ts#L142.\r\nThe functional test adds a by-value and by-reference legacy\r\nvisualization to a new dashboard. Upon saving the dashboard, the\r\ndashboard still showed unsaved changes.\r\n\r\nThe reason this test did not fail main and other branches is that\r\nhttps://github.com//pull/208116 removed the \"by-value\"\r\npart of the test (since its no longer possible to add a by-value legacy\r\nvisualization from within a dashboard). It is still possible to recreate\r\nthe issue in main with the following steps\r\n1) Click \"Visualize Library\" in left nav\r\n2) Click \"Create visualization\" button. \r\n3) Click \"Legacy\" tab\r\n4) Click \"Aggregation based\"\r\n5) Click \"Area\"\r\n6) Click web logs sample data view\r\n7) Click \"Save\"\r\n8) Set title\r\n9) Under \"Add to dashboard\", click \"New\", click save\r\n10) save dashboard. Notice how dashboard still has unsaved changes.\r\n\r\n8.16 and 8.17 required a [new\r\ncommit](https://github.com/elastic/kibana/pull/211054/commits/1fd631c5a30046b5ab2f63948174ec29bac6fd84)\r\nto resolve the issue by updating the `linkedToLibrary` to ignore\r\nundefined values.\r\n\r\nThis PR fixes the issue for the other branches that have already been\r\nmerged.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"6789c946885fe0b6a2e57e056831f1ff25156f73"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nathan Reese <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Follow up to #210125
8.16 and 8.17 backports for #210125 were failing functional test https://github.com/elastic/kibana/blob/8.17/test/functional/apps/dashboard/group1/dashboard_unsaved_listing.ts#L142. The functional test adds a by-value and by-reference legacy visualization to a new dashboard. Upon saving the dashboard, the dashboard still showed unsaved changes.
The reason this test did not fail main and other branches is that #208116 removed the "by-value" part of the test (since its no longer possible to add a by-value legacy visualization from within a dashboard). It is still possible to recreate the issue in main with the following steps
8.16 and 8.17 required a new commit to resolve the issue by updating the
linkedToLibrary
to ignore undefined values.This PR fixes the issue for the other branches that have already been merged.