-
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
[Lens] fixed equality check for visualization #172685
Conversation
Pinging @elastic/kibana-visualizations (Team:Visualizations) |
const customIsEqual = visualizationMap[previousAttrs.visualizationType]?.isEqual; | ||
const visualizationStateIsEqual = customIsEqual | ||
? (() => { | ||
try { |
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.
Why wrapping it in a try
here?
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.
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.
I see. It makes sense then.
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
To update your PR or re-run it, just comment with: |
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.
Changes LGTM, bug fixed!
## Summary Fixed an equality check bug for attributesChanged calculation. It wasn't taking into account that visualization can also have references (to dataview for annotations) and a custom isEqual function. (cherry picked from commit 9e41850)
💚 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 `8.12`: - [[Lens] fixed equality check for visualization (#172685)](#172685) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Marta Bondyra","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-12-07T09:31:38Z","message":"[Lens] fixed equality check for visualization (#172685)\n\n## Summary\r\n\r\nFixed an equality check bug for attributesChanged calculation. It wasn't\r\ntaking into account that visualization can also have references (to\r\ndataview for annotations) and a custom isEqual function.","sha":"9e41850a352a24446a0c49bacffccf93df2547fb","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","v8.12.0","v8.13.0"],"number":172685,"url":"https://github.com/elastic/kibana/pull/172685","mergeCommit":{"message":"[Lens] fixed equality check for visualization (#172685)\n\n## Summary\r\n\r\nFixed an equality check bug for attributesChanged calculation. It wasn't\r\ntaking into account that visualization can also have references (to\r\ndataview for annotations) and a custom isEqual function.","sha":"9e41850a352a24446a0c49bacffccf93df2547fb"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172685","number":172685,"mergeCommit":{"message":"[Lens] fixed equality check for visualization (#172685)\n\n## Summary\r\n\r\nFixed an equality check bug for attributesChanged calculation. It wasn't\r\ntaking into account that visualization can also have references (to\r\ndataview for annotations) and a custom isEqual function.","sha":"9e41850a352a24446a0c49bacffccf93df2547fb"}}]}] BACKPORT--> Co-authored-by: Marta Bondyra <[email protected]>
Summary
Fixed an equality check bug for attributesChanged calculation. It wasn't taking into account that visualization can also have references (to dataview for annotations) and a custom isEqual function.