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] Add developer optimization scripts for their environments #61337

Merged

Conversation

FrankHassanabad
Copy link
Contributor

@FrankHassanabad FrankHassanabad commented Mar 25, 2020

Summary

This adds an optimization script very copied and slightly modified from:

Usage:

Run this to do an dev tsconfig optimization:

node x-pack/legacy/plugins/siem/scripts/optimize_tsconfig

Run this to undo the optimization:

node x-pack/legacy/plugins/siem/scripts/unoptimize_tsconfig

Testing and what this does:

Run this:

node x-pack/legacy/plugins/siem/scripts/optimize_tsconfig

Then run your start-test-all or at least your linter, typescript check, and jest tests to make sure they all operate as expected. Restart your IDE and ensure everything works as expected.

Run git status and ensure it looks like no new files want to be checked in.

Open up your:

kibana/x-pack/tsconfig.json

And notice it is now changed when optimization has run to use a smaller set of includes.

Open up your:

kibana/tsconfig.json

And notice it is now changed when optimization is run to use a smaller set of includes.

@FrankHassanabad FrankHassanabad requested a review from a team as a code owner March 25, 2020 18:46
@FrankHassanabad FrankHassanabad added the release_note:skip Skip the PR/issue when compiling release notes label Mar 25, 2020
@FrankHassanabad FrankHassanabad self-assigned this Mar 25, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/siem (Team:SIEM)

Copy link
Member

@spong spong left a comment

Choose a reason for hiding this comment

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

Checked out, ran node x-pack/legacy/plugins/siem/scripts/optimize_tsconfig to optimize tsconfigs, and verified the following:

  • IDE (Webstorm) linting functioned as expected
  • Verified type-checking improvements (1m40s for optimized vs 2m23s for un-optimized)
  • Ran full start-test-all without error 15m38s (includes gql-type-gen, type-checking, linting, i18n-check, circ-deps-check, and running all jest tests)
  • Re-launched IDE and functionality was as expected (and felt a bit snappier in navigating usages/adding imports).

LGTM! 👍 Thanks for the dev improvements here @FrankHassanabad, greatly appreciated! 🎉

@FrankHassanabad
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@FrankHassanabad FrankHassanabad merged commit 33511b3 into elastic:master Mar 25, 2020
@FrankHassanabad FrankHassanabad deleted the siem-optimize-tsconfig branch March 25, 2020 22:31
@MindyRS MindyRS added the Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. label Sep 23, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:SIEM v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants