-
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
Fix import causing Kibana to crash in IE11. #52248
Conversation
💚 Build Succeeded
|
Awesome! Thanks! |
Pinging @elastic/kibana-app-arch (Team:AppArch) |
Also cc @elastic/kibana-platform -- If it were possible to have linter rules to catch these sorts of bad imports that inadvertently cross server/client boundaries, it would help eliminate a whole category of bugs we have been seeing during the migration process. Not sure how feasible that would be to implement, but wanted to mention it here. |
💚 Build Succeeded |
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.
@lukeelmers as I can see
and it shows 265 problems in the current codebase. |
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.
IE11 is happy again 🌻 !
Just put up a PR here: #52447 |
refers to #49053 |
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.
Thank you!
@elasticmachine merge upstream |
💚 Build SucceededTo 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.
Looks good to me
Closes #50927
A regression was caused by the changes in #50182, where some client-side code appeared to be indirectly importing some server-side utilities from the data plugin
src/plugins/data/server
.This caused a bunch of additional code to be bundled in the
commons.bundle.js
, which when executed from IE11, caused a syntax error. (I actually never got to what the specific syntax error was in my investigation, as I was primarily focused on getting rid of the server-side code that was being bundled with everything).Turns out that some of the Canvas common functions (in this case,
saved_map
) which are loaded from the browser, are relying on abuildEmbeddableFilters
method which is located in the Canvas server lib. This imports some stuff fromsrc/plugins/data/server
, which is how the code ended up in the common bundle to begin with.That said, I believe the changes introduced in #50182 were actually correct: server files should be able to import static code from other server files. The temporary workaround here was to import from
src/plugins/data/common
, but the real fix is figuring out whether the pieces ofbuildEmbeddableFilters
needed by the client-side code could be split out. I've created #52343 to track this work.