Skip to content

[maps] fix geo line source not loaded unless maps application is opened#159432

Merged
nreese merged 10 commits intoelastic:mainfrom
nreese:issue_159408
Jun 12, 2023
Merged

[maps] fix geo line source not loaded unless maps application is opened#159432
nreese merged 10 commits intoelastic:mainfrom
nreese:issue_159408

Conversation

@nreese
Copy link
Copy Markdown
Contributor

@nreese nreese commented Jun 10, 2023

closes #159408

PR consolidates source registry into a single file to ensure that all sources are registered when only map embeddable is loaded. To prevent regression, unit test added to ensure that all SOURCE_TYPES enum values are contained in registry.

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Jun 10, 2023

@elasticmachine merge upstream

@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Jun 12, 2023

@elasticmachine merge upstream

@nreese nreese marked this pull request as ready for review June 12, 2023 18:47
@nreese nreese requested a review from a team as a code owner June 12, 2023 18:47
@nreese nreese requested a review from ThomThomson June 12, 2023 18:47
@nreese nreese added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// Feature:Maps labels Jun 12, 2023
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

Copy link
Copy Markdown
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Reproduced this with the instructions from the issue, then switched to your branch and it's fixed! This is also a nice cleanup, and I especially appreciate the test to cover the registry. I left a couple tiny nits but LGTM!

getMapsCapabilities() {
return { save: true };
},
getEMSSettings() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I wonder if it's possible to have a common / default mock of the kibana_services so that you don't need to update so many files every time something new needs to be added.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not sure since you can not include variables inside mocked import scope.

Copy link
Copy Markdown
Contributor

@ThomThomson ThomThomson Jun 12, 2023

Choose a reason for hiding this comment

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

Definitely not something to change in this PR (potentially not something to change at all), but we usually do it in Dashboard by providing a sensible default for the mock in jest_setup example. Then for any test that needs a variable injected we override the service with a jest.fn() example.

It works pretty well, but I'm not sure how easily that would be applicable to the maps service infrastructure.

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
maps 981 983 +2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
maps 2.7MB 2.7MB +159.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
securitySolution 410 414 +4
total +6

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
securitySolution 491 495 +4
total +6

History

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

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
8.8

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 12, 2023
…ed (elastic#159432)

closes elastic#159408

PR consolidates source registry into a single file to ensure that all
sources are registered when only map embeddable is loaded. To prevent
regression, unit test added to ensure that all SOURCE_TYPES enum values
are contained in registry.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit cb7c5b3)
nreese added a commit to nreese/kibana that referenced this pull request Jun 12, 2023
…ed (elastic#159432)

closes elastic#159408

PR consolidates source registry into a single file to ensure that all
sources are registered when only map embeddable is loaded. To prevent
regression, unit test added to ensure that all SOURCE_TYPES enum values
are contained in registry.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit cb7c5b3)
nreese added a commit to nreese/kibana that referenced this pull request Jun 12, 2023
…ed (elastic#159432)

closes elastic#159408

PR consolidates source registry into a single file to ensure that all
sources are registered when only map embeddable is loaded. To prevent
regression, unit test added to ensure that all SOURCE_TYPES enum values
are contained in registry.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
nreese added a commit to nreese/kibana that referenced this pull request Jun 12, 2023
@nreese
Copy link
Copy Markdown
Contributor Author

nreese commented Jun 12, 2023

8.8 backport #159532

nreese added a commit that referenced this pull request Jun 13, 2023
…s opened (#159432) (#159532)

Manual backport of #159432

Needed to remove ES_DISTANCE_SOURCE reference since ES_DISTANCE_SOURCE
does not exist on 8.8 branch

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jun 13, 2023
* main: (199 commits)
  [Lens] Add custom formatter within the Lens editor (elastic#158468)
  [Uptime] Hide app if no data is available (elastic#159118)
  [CodeEditor] Add grok highlighting (elastic#159334)
  Expose decoded cloudId components from the cloud plugin's contract (elastic#159442)
  [Profiling] Use collector and symbolizer integrations in the add data page (elastic#159481)
  [Infrastructure UI] Hosts View: Unified Search bar with auto-refresh enabled (elastic#157011)
  [APM] Add feature flag for not available apm schema (elastic#158911)
  [Lens] Remove deprecated componentWillReceiveProps usage (elastic#159502)
  [api-docs] 2023-06-13 Daily api_docs build (elastic#159536)
  [data views] Use versioned router for REST routes (elastic#158608)
  [maps] fix geo line source not loaded unless maps application is opened (elastic#159432)
  [Enterprise Search][Search application]Fix Create Api key url (elastic#159519)
  [Security Solution] Increase timeout for indexing hosts (elastic#159518)
  dashboard Reset button disable (elastic#159430)
  [Security Solution] Unskip Endpoint API tests after package fix (elastic#159484)
  [Synthetics] adjust alert timing (elastic#159511)
  [ResponseOps][rule registry] Remove usages of `refresh: true` (elastic#159252)
  Revert "Remove unused package (elastic#158597)"
  [Serverless] Adding config to disable authentication on task manager background worker utilization API (elastic#159505)
  Remove unused package (elastic#158597)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Maps release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas t// v8.8.2 v8.9.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[maps] geo line source not loaded unless maps application is opened

5 participants