[securitySolutions] resolve most @kbn/imports/no_boundary_crossing violations#137694
Merged
spalger merged 7 commits intoelastic:mainfrom Aug 10, 2022
Merged
Conversation
97ef9d6 to
ffa2a96
Compare
ffa2a96 to
e468c93
Compare
Contributor
|
Pinging @elastic/kibana-operations (Team:Operations) |
spalger
commented
Aug 2, 2022
x-pack/plugins/security_solution/cypress/screens/kibana_navigation.ts
Outdated
Show resolved
Hide resolved
added 2 commits
August 3, 2022 08:41
Contributor
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
jbudz
approved these changes
Aug 9, 2022
kqualters-elastic
approved these changes
Aug 10, 2022
paul-tavares
approved these changes
Aug 10, 2022
Contributor
paul-tavares
left a comment
There was a problem hiding this comment.
Thanks for doing this @spalger . Looks good from a security solution Onboarding and Lifecycle Management team
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses most of the
@kbn/imports/no_boundary_crossingviolations which were highlighted by #136911.These changes fall into two categories:
mocks were being re-exported from
index.tsfiles which included them in the bundled browser code or server code unnecessarilyto fix these the re-exports were just removed and the imports using these were updated to import from
.../mocksinsteadmocks were being used to demonstrate specific events in the "Customize Event Renderers" view, which meant that test code was being included in browser bundles
to fix these the mocks necessary in the browser were moved to a new "demo_data" directory, and where then re-exported from the "mocks" so that copious test imports could be left untouched.
The bundle metrics highlight the benefit of these changes, removing over 200 modules from the browser bundle and hundreds of KB from the async chunks. Additionally, these changes will enable us to maintain separate dependency trees for the tests in security solutions automatically, leading us to better support for incremental tasks in future versions of the packaging system.
There is one remaining issue that I need to brainstorm with someone (likely @oatkiller, based on his work in #75799) but we can take care of that in a separate step.