-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] Transforms: Migrate client plugin to NP. #59443
Conversation
Pinging @elastic/ml-ui (:ml) |
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.
Should licensing affect whether or not this Management app is displayed? I don't see any licensing checking code here.
import { textService } from './app/services/text'; | ||
|
||
export interface PluginsDependencies { | ||
data: any; |
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.
FYI you can get the type for this from src/plugins/data/public
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.
Thanks, fixed in abefad6.
const startServices = await getStartServices(); | ||
const [core, plugins] = startServices; | ||
const { chrome, docLinks, uiSettings, savedObjects, overlays } = core; | ||
const { data } = plugins as PluginsDependencies; |
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.
FYI if you add a type parameter to CoreSetup
on line 23, you can remove the typecast on line 40: CoreSetup<PluginDependencies>
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.
👍 Fixed in 893275b.
@joshdover I copied the behavior from the That code was already in place and no changes were needed for this cut-over PR. |
import { resolve } from 'path'; | ||
|
||
import { PLUGIN } from './common/constants'; | ||
|
||
export function transform(kibana: any) { |
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.
@joshdover is this index.ts
file still needed after cutover to x-pack/plugins
?
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.
Maybe @sebelga can also chime in on this one. I based that off the structure of the index_management
plugin which also has this one file left in legacy
.
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.
I had to leave that file in the legacy folder so dependant plugins still in the legacy world that read the configuration would not complain.
If there aren't any plugin the the "legacy" folder that read the transform plugin config, this file should not be needed.
@peteharverson |
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.
Tested and LGTM
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.
Added a comment, but on the whole LGTM
savedObjects: CoreStart['savedObjects']; | ||
overlays: CoreStart['overlays']; | ||
} | ||
|
||
let DependenciesContext: React.Context<AppDependencies>; | ||
|
||
const setAppDependencies = (deps: AppDependencies) => { | ||
const legacyBasePath = { |
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 doesn't appear to be being used other than to set basePath
in the dependency cache, which could be just deps.http.basePath
autocomplete: deps.plugins.data.autocomplete, | ||
docLinks: deps.core.docLinks, | ||
autocomplete: deps.data.autocomplete, | ||
docLinks: deps.docLinks, | ||
basePath: legacyBasePath as any, |
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.
could this be deps.http.basePath
?
@jgowdyelastic Thanks for the review! That legacy stuff for |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
Migrates the client side plugin of transforms to NP. - Gets rid of the last parts of the shim (http, documentation links) - Moves the plugin from x-pack/legacy/plugins/transform/public to x-pack/plugins/transform - Creates a custom mock for appDependencies based on NP services - Fixes jest tests to get rid of all act() related warnings
* master: (154 commits) Add an optional authentication mode for HTTP resources (elastic#58589) Implement embeddable drilldown menu options (elastic#59232) [Alerting] "Create alert" graph visualization design improvements (elastic#59399) Alerting update route throttle property is missing (elastic#59580) [SIEM] Adds 'Load prebuilt rules' Cypress test (elastic#59529) Show error if field is not found during filter rendering (elastic#59298) Navigate back to discover app during test, because the saved search from the preceding test has major performance problems when used with this test (elastic#59571) Check for alert dialog when doing a force logout (elastic#59329) ensure fs deletes are not cwd dependent (elastic#59570) Empty message for APM service map (elastic#59518) [Drilldowns] <ActionWizard/> Component (elastic#59032) [Reporting] Improve the page exit error messages (elastic#59351) Ensure logged out starting state for tests that need it (elastic#59322) Hide input value from kbn-config-schema error messages (elastic#58843) [ML] Transforms: Migrate client plugin to NP. (elastic#59443) [ML] Disable failing functional tests [SIEM] Update Timeline to use the latest euiFlyoutBody style (elastic#59524) Temporarily remove the project mappings for PR labels (elastic#59493) [Alerting] replace index threshold graph usage of watcher APIs with new API (elastic#59385) [ML] Show view series link in anomalies table for machine_learning_user role (elastic#59549) ...
Summary
Part of #50902.
Migrates the client side plugin of transforms to NP.
shim
(http
, documentation links)x-pack/legacy/plugins/transform/public
tox-pack/plugins/transform
appDependencies
based on NP servicesact()
related warningsNot for
kibana-design
team: You got pinged here but SCSS files were only moved, not edited.Checklist
For maintainers