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

chore(NA): enable preserve symlinks for ts without breaking packages development #95433

Conversation

mistic
Copy link
Member

@mistic mistic commented Mar 25, 2021

One step forward on #69706

We need to enable the preserveSymlinks option on the typescript config in order to support the consumption from packages built by bazel. However we discovered that broke the development of packages built in typescript as we were no longer able to click and follow requires into the source. By built the sourcemaps and correctly configure sourceRoot we were able to fix the behaviour. I've also applied the same standards into all typescript packages.

Some packages were left out of this work because they are not being required often and a migration into typescript was needed, or because they do not change frequently. Those are:

* elastic-safer-lodash-set
* kbn-babel-code-parser
* kbn-babel-preset
* kbn-es
* kbn-eslint-import-resolver-kibana
* kbn-eslint-plugin-eslint
* kbn-expect
* kbn-spec-to-console
* kbn-test-subj
* kbn-tinymath

@mistic mistic force-pushed the enable-preserve-symlinks-for-ts-without-breaking-packages branch from 9f12499 to 1c3fcc9 Compare March 25, 2021 16:37
@mistic mistic force-pushed the enable-preserve-symlinks-for-ts-without-breaking-packages branch 2 times, most recently from 7a56b6c to 9268491 Compare March 26, 2021 18:05
@mistic
Copy link
Member Author

mistic commented Mar 30, 2021

Thanks @spalger for the help you gave here to overcome the type clashes on kbn-test and providing a way to run kbn-optimizer integration tests from source

@mistic mistic added auto-backport Deprecated: Automatically backport this PR after it's merged chore labels Mar 30, 2021
@mistic mistic requested review from a team as code owners March 30, 2021 15:55
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@mistic mistic enabled auto-merge (squash) March 30, 2021 16:17
@tylersmalley
Copy link
Contributor

It works for me now! I think I know what the issue is but it's unrelated. Opening up another PR

@tylersmalley
Copy link
Contributor

tylersmalley commented Mar 30, 2021

I don't want to block this PR on all the codeowners reviews triggered by this change. If anyone has any issues with it, we can address but we're mostly responsible for the files changed here.

@spalger if you sign off I suggest we go ahead and merge.

Copy link
Member

@vigneshshanmugam vigneshshanmugam left a comment

Choose a reason for hiding this comment

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

APM related changes looks good.

Copy link
Contributor

@jportner jportner left a comment

Choose a reason for hiding this comment

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

Security changes (// @ts-expect-error in integration tests) LGTM, thanks for clarifying in comments above!

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM, things seem to be stable and I'm not seeing any major issues. I'll work on a followup to deal with a minor issue I'm seeing #95849

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
apm 4.2MB 4.2MB +392.0B
data 202.8KB 202.8KB -24.0B
discover 393.2KB 393.5KB +370.0B
infra 1.8MB 1.8MB -54.0B
lens 939.4KB 939.8KB +400.0B
ml 5.9MB 5.9MB +20.0B
observability 326.5KB 326.9KB +402.0B
securitySolution 7.2MB 7.2MB -12.0B
uptime 879.8KB 880.2KB +384.0B
visDefaultEditor 225.3KB 225.7KB +384.0B
visTypeVega 2.6MB 2.6MB +383.0B
visTypeVislib 583.9KB 584.3KB +385.0B
watcher 850.0KB 850.7KB +815.0B
total +3.8KB

Page load bundle

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

id before after diff
canvas 516.2KB 516.7KB +450.0B
data 791.7KB 792.1KB +335.0B
discover 74.7KB 74.7KB +66.0B
infra 137.3KB 137.7KB +392.0B
lists 190.2KB 190.7KB +449.0B
ml 64.6KB 64.9KB +392.0B
securitySolution 215.2KB 215.6KB +392.0B
uiActionsEnhanced 201.3KB 201.7KB +449.0B
visTypeTimeseries 108.7KB 109.1KB +392.0B
visTypeVega 54.0KB 54.1KB +65.0B
visTypeVislib 33.3KB 33.4KB +65.0B
total +3.4KB
Unknown metric groups

@kbn/ui-shared-deps asset size

id before after diff
kbn-ui-shared-deps.@elastic.js 3.3MB 3.3MB +297.0B

History

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

@mistic mistic disabled auto-merge March 30, 2021 23:02
@mistic mistic merged commit 50313f7 into elastic:master Mar 30, 2021
@mistic mistic added auto-backport Deprecated: Automatically backport this PR after it's merged and removed auto-backport Deprecated: Automatically backport this PR after it's merged labels Mar 30, 2021
@kibanamachine
Copy link
Contributor

💔 Backport failed

❌ 7.x: Commit could not be cherrypicked due to conflicts

To backport manually run:
node scripts/backport --pr 95433

1 similar comment
@kibanamachine
Copy link
Contributor

💔 Backport failed

❌ 7.x: Commit could not be cherrypicked due to conflicts

To backport manually run:
node scripts/backport --pr 95433

mistic added a commit to mistic/kibana that referenced this pull request Mar 31, 2021
…development (elastic#95433)

* chore(NA): move elastic-datemath into a ts package

* chore(NA): finish elastic-datemath

* chore(NA): finish elastic-datemath

* chore(NA): source folder for elastic-datemath

* chore(NA): add source-maps ace, analytics, apm-config-loader and apm-utils packages

* chore(NA): add sourcemaps to packages on typescript

* chore(NA): move test fixtures within source

* chore(NA): correct exclusions on packages

* chore(NA): correct package.json on all packages

* chore(NA): correct package.json on all packages

* chore(NA): complete kbn pm

* chore(NA): default export on elastic-datemath

* chore(NA): include logs on kbn-logging

* chore(NA): update bundle ref module to last code used in the webpack upstream

* chore(NA): update bundle ref module to last code used in the webpack upstream - refactored

* chore(NA): remove override method for exportsArgument

* fix(NA): typechecking problems by use @internal at javascript import sources on kbn-test package

* fix(NA): typescript projects check

* fix(NA): run optimizer integration tests from source

* chore(NA): fix usage from target for kbn optimizer

* chore(NA): path on tsconfig

* chore(NA): move tsignore into ts-expect-error

* chore(NA): include souce maps on kbn cli dev

* chore(NA): include souce maps on kbn-crypto, kbn-server-http-tools and kbn-telemetry-tools

* chore(NA): add issue links into the ts-expect-error comments
# Conflicts:
#	packages/elastic-datemath/README.md
#	packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts
mistic added a commit that referenced this pull request Mar 31, 2021
…development (#95433) (#95884)

* chore(NA): move elastic-datemath into a ts package

* chore(NA): finish elastic-datemath

* chore(NA): finish elastic-datemath

* chore(NA): source folder for elastic-datemath

* chore(NA): add source-maps ace, analytics, apm-config-loader and apm-utils packages

* chore(NA): add sourcemaps to packages on typescript

* chore(NA): move test fixtures within source

* chore(NA): correct exclusions on packages

* chore(NA): correct package.json on all packages

* chore(NA): correct package.json on all packages

* chore(NA): complete kbn pm

* chore(NA): default export on elastic-datemath

* chore(NA): include logs on kbn-logging

* chore(NA): update bundle ref module to last code used in the webpack upstream

* chore(NA): update bundle ref module to last code used in the webpack upstream - refactored

* chore(NA): remove override method for exportsArgument

* fix(NA): typechecking problems by use @internal at javascript import sources on kbn-test package

* fix(NA): typescript projects check

* fix(NA): run optimizer integration tests from source

* chore(NA): fix usage from target for kbn optimizer

* chore(NA): path on tsconfig

* chore(NA): move tsignore into ts-expect-error

* chore(NA): include souce maps on kbn cli dev

* chore(NA): include souce maps on kbn-crypto, kbn-server-http-tools and kbn-telemetry-tools

* chore(NA): add issue links into the ts-expect-error comments
# Conflicts:
#	packages/elastic-datemath/README.md
#	packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts
@mistic mistic mentioned this pull request Apr 5, 2021
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated: Automatically backport this PR after it's merged chore release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants