Skip to content
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

[siem/ui] avoid importing server code in ui #37103

Merged
merged 2 commits into from
May 24, 2019

Conversation

spalger
Copy link
Contributor

@spalger spalger commented May 24, 2019

Fixes #37016

We have an issue in IE11 caused by server code being imported into the UI unnecessarily. The culprit seems to the the siem app which is importing the index file from the plugin, which causes all of the server code including Hapi to be imported into the UI. To avoid this we need to make sure and put data that should be imported from both the server and UI into common directories and be careful when importing from the UI to not include more than necessary.

We have ideas for how we can evolve our tooling to make this mistake harder to make, but for now it's just an unfortunate reality that it's a pretty easy mistake to make.

Major thanks to @mistic for tracking down the imports of the index.ts file in the UI!!

@elasticmachine
Copy link
Contributor

Pinging @elastic/secops

Copy link
Contributor

@FrankHassanabad FrankHassanabad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@spalger spalger marked this pull request as ready for review May 24, 2019 15:26
@spalger spalger added the review label May 24, 2019
@spalger spalger requested review from mistic and LeeDr May 24, 2019 15:27
@spalger spalger added the release_note:skip Skip the PR/issue when compiling release notes label May 24, 2019
Copy link
Member

@mistic mistic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ❤️

That was a though one to find out 😅
I just run the optimizer and looks like no more Boom or hoek are being bundled into the browser bundles, so I think we will be fine!

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@spalger spalger merged commit fcf0466 into elastic:master May 24, 2019
spalger pushed a commit to spalger/kibana that referenced this pull request May 24, 2019
* [siem/ui] avoid importing server code in ui

* covert a couple extra imports
spalger pushed a commit to spalger/kibana that referenced this pull request May 24, 2019
* [siem/ui] avoid importing server code in ui

* covert a couple extra imports
spalger pushed a commit that referenced this pull request May 24, 2019
* [siem/ui] avoid importing server code in ui

* covert a couple extra imports
spalger pushed a commit that referenced this pull request May 24, 2019
* [siem/ui] avoid importing server code in ui

* covert a couple extra imports
@spalger
Copy link
Contributor Author

spalger commented May 24, 2019

7.x/7.3: 6c4346d
7.2: 90db3f4

@spalger spalger deleted the fix/server-code-in-siem-ui branch May 24, 2019 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IE is broke on 7.2.0, syntax error and 'vendors' is undefined
4 participants