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

Exclude tests from incremental builds #92175

Closed
wants to merge 56 commits into from

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Feb 22, 2021

Summary

part of #90281
Cold run before: 6m 31sec
Cold run after: 5m 2sec

This PR adds a centralized tsconfig.projects.json for all the plugins and excludes all the test files from being compiled when building TS project references.
Instead, I merged x-pack/tsconfig.json into tsconfig.json to keep the single project containing all the test files.
Since we have the single tsconfig file, I moved all the typings to the root level as well.

I made several changes to reduce the number of patterns to exclude:

  • src/core: test_types.ts renamed to types.test.ts
  • home: /mocks/index.ts renamed to mocks.ts
  • management: /mocks/index.ts renamed to mocks.ts
  • spaces_oss: /mocks/index.ts renamed to mocks.ts
  • canvas: test_helpers.tsx moved under test_helpers folder
  • enterprise_search: shared_columns_test.tsx renamed to shared_columns.mock.tsx
  • infra: remove unused enzyme_helpers
  • rollup and watcher: move client_integration under __jest__ folder for consistency with other ES-UI proejcts
  • ui_actions_enhanced: renames test_data.tsx to mocks.tsx
  • uptime: move test helpers to /lib/mocks
  • converted several canvas utils from js into ts
  • remove @ts-expect-error when plugin imported unknown type. It doesn't make sense as a type inferred as any.

@spalger
Copy link
Contributor

spalger commented Mar 11, 2021

Chatted with @tylersmalley and we agree that this is less than ideal and but we don't need to block this PR and we can try to get things better organized as we move to Bazel. This optimization might degrade over time, but ultimately it shouldn't break anything so 👍

@kibanamachine
Copy link
Contributor

kibanamachine commented Mar 15, 2021

💔 Build Failed

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
uptime 603 602 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
uptime 939.5KB 939.1KB -466.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
canvas 548.9KB 549.4KB +553.0B

History

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

@mshustov
Copy link
Contributor Author

closed in favour of #95610

@mshustov mshustov closed this Mar 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants