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

Migrate Coordinate Maps to NP #64668

Merged
merged 34 commits into from
May 6, 2020

Conversation

kindsun
Copy link
Contributor

@kindsun kindsun commented Apr 28, 2020

Updates Coordinate Maps dependencies and migrates it to the New Platform. This PR also removes the file containing the mapConfig declaration originally located in src/legacy/core_plugins/tile_map/index.ts. This necessitated updates to the new Maps app which also relies heavily on mapConfig.

I originally planned to rename the plugin to coordinate_maps as part of this PR but will handle that separately at a later point. There are also several config values under tilemap, so ideally these + any other renaming would be handled together.

Related issue: #64810

@kindsun kindsun added Feature:Coordinate Map [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:NP Migration v7.8.0 labels Apr 28, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@kindsun kindsun force-pushed the np-migrate-coordinate-maps branch 2 times, most recently from b87d8ae to 99efbbf Compare April 28, 2020 15:50
@kindsun kindsun force-pushed the np-migrate-coordinate-maps branch from 99efbbf to 151ddc9 Compare April 29, 2020 01:52
@kindsun kindsun marked this pull request as ready for review April 29, 2020 17:12
@kindsun kindsun requested review from a team as code owners April 29, 2020 17:12
@kindsun kindsun requested a review from thomasneirynck April 29, 2020 17:12
Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

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

I only have a few nits. Tested and works. Really great..

@@ -42,7 +42,7 @@
"src/plugins/telemetry",
"src/plugins/telemetry_management_section"
],
"tileMap": "src/legacy/core_plugins/tile_map",
"tileMap": "src/plugins/tile_map",
Copy link
Contributor

Choose a reason for hiding this comment

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

:)

src/plugins/maps_legacy/public/map/service_settings.js Outdated Show resolved Hide resolved
src/plugins/maps_legacy/public/plugin.ts Outdated Show resolved Hide resolved
x-pack/plugins/maps/public/plugin.ts Outdated Show resolved Hide resolved
@flash1293
Copy link
Contributor

@thomasneirynck Did you test with the kibana_dashboard_only_user role? This file is only hit when your user has that role associated.

@thomasneirynck
Copy link
Contributor

@flash1293 thx for headsup! I tested the removal of that import with the kibana_dashboard_only_user role (and read priviliges on index) and works fine.

@kindsun
Copy link
Contributor Author

kindsun commented May 5, 2020

Thanks @flash1293 for the user role info! I've also tested this locally and found no issues with dashboards loading leaflet as a user with this role.

Just to give you a heads up, it looks like this PR flagged the kibana-app team due to my removal of another leaflet import in src/legacy/core_plugins/kibana/public/kibana.js. This import was actually the source of the bulk of the issues preventing leaflet plugins from loading correctly in NP. The legacy maps plugin structure has changed substantially since that import was originally added. All legacy maps plugins now leverage the maps_legacy plugin which loads leaflet and the needed plugins. Other leaflet imports are no longer necessary, and in fact in a post-webpackShim world, actually cause problems. Let me know if you need any clarification, happy to do a deeper dive!

Aaron Caldwell added 2 commits May 5, 2020 10:16
…l way (tests have no access to the window object)
@kindsun kindsun added v7.9.0 and removed v7.8.0 labels May 5, 2020
@kindsun kindsun requested a review from thomasneirynck May 6, 2020 13:57
Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

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

👏

@@ -102,6 +102,7 @@ export class VegaMapView extends VegaBaseView {
// let maxBounds = null;
// if (mapConfig.maxBounds) {
// const b = mapConfig.maxBounds;
// eslint-disable-next-line no-undef
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary? Seems like this commented out code can be removed anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was on the chance someone ever uncommented it. I don't know the history of why it was commented out and left in. In general I think retaining commented code is unnecessary (that's what git is for, seeing code history) but I didn't touch it otherwise since it wasn't the focus of this PR

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

I tried to test this but I'm always running into "Elastic Kibana did not load properly. Check the server output for more information.". Not sure whether it's related to this PR or my environment broke somehow, I will re-setup tomorrow and test again. Bootstrapping didn't help.

I'm going to approve because the Kibana App changes LGTM, but it's only code review at this point.

If you are certain that broken Kibana is related to my environment and not the PR feel free to merge if it's blocking you somehow and I will verify after the fact tomorrow.

@kindsun
Copy link
Contributor Author

kindsun commented May 6, 2020

I tried to test this but I'm always running into "Elastic Kibana did not load properly. Check the server output for more information.". Not sure whether it's related to this PR or my environment broke somehow, I will re-setup tomorrow and test again.

Thanks for the review! @flash1293 This sounds likely to be an environmental issue since tests are passing and neither myself nor @thomasneirynck have seen any issues locally. I'm fairly confident we should be in good shape. Per your comment we do also need these changes, specifically those related to map config, for 2 other PRs. I don't believe we'll have any problems, but definitely feel free to follow up if you see any further issues!

@kindsun
Copy link
Contributor Author

kindsun commented May 6, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@kindsun kindsun merged commit c00b36e into elastic:master May 6, 2020
@kindsun kindsun deleted the np-migrate-coordinate-maps branch May 6, 2020 21:12
kindsun pushed a commit to kindsun/kibana that referenced this pull request May 6, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request May 7, 2020
* master: (42 commits)
  fix SavedObjectMigrationMap type (elastic#65569)
  [Uptime] Improve cert flaky test (elastic#65458)
  [Uptime] Fix monitor list result runtime type, ip can be null (elastic#65532)
  [APM] Agent configuration: Bug makes it possible to create invalid configurations (elastic#65508)
  [APM] Remove link from active page in the breadcrumb (elastic#65473)
  [SIEM] Fixes test flakiness (elastic#65510)
  [ESLint] update @kbn/eslint/no-restricted-paths rule to allow imports mocks from folder (elastic#65471)
  Migrate test plugins ⇒ NP (kbn_tp_run_pipeline) (elastic#64780)
  move core provier to NP. allows to run tests on every page (elastic#64929)
  Extended alerting documentation with information about using Kibana keystore and action types for preconfigured connectors (elastic#65201)
  [functional tests] add some missing awaits (elastic#65566)
  Fixed create new connector from alert flyout form throw an error messages in external plugins. (elastic#65539)
  [SIEM] [Cases] External services not getting all comments bug fix (elastic#65307)
  Migrate Coordinate Maps to NP (elastic#64668)
  Updating Canvas location in nav (elastic#65519)
  [SIEM][Lists] Fixes up contracts to work outside of requests
  [Lens] Remove "inside only" option for treemap labels (elastic#65363)
  [Uptime] Add TLS alert functional test (elastic#65303)
  Fix z-index of kbnLoadingIndicator (elastic#65521)
  Fixed indice assertion to loop through expected keys (elastic#64684)
  ...
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:Coordinate Map Feature:NP Migration release_note:skip Skip the PR/issue when compiling release notes v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants