[kbn/optimizer] emit success event from reducer when all bundles cached#57945
Merged
spalger merged 6 commits intoelastic:masterfrom Feb 19, 2020
Merged
Conversation
Contributor
|
Pinging @elastic/kibana-operations (Team:Operations) |
…imizer-cached-success-event
…imizer-cached-success-event
Contributor
Author
|
@elasticmachine merge upstream |
Contributor
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
spalger
pushed a commit
to spalger/kibana
that referenced
this pull request
Feb 19, 2020
…ed (elastic#57945) * emit success event from reducer when all bundles cached * verify that infinite streams can be broken by unsubscribing * shift naming a smidge Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
spalger
pushed a commit
that referenced
this pull request
Feb 19, 2020
…ed (#57945) (#58042) * emit success event from reducer when all bundles cached * verify that infinite streams can be broken by unsubscribing * shift naming a smidge Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Contributor
Author
|
7.x/7.7: 89f24ad |
mbondyra
added a commit
to mbondyra/kibana
that referenced
this pull request
Feb 20, 2020
* master: (136 commits) [Visualize] Remove legacy appState in visualize (elastic#57330) Use static time for tsvb rollup test (elastic#57701) [SIEM] Fix ResizeObserver polyfill (elastic#58046) [SIEM][Detection Engine] Fixes return codes where some were rule_id instead of id skip flaky suite (elastic#56816) skip flaky suite (elastic#58059) skip flaky suite (elastic#45348) migrates notification server routes to NP (elastic#57906) Moved all of the show/hide toggles outside of ordered lists. (elastic#57163) [APM] NP Migration - Moves plugin server files out of legacy (elastic#57532) [Maps][Telemetry] Migrate Maps telemetry to NP (elastic#55055) Embeddable add panel examples (elastic#57319) Fix useRequest to support query change (elastic#57723) Allow custom paths in plugin generator (elastic#57766) [SIEM][Case] Merge header components (elastic#57816) [ML] New Platform server shim: update job audit messages routes (elastic#57925) [kbn/optimizer] emit success event from reducer when all bundles cached (elastic#57945) [APM] Don’t include UI filters when fetching a specific transaction (elastic#57934) Upgrade yargs (elastic#57720) skip flaky suite (elastic#57762) (elastic#57997) (elastic#57998) ... # Conflicts: # src/plugins/advanced_settings/public/management_app/components/field/__snapshots__/field.test.tsx.snap # src/plugins/advanced_settings/public/management_app/components/field/field.tsx # x-pack/plugins/translations/translations/ja-JP.json # x-pack/plugins/translations/translations/zh-CN.json
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.
There is a bug in the base path proxy triggered when the dev server is started and all bundles are cached. In this case the optimizer will never enter the
successphase, because the compilers never actually run. This same condition required #57871, and rather than implementing the same solution here I think we should just go into asuccessphase when all bundles are cached. The reason I didn't do this before is that the only place where this condition can be identified is in the state summarizer, which is powered by the RxJSscan()operator and as such couldn't produce both the "initialized" state and the "ready" state. Skipping the "initialized" state felt incorrect, so I instead relied on consumers doing thestate.phase === 'initialized' && state.onlineBundles.length === 0check to determine if the optimizer had cached all bundles.In these changes the same condition still holds true, but now another event, the
AllBundlesCachedEventis injected when theOptimizerInitializedEventis received and all bundles have been cached. When the state summarizer sees theAllBundlesCachedEventit immediately moves the optimizer into thesuccessphase.Now that we're going into a
successphase when all bundles are cached the completion handler and the phase check used to pause and unpause the base path proxy are a little more coherent, and should work well.