[kbn/pm] add caching to bootstrap#53622
Merged
spalger merged 8 commits intoelastic:masterfrom Jan 3, 2020
Merged
Conversation
fccbaa7 to
5ad8cde
Compare
5ad8cde to
5ef56a4
Compare
5ef56a4 to
d235f1b
Compare
Contributor
|
Pinging @elastic/kibana-operations (Team:Operations) |
…-pm-calc-cache-key
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
brianseeders
approved these changes
Jan 3, 2020
spalger
pushed a commit
to spalger/kibana
that referenced
this pull request
Jan 3, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> # Conflicts: # packages/kbn-pm/dist/index.js
spalger
pushed a commit
to spalger/kibana
that referenced
this pull request
Jan 3, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> # Conflicts: # packages/kbn-dev-utils/package.json # packages/kbn-pm/dist/index.js # packages/kbn-pm/src/commands/bootstrap.test.ts # yarn.lock
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Jan 3, 2020
* master: [kbn/pm] add caching to bootstrap (elastic#53622) adds createdAt and updatedAt fields to alerting (elastic#53793)
spalger
pushed a commit
that referenced
this pull request
Jan 3, 2020
spalger
pushed a commit
that referenced
this pull request
Jan 3, 2020
Contributor
Author
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Jan 6, 2020
* master: increase delay to make sure license refetched (elastic#53882) Allow custom NP plugin paths in production (elastic#53562) [Maps] show custom color ramps in legend (elastic#53780) [Lens] Expression type on document can be null (elastic#53883) [SIEM] [Detection engine] Add user permission to detection engine (elastic#53778) Update dependency @elastic/charts to v16.0.2 (elastic#52619) Set consistent EOL symbol in core API docs (elastic#53815) [Logs UI] Refactor query bar state to hooks (elastic#52656) [Maps] pass getFieldFormatter to DynamicTextProperty (elastic#53937) Invalidate alert API Key when generating a new one (elastic#53732) [Logs UI] HTTP API for log entries (elastic#53798) [kbn/pm] add caching to bootstrap (elastic#53622) adds createdAt and updatedAt fields to alerting (elastic#53793)
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Jan 6, 2020
* master: increase delay to make sure license refetched (elastic#53882) Allow custom NP plugin paths in production (elastic#53562) [Maps] show custom color ramps in legend (elastic#53780) [Lens] Expression type on document can be null (elastic#53883) [SIEM] [Detection engine] Add user permission to detection engine (elastic#53778) Update dependency @elastic/charts to v16.0.2 (elastic#52619) Set consistent EOL symbol in core API docs (elastic#53815) [Logs UI] Refactor query bar state to hooks (elastic#52656) [Maps] pass getFieldFormatter to DynamicTextProperty (elastic#53937) Invalidate alert API Key when generating a new one (elastic#53732) [Logs UI] HTTP API for log entries (elastic#53798) [kbn/pm] add caching to bootstrap (elastic#53622) adds createdAt and updatedAt fields to alerting (elastic#53793) [SR] Enable component integration tests (elastic#53893)
jloleysens
added a commit
to jloleysens/kibana
that referenced
this pull request
Jan 6, 2020
…nsole-dependencies * 'master' of github.com:elastic/kibana: (33 commits) adds strict types to Alerting Client (elastic#53821) [Dashboard] Empty screen redesign (elastic#53681) Migrate config deprecations and `ShieldUser` functionality to the New Platform (elastic#53768) increase delay to make sure license refetched (elastic#53882) Allow custom NP plugin paths in production (elastic#53562) [Maps] show custom color ramps in legend (elastic#53780) [Lens] Expression type on document can be null (elastic#53883) [SIEM] [Detection engine] Add user permission to detection engine (elastic#53778) Update dependency @elastic/charts to v16.0.2 (elastic#52619) Set consistent EOL symbol in core API docs (elastic#53815) [Logs UI] Refactor query bar state to hooks (elastic#52656) [Maps] pass getFieldFormatter to DynamicTextProperty (elastic#53937) Invalidate alert API Key when generating a new one (elastic#53732) [Logs UI] HTTP API for log entries (elastic#53798) [kbn/pm] add caching to bootstrap (elastic#53622) adds createdAt and updatedAt fields to alerting (elastic#53793) [SR] Enable component integration tests (elastic#53893) Move index patterns: src/legacy/core_plugins/data 👉 src/plugins/data (elastic#53794) moved Task Manager server code under "server" directory (elastic#53777) Rename `/api/security/oidc` to `/api/security/oidc/callback`. (elastic#53886) ... # Conflicts: # yarn.lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every time someone bootstraps Kibana it runs the
kbn:bootstrapscript in any package which has it defined. This is because bootstrapping is what people are supposed to do when they pull changes or switch branches, and once we install updated dependencies some packages might need to be rebuilt in order to use the new dependencies.The reality though is that most pulls/branch switches/package updates don't actually require rebuilding packages, the build output only needs to be updated if the source o the package has updated, and maybe if the dependencies of that package have updated.
This PR attempts to teach bootstrap how to only run the bootstrap scripts when the source of a package has changed, or when the deps of a package have updated (including dependencies on other local packages). To determine when things have changed the bootstrap script writes a
.bootstrap-cachefile to thetargetdirectory of each package. The contents of that file includes a cache key for this package and all packages this one depends on (directly or indirectly) which is a hash of the following:To inspect the raw values which produce the cache values, set
BOOTSTRAP_CACHE_DEBUG_CHECKSUM=1and runyarn kbn bootstrap.To ignore the cache and rebuild every package anyway, you can pass
--no-cache.The changes in this PR are huge because there were relatively significant changes made to the kbn/pm distributable, which can be ignores and there are more like a few hundred lines of changes.