-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Uptime] Migrate client to New Platform #55086
Conversation
Pinging @elastic/uptime (Team:uptime) |
… accidentally-merged files.
💔 Build Failed
Failed CI StepsHistory
To update your PR or re-run it, just comment with: |
@elasticmachine merge upstream |
@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', |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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'; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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']
?
There was a problem hiding this comment.
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'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM WFG
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* 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)
* 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) ...
* 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>
* 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>
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.