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

[Maps] Add 'InjectedData' class and revise so File Upload Features are assigned to new InjectedData instances #46381

Merged

Conversation

kindsun
Copy link
Contributor

@kindsun kindsun commented Sep 23, 2019

Previously the entire parsed GeoJSON object was assigned to the layerDescriptor object. This issue wasn't apparent until attempting a fix for #40205 and getting OOM errors on files of higher size. Specifically, the application would crash when copying the descriptor object in map_selectors > hasDirtyState() > copyPersistentState. The best way to test this fix currently is to set the following breakpoint:

image

and inspect the layerDescriptor object passed to the function. Previously, the layerDescriptor > sourceDescriptor contained the feature collection, now the feature collection is stored in layerDescriptor > __pushedData which isn't copied here, preventing any potential errors.

The process used is highly similar to that used for DataRequests however this data is different in that it's "pushed" to us upfront by the File Upload plugin.

@kindsun kindsun added [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:File Upload v7.5.0 labels Sep 23, 2019
@kindsun kindsun requested a review from nreese September 23, 2019 18:58
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

Nice start. I think this concept could also be used by embeddables. For example APM, just wanted to pass geojson directly into Maps instead of having Maps fetch its own data.

How about renaming pushedData? Maybe cannedData or staticData or injectedData or inlineData? The work "pushed" is a little vague.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@kindsun kindsun changed the title [Maps] Add 'PushedData' class and revise so File Upload Features are assigned to new PushedData instances [Maps] Add 'InjectedData' class and revise so File Upload Features are assigned to new InjectedData instances Oct 2, 2019
Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

lgtm with green CI
code review, tested in Chrome

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kindsun kindsun merged commit bc840e6 into elastic:master Oct 2, 2019
kindsun pushed a commit to kindsun/kibana that referenced this pull request Oct 2, 2019
…e assigned to new InjectedData instances (elastic#46381)

* Add 'PushedData' class and revise so data is assigned to new instances

* Update 'pushedData' refs to 'injectedData'

* Set default visibility to true on injected data

* Review feedback

* Update tests to account for injectedData

* Review feedback
kindsun pushed a commit that referenced this pull request Oct 3, 2019
…e assigned to new InjectedData instances (#46381) (#47158)

* Add 'PushedData' class and revise so data is assigned to new instances

* Update 'pushedData' refs to 'injectedData'

* Set default visibility to true on injected data

* Review feedback

* Update tests to account for injectedData

* Review feedback
jloleysens added a commit to jloleysens/kibana that referenced this pull request Oct 3, 2019
…ysens/kibana into console-fix-menu-actions-alignment

* 'console-fix-menu-actions-alignment' of github.com:jloleysens/kibana: (59 commits)
  [Canvas] i18n for page manager, page preview, and shape preview (elastic#46865)
  [SIEM] hide siem data on empty string or _all (elastic#47166)
  [Uptime] Shim UI exports for new platform (elastic#44722)
  [Monitoring] Metricbeat Migration Wizard Tests (elastic#47139)
  [Logs UI] Support partitioned log rate results in API (elastic#46751)
  [APM] Remove beta badge from transaction breakdown (elastic#47163)
  test: 💍 convert Interpreter font function tests to Jest (elastic#47193)
  visualizations 👉 NP-ready (elastic#47142)
  [Uptime] Update pings chart colors (elastic#46780)
  Add scroll into view to avoid tooltip overlap (elastic#47106)
  Variety of quick a11y fixes (elastic#46569)
  [Graph] Empty workspace overlay (elastic#45547)
  [ML] Converts index and saved search selection to React (elastic#47117)
  [Uptime] Change default status filter in ping list to all on monitor page  (elastic#47108)
  refactor: 💡 convert Interpreter .js -> .ts (elastic#44545)
  Add TypeScript rules to STYLEGUIDE [skip ci] (elastic#47125)
  chore(NA): fix logic behind cleaning x-pack node modules on build (elastic#47091)
  [SIEM] Update Settings Text (elastic#47147)
  Add KQL functionality in the find function of the saved objects (elastic#41136)
  [Maps] Add 'InjectedData' class and revise so File Upload Features are assigned to new InjectedData instances (elastic#46381)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation Feature:File Upload release_note:skip Skip the PR/issue when compiling release notes v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants