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): ensure scripts run with --preserve-symlinks #94046

Merged

Conversation

mistic
Copy link
Member

@mistic mistic commented Mar 9, 2021

One step forward on #69706

It prepares our scripts to be able to run using packages built by bazel and consumed directly from within bazel bin folder.
When consuming packages directly from inside bazel bin, if follow symlinks is enabled, those packages won't be able to found their node_modules dependencies as Bazel symlinks those artifacts into a sandbox completely isolated from the repository source.

That PR makes sure everything run under our scripts or any other compilation on our repo runs under the --preserve-symlinks node option

@mistic mistic requested a review from tylersmalley March 9, 2021 04:15
@mistic mistic added auto-backport Deprecated - use backport:version if exact versions are needed chore release_note:skip Skip the PR/issue when compiling release notes v7.13.0 v8.0.0 and removed auto-backport Deprecated - use backport:version if exact versions are needed labels Mar 9, 2021
@mistic mistic added the Team:Operations Team label for Operations Team label Mar 10, 2021
@mistic mistic marked this pull request as ready for review March 10, 2021 17:16
@mistic mistic requested review from a team as code owners March 10, 2021 17:16
@mistic

This comment has been minimized.

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested with commit cbc10a7 on Windows and LGTM. yarn kbn bootstrap and Kibana start-up now run without errors.

@mistic
Copy link
Member Author

mistic commented Mar 15, 2021

@elasticmachine merge upstream

Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

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

Tested on Windows (too, just noticed ^). Code and environment LGTM.

.eslintrc.js Outdated Show resolved Hide resolved
packages/kbn-test/src/legacy_es/es_test_config.js Outdated Show resolved Hide resolved
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

@mistic mistic removed the request for review from tylersmalley March 15, 2021 18:12
@mistic mistic added the auto-backport Deprecated - use backport:version if exact versions are needed label Mar 15, 2021
@mistic mistic enabled auto-merge (squash) March 15, 2021 19:51
@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
canvas 1.4MB 1.4MB -40.0B
dashboard 165.8KB 165.8KB -16.0B
data 211.3KB 211.2KB -96.0B
discover 402.0KB 402.0KB -56.0B
infra 1.9MB 1.9MB -130.0B
lens 935.4KB 935.3KB -40.0B
ml 6.4MB 6.4MB -104.0B
monitoring 798.3KB 798.2KB -56.0B
observability 187.6KB 187.6KB -32.0B
savedObjectsManagement 163.8KB 163.8KB -16.0B
searchprofiler 670.2KB 670.1KB -8.0B
securitySolution 7.8MB 7.8MB -40.0B
upgradeAssistant 136.4KB 136.4KB -24.0B
uptime 939.5KB 939.5KB -32.0B
visDefaultEditor 241.6KB 241.6KB -32.0B
visTypeVega 2.7MB 2.7MB -40.0B
visTypeVislib 624.7KB 624.7KB -64.0B
watcher 887.2KB 887.0KB -248.0B
total -1.0KB

Page load bundle

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

id before after diff
advancedSettings 9.8KB 9.7KB -12.0B
alerting 65.4KB 65.4KB -12.0B
apm 23.3KB 23.3KB -12.0B
apmOss 3.1KB 3.1KB -12.0B
banners 13.6KB 13.5KB -12.0B
beatsManagement 128.4KB 128.4KB -36.0B
bfetch 12.4KB 12.4KB -12.0B
canvas 548.9KB 548.8KB -44.0B
charts 159.7KB 159.7KB -12.0B
cloud 5.2KB 5.2KB -12.0B
console 26.7KB 26.7KB -12.0B
core 432.2KB 432.2KB -28.0B
crossClusterReplication 27.1KB 27.1KB -12.0B
dashboard 334.7KB 334.7KB -12.0B
dashboardEnhanced 24.0KB 24.0KB -12.0B
dashboardMode 4.9KB 4.9KB -12.0B
data 807.9KB 807.6KB -276.0B
dataEnhanced 40.8KB 40.7KB -12.0B
devTools 18.1KB 18.1KB -12.0B
discover 79.6KB 79.6KB -12.0B
discoverEnhanced 10.3KB 10.3KB -12.0B
embeddable 192.1KB 192.0KB -12.0B
embeddableEnhanced 11.4KB 11.4KB -12.0B
enterpriseSearch 15.4KB 15.3KB -12.0B
esUiShared 218.0KB 217.9KB -36.0B
expressions 210.8KB 210.8KB -12.0B
features 7.3KB 7.3KB -12.0B
fileUpload 13.7KB 13.7KB -12.0B
fleet 371.2KB 371.2KB -12.0B
globalSearch 15.8KB 15.8KB -12.0B
globalSearchBar 38.2KB 38.2KB -12.0B
globalSearchProviders 8.9KB 8.9KB -12.0B
graph 11.7KB 11.7KB -12.0B
grokdebugger 8.1KB 8.1KB -12.0B
home 17.4KB 17.4KB -12.0B
indexLifecycleManagement 53.5KB 53.5KB -12.0B
indexManagement 43.8KB 43.7KB -12.0B
indexPatternFieldEditor 82.6KB 82.6KB -12.0B
indexPatternManagement 15.2KB 15.2KB -12.0B
infra 150.3KB 150.3KB -12.0B
ingestPipelines 26.2KB 26.2KB -12.0B
inputControlVis 10.7KB 10.7KB -12.0B
inspector 44.1KB 44.1KB -12.0B
kibanaLegacy 82.3KB 82.3KB -28.0B
kibanaOverview 36.5KB 36.5KB -12.0B
kibanaReact 127.3KB 127.3KB -12.0B
kibanaUtils 154.7KB 154.7KB -12.0B
lens 34.9KB 34.9KB -12.0B
licenseManagement 19.6KB 19.6KB -12.0B
licensing 14.8KB 14.8KB -12.0B
lists 149.6KB 149.6KB -12.0B
logstash 22.6KB 22.6KB -12.0B
management 16.9KB 16.9KB -12.0B
maps 143.3KB 143.3KB -12.0B
mapsEms 10.7KB 10.7KB -12.0B
mapsLegacy 71.2KB 71.1KB -12.0B
mapsLegacyLicensing 3.4KB 3.3KB -12.0B
ml 70.1KB 70.1KB -12.0B
monitoring 49.8KB 49.7KB -12.0B
navigation 20.4KB 20.4KB -12.0B
newsfeed 20.7KB 20.6KB -12.0B
observability 27.2KB 27.2KB -12.0B
osquery 12.7KB 12.7KB -12.0B
painlessLab 23.5KB 23.5KB -12.0B
presentationUtil 25.7KB 25.7KB -12.0B
regionMap 19.7KB 19.7KB -12.0B
remoteClusters 15.4KB 15.4KB -12.0B
reporting 96.6KB 96.5KB -52.0B
rollup 44.9KB 44.9KB -12.0B
runtimeFields 23.1KB 23.1KB -12.0B
savedObjects 55.9KB 55.9KB -12.0B
savedObjectsManagement 36.8KB 36.8KB -12.0B
savedObjectsTagging 36.1KB 36.1KB -12.0B
savedObjectsTaggingOss 6.8KB 6.8KB -12.0B
searchprofiler 47.4KB 47.4KB -12.0B
security 131.8KB 131.8KB -12.0B
securityOss 10.7KB 10.7KB -12.0B
securitySolution 233.6KB 233.5KB -12.0B
share 73.2KB 73.2KB -12.0B
snapshotRestore 48.7KB 48.7KB -12.0B
spaces 44.6KB 44.6KB -12.0B
spacesOss 4.7KB 4.7KB -12.0B
stackAlerts 19.0KB 19.0KB -12.0B
telemetry 39.3KB 39.3KB -12.0B
telemetryManagementSection 25.1KB 25.1KB -12.0B
tileMap 17.9KB 17.9KB -12.0B
timelion 10.1KB 10.1KB -12.0B
transform 23.6KB 23.6KB -12.0B
triggersActionsUi 104.3KB 104.3KB -12.0B
uiActions 41.9KB 41.9KB -12.0B
uiActionsEnhanced 217.5KB 217.5KB -44.0B
upgradeAssistant 33.4KB 33.4KB -12.0B
uptime 19.9KB 19.8KB -12.0B
urlDrilldown 52.2KB 52.2KB -12.0B
urlForwarding 12.8KB 12.8KB -12.0B
usageCollection 9.7KB 9.7KB -12.0B
visDefaultEditor 36.1KB 36.1KB -12.0B
visTypeMarkdown 13.3KB 13.3KB -12.0B
visTypeMetric 22.8KB 22.8KB -12.0B
visTypeTable 8.9KB 8.9KB -12.0B
visTypeTagcloud 16.8KB 16.8KB -12.0B
visTypeTimelion 26.3KB 26.3KB -12.0B
visTypeTimeseries 126.7KB 126.7KB -12.0B
visTypeVega 57.4KB 57.4KB -12.0B
visTypeVislib 36.2KB 36.1KB -12.0B
visTypeXy 46.3KB 46.3KB -12.0B
visualizations 114.8KB 114.8KB -68.0B
visualize 28.8KB 28.8KB -12.0B
watcher 24.9KB 24.9KB -12.0B
total -1.8KB
Unknown metric groups

@kbn/ui-shared-deps asset size

id before after diff
kbn-ui-shared-deps.@elastic.js 2.5MB 2.5MB +1.5KB
kbn-ui-shared-deps.js 7.4MB 7.4MB -1.5KB
total -0.0B

History

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

@mistic mistic merged commit daa0f22 into elastic:master Mar 15, 2021
@mistic mistic added auto-backport Deprecated - use backport:version if exact versions are needed and removed auto-backport Deprecated - use backport:version if exact versions are needed labels Mar 15, 2021
mistic added a commit to mistic/kibana that referenced this pull request Mar 15, 2021
* chore(NA): ensure scripts run with --preserve-symlinks

* chore(NA): run webpack configs with symlinks: false

* chore(NA): fix pkg json load on kbn test

* chore(NA): add script into setup node env

* chore(NA): fix kbn test for relative improt

* chore(NA): fix change on docs

* chore(NA): move ensure node preserve symlinks into setup node env

* chore(NA): update changed docs

* chore(NA): update jest unit test

* chore(NA): fix wrapper script exit code

* chore(NA): updated generated plugin list docs

* fix(NA): make functional test runner use kbn utils repo_root

* chore(NA): fix eslint imports

* chore(NA): missing react correct config on eslint package

* chore(NA): use correct value to make test pass locally

* chore(NA): fix jest tests

* chore(NA): try remove extra preserve symlinks

* chore(NA): fix windows environment

* chore(NA): fix kbn-optimizer to run with preserve-symlinks

* chore(NA): fix integration jest test for kbn/optimizer

* chore(NA): remove require.resolve from eslintrc.js

* chore(NA): avoid load json file

* chore(NA): move kbn/utils import into kbn/dev-utils

* chore(NA): use correct dependencies on eslint config package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@mistic
Copy link
Member Author

mistic commented Mar 15, 2021

7.x: e3c70f5

@kibanamachine

This comment has been minimized.

1 similar comment
@kibanamachine

This comment has been minimized.

mistic added a commit that referenced this pull request Mar 15, 2021
* chore(NA): ensure scripts run with --preserve-symlinks

* chore(NA): run webpack configs with symlinks: false

* chore(NA): fix pkg json load on kbn test

* chore(NA): add script into setup node env

* chore(NA): fix kbn test for relative improt

* chore(NA): fix change on docs

* chore(NA): move ensure node preserve symlinks into setup node env

* chore(NA): update changed docs

* chore(NA): update jest unit test

* chore(NA): fix wrapper script exit code

* chore(NA): updated generated plugin list docs

* fix(NA): make functional test runner use kbn utils repo_root

* chore(NA): fix eslint imports

* chore(NA): missing react correct config on eslint package

* chore(NA): use correct value to make test pass locally

* chore(NA): fix jest tests

* chore(NA): try remove extra preserve symlinks

* chore(NA): fix windows environment

* chore(NA): fix kbn-optimizer to run with preserve-symlinks

* chore(NA): fix integration jest test for kbn/optimizer

* chore(NA): remove require.resolve from eslintrc.js

* chore(NA): avoid load json file

* chore(NA): move kbn/utils import into kbn/dev-utils

* chore(NA): use correct dependencies on eslint config package

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support 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.

8 participants