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

[Uptime] Migrate client to New Platform #55086

Merged
merged 58 commits into from
Apr 29, 2020

Conversation

justinkambic
Copy link
Contributor

@justinkambic justinkambic commented Jan 16, 2020

Summary

Uptime client migration is nearly complete. Once we merge this, we should be 100% migrated.

The primary part of this patch (aside from the move of nearly 500 files) is in the new plugin file where we are now importing our Kibana dependencies with core.getStartServices.

This removal of direct imports to other plugins for dependencies has caused the definition of some new props for the Uptime App. I also introduced a new context to keep reference to startup plugins. At the moment it's only using the embeddable plugin, which we're using to fetch the Maps embeddable factory.

Testing this PR

You should be able to pull this patch and run it like normal, and all the Uptime features should work without issues.

Code is WIP.

Resolves #54033.

Resolves #60915.

The goal of this patch is to migrate the remaining client and common code from the legacy directory to the NP directory, and to consume NP services.

@justinkambic justinkambic added Feature:New Platform v8.0.0 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.7.0 labels Jan 16, 2020
@justinkambic justinkambic self-assigned this Jan 16, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@kibanamachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps

History

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

@justinkambic
Copy link
Contributor Author

@elasticmachine merge upstream

@justinkambic
Copy link
Contributor Author

@elasticmachine merge upstream

DESCRIPTION: 'Uptime monitoring',
DESCRIPTION: i18n.translate('xpack.uptime.pluginDescription', {
defaultMessage: 'Uptime monitoring',
description: 'The description text that will be shown to users in Kibana',
Copy link
Contributor

Choose a reason for hiding this comment

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

We should change this default description text.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the text that will be shown in the feature catalogue - I changed the description a bit to reflect that. LMK if you have a recommendation.

@@ -7,7 +7,7 @@
import React from 'react';
import DateMath from '@elastic/datemath';
import { DurationChartComponent } from '../duration_chart';
import { MonitorDurationResult } from '../../../../../common/types';
import { MonitorDurationResult } from '../../../../../common';
Copy link
Contributor

Choose a reason for hiding this comment

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

AS much as i love short imports, but i think in this case, it make sense to keep types, runtimetype and constants separate. I fully realize this impact many files in this PR, so reverting it will be quite an effort. Let me know your thoughts about this?

cc @andrewvc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No worries - I had thought we discussed using just common in the past. Are you saying you'd want it reverted for just types, or ['types', 'runtime_types']?

Copy link
Contributor

Choose a reason for hiding this comment

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

ahan, i must have forgotten it, for me i think keeping types and constants make more sense, but if you guys feel different, i have no objection to importing them via 'common'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed/reverted this in d77978f, 7fff70f, and 04ce6cc.

Copy link
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

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

LGTM WFG

@justinkambic
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@justinkambic justinkambic merged commit 05f0d0a into elastic:master Apr 29, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 29, 2020
* master:
  [ML] Changes Machine learning overview UI text (elastic#64625)
  [Uptime] Migrate client to New Platform (elastic#55086)
  Slim vis type timeseries (elastic#64631)
  [Telemetry] Fix inconsistent search behaviour in Advanced Settings (elastic#64510)
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 29, 2020
* alerting/np-migration: (64 commits)
  [ML] Changes Machine learning overview UI text (elastic#64625)
  [Uptime] Migrate client to New Platform (elastic#55086)
  Slim vis type timeseries (elastic#64631)
  [Telemetry] Fix inconsistent search behaviour in Advanced Settings (elastic#64510)
  removed unneeded dep and file
  [SIEM] Create template timeline (elastic#63136)
  load react component lazily in so management section (elastic#64285)
  Cleanup .eslingignore and add target (elastic#64617)
  [Ingest] Support yaml variables in datasource (elastic#64459)
  typescript-ify portions of src/optimize (elastic#64688)
  [ngSanitize] add explicit dependencies to all uses of `ngSanitize` angular module (elastic#64546)
  Consolidate downloading plugin bundles to bootstrap script (elastic#64685)
  [Maps] disable edit layer button when flyout is open for add layer or map settings (elastic#64230)
  chore(NA): add async import into infra plugin to reduce apm bundle size (elastic#63292)
  [Maps] fix edit filter (elastic#64586)
  [SIEM][Detections] Adds large list support using REST endpoints
  Replace a number of any-ed styled(eui*) with accurate types (elastic#64555)
  [Endpoint] Recursive resolver children (elastic#61914)
  [ML] Fix new job wizard with multiple indices (elastic#64567)
  Use short URLs for legacy plugin deprecation warning (elastic#64540)
  ...
justinkambic added a commit to justinkambic/kibana that referenced this pull request Apr 29, 2020
* Move uptime legacy server to plugins directory.

* Re-add feature registration code.

* Move uptime legacy server to plugins directory.

* Re-add feature registration code.

* Move all files.

* WIP fixing things.

* WIP fixing things.

* WIP fixing things.

* Finished fixing server.

* Fix alert type registration glitch.

* Remove obsolete file.

* Fix unwanted revisions, uncomment previously un-migrated code, delete accidentally-merged files.

* More cleanup.

* Fix all non-maps unit tests.

* Get functional tests working.

* Delete misplaced file.

* Add uptime CODEOWNERS entry.

* Get map working in Uptime app on NP.

* Update CODEOWNERS to remove legacy entry.

* Update server imports.

* Delete and clean up unused or redundant code/comments.

* Move new files from legacy to NP to fix merge error.

* Fix broken import.

* Delete obsolete test snapshots.

* Clean up imports and types, delete obsolete code.

* Clean up redundant common imports.

* Delete obsolete translation keys.

* Add additional explicit typing to plugin class.

* Combine redundant common imports.

* Delete unneeded optionalPlugin entry.

* Revert "Combine redundant common imports."

This reverts commit 159e66c.

* Update a translation description.

* Revert "Clean up redundant common imports."

This reverts commit 8794013.

* Remove new common index file and revert imports from only common to more specific paths.

* Fix broken imports in `~/x-pack/test`.

* Move new file from legacy to NP location.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
justinkambic added a commit that referenced this pull request Apr 29, 2020
* Move uptime legacy server to plugins directory.

* Re-add feature registration code.

* Move uptime legacy server to plugins directory.

* Re-add feature registration code.

* Move all files.

* WIP fixing things.

* WIP fixing things.

* WIP fixing things.

* Finished fixing server.

* Fix alert type registration glitch.

* Remove obsolete file.

* Fix unwanted revisions, uncomment previously un-migrated code, delete accidentally-merged files.

* More cleanup.

* Fix all non-maps unit tests.

* Get functional tests working.

* Delete misplaced file.

* Add uptime CODEOWNERS entry.

* Get map working in Uptime app on NP.

* Update CODEOWNERS to remove legacy entry.

* Update server imports.

* Delete and clean up unused or redundant code/comments.

* Move new files from legacy to NP to fix merge error.

* Fix broken import.

* Delete obsolete test snapshots.

* Clean up imports and types, delete obsolete code.

* Clean up redundant common imports.

* Delete obsolete translation keys.

* Add additional explicit typing to plugin class.

* Combine redundant common imports.

* Delete unneeded optionalPlugin entry.

* Revert "Combine redundant common imports."

This reverts commit 159e66c.

* Update a translation description.

* Revert "Clean up redundant common imports."

This reverts commit 8794013.

* Remove new common index file and revert imports from only common to more specific paths.

* Fix broken imports in `~/x-pack/test`.

* Move new file from legacy to NP location.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@justinkambic
Copy link
Contributor Author

Backported to:
7.x/7.8.0 9106475
#64773

@justinkambic justinkambic deleted the uptime_migrate-client-to-np branch April 29, 2020 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.8.0 v8.0.0
Projects
None yet
5 participants