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

[kbn/bootstrap] validate that certain deps don't ship in production #80549

Merged
merged 4 commits into from
Oct 15, 2020

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Oct 14, 2020

@restrry discovered in #80463 that we're shipping @kbn/dev-utils in production, so I figured it was time to start validating that certain packages stay dev only.

This adds a check to yarn kbn bootstrap to look for packages in the tree of production dependencies for kibana and x-pack which are flagged with a new kibana.devOnly property (in their package.json).

To start I've labeled the following packages as dev only:

  • @elastic/eslint-config-kibana
  • @kbn/babel-preset
  • @kbn/dev-utils
  • @kbn/es
  • @kbn/es-archiver
  • @kbn/eslint-import-resolver-kibana
  • @kbn/eslint-plugin-eslint
  • @kbn/expect
  • @kbn/pm
  • @kbn/release-notes
  • @kbn/storybook
  • @kbn/telemetry-tools
  • @kbn/test
  • @kbn/test-subj-selector
  • @kbn/utility-types

When these packages make their way into the production dependency chain we print out an error that includes a map to help people understand where the issue is and help them fix it:

image

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

distributable file count

id before after diff
default 48492 48191 -301
oss 29211 28633 -578

History

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

@spalger spalger added release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.10.0 v7.11.0 v8.0.0 labels Oct 14, 2020
@spalger spalger marked this pull request as ready for review October 14, 2020 18:03
@spalger spalger requested review from a team as code owners October 14, 2020 18:03
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

telemetry-tools changes LGTM

Copy link
Member

@mistic mistic left a comment

Choose a reason for hiding this comment

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

LGTM

@spalger spalger merged commit 07c1284 into elastic:master Oct 15, 2020
@spalger spalger deleted the remove/dev-utils-production-dep branch October 15, 2020 16:56
spalger pushed a commit to spalger/kibana that referenced this pull request Oct 15, 2020
…lastic#80549)

Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	packages/kbn-pm/dist/index.js
spalger pushed a commit to spalger/kibana that referenced this pull request Oct 15, 2020
…lastic#80549)

Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	packages/kbn-pm/dist/index.js
#	packages/kbn-pm/src/commands/bootstrap.ts
spalger pushed a commit that referenced this pull request Oct 15, 2020
…tion (#80549) (#80710)

Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	packages/kbn-pm/dist/index.js
spalger added a commit that referenced this pull request Oct 15, 2020
…ction (#80549) (#80712)

Co-authored-by: spalger <spalger@users.noreply.github.com>
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:Operations Team label for Operations Team v7.10.0 v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants